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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,763 Views
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,

Labels (4)
Tags (2)
0 Kudos
1 Solution
1,363 Views
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.

View solution in original post

0 Kudos
3 Replies
1,363 Views
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 Kudos
1,363 Views
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 Kudos
1,364 Views
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 Kudos