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?

ソリューションへジャンプ
2,918件の閲覧回数
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 解決策
2,518件の閲覧回数
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 返答(返信)
2,518件の閲覧回数
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 件の賞賛
返信
2,518件の閲覧回数
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 件の賞賛
返信
2,519件の閲覧回数
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 件の賞賛
返信