GStreamer-imx : can I get a phys_addr on an buffer pulled from appsink?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

GStreamer-imx : can I get a phys_addr on an buffer pulled from appsink?

跳至解决方案
1,785 次查看
colindefais
Contributor III


Hello,

I want to decode a video feed with gstreamer and draw the image on an opengl texture with 0 copy.

So, in my application, I am using the appsink gstreamer plugin to pull a gstreamer buffer. I would like to know if I can retrieve the physical memory address of this buffer.

When I use this instruction:

GstImxPhysMemMeta* physMemMeta = GST_IMX_PHYS_MEM_META_GET(buffer);

Then physMemMeta is always NULL :smileysad:

Is there a way to tell to appsink to use GST_IMX_PHYS_MEM_META_ADD when it creates the buffer ?

Thanks in advance,

标签 (4)
标记 (2)
0 项奖励
1 解答
1,385 次查看
colindefais
Contributor III

After a few tries and errors we were able to get the phys_addr. It depends mainly on the pipeline: if the gstreamer pipeline uses hardware functionalities and if no element removes the "phys mem meta" then we can retrieve it using “appsink”.

Thanks for the reply.

在原帖中查看解决方案

0 项奖励
3 回复数
1,385 次查看
tanguymezzano
Contributor I

Hi,

we are facing the same problem but can't find the way to set the phys_addr.

Here is our gstreamer chain, it uses hardware functionalities as we are only using imx plugins:

gst-launch-1.0 -v imxv4l2videosrc device=/dev/video1 ! our_plugin ! imxipuvideotransform ! imxvpuenc_mjpeg

In our transform function, phys_mem_meta = GST_IMX_PHYS_MEM_META_GET(outbuf); is giving us NULL.

How can we add this phys_addr? by creating a new buffer from inbuf?

Thanks for your help.

0 项奖励
1,385 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  I am afraid, GST element “appsink” does not support the needed feature.

As for GST_IMX_PHYS_MEM_META_GET, below link helps clarify what it is used for.

 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
1,386 次查看
colindefais
Contributor III

After a few tries and errors we were able to get the phys_addr. It depends mainly on the pipeline: if the gstreamer pipeline uses hardware functionalities and if no element removes the "phys mem meta" then we can retrieve it using “appsink”.

Thanks for the reply.

0 项奖励