iMX8MP, is it possible to gd2_blit to a gstreamer overlay

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

iMX8MP, is it possible to gd2_blit to a gstreamer overlay

跳至解决方案
1,089 次查看
Keith_RL
Contributor II

i.MX8MPlus LPDDR4 EVK board

NXP i.MX Release Distro 5.15-honister

I would like to understand if it is at all possible to use the g2d_blit to write data to a gstreamer buffer

 

 

标记 (1)
0 项奖励
回复
1 解答
1,083 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Keith,

 

Yes, it is possible if you use the G2D API then go to gstreamer.

 

Regards

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,084 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Keith,

 

Yes, it is possible if you use the G2D API then go to gstreamer.

 

Regards

0 项奖励
回复
1,059 次查看
Keith_RL
Contributor II

Thankyou for confirming it is possible, Could you provide more details on the how as I am unsure if what I am trying is achievable or if another approach is needed.

I have tried the following method, creating a gsteamer plugin, that has an overlay buffer then using g2d to blit to the buffer

buffer = gst_buffer_new_and_alloc (4 * overlay->width * overlay->height);
gst_buffer_replace (&overlay->overlay_image, buffer);
gst_buffer_unref (buffer);
gst_buffer_map (buffer, &map, GST_MAP_READWRITE);

To test the overlay, I can write directly to the overlay buffer using memcpy etc however If I try to blit directly into the gst_buffer, I run into issues

G2D – Requires Physical memory address
Gst – allocates virtual memory address

Would obtaining the Physical address for the gst buffer be a workable approach, or have I misunderstood how to link g2d to gstreamer.

0 项奖励
回复
1,075 次查看
Keith_RL
Contributor II

Thankyou for confirming it is possible,

I have tried the following method, creating a gsteamer plugin, that has an overlay buffer then using g2d to blit to the buffer  

buffer = gst_buffer_new_and_alloc (4 * overlay->width * overlay->height);
gst_buffer_replace (&overlay->overlay_image, buffer);
gst_buffer_unref (buffer);
gst_buffer_map (buffer, &map, GST_MAP_READWRITE);

To test the overlay, I can write directly to the overlay buffer using memcpy etc however If I try to blit directly into the gst_buffer, I run into issues

G2D – Requires Physical memory address
Gst – allocates virtual memory address

Would obtaining the Physical address for the gst buffer be a workable approach, or have I misunderstood how to link g2d to gstreamer.

 

0 项奖励
回复