iMX8MP, is it possible to gd2_blit to a gstreamer overlay

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

iMX8MP, is it possible to gd2_blit to a gstreamer overlay

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

 

 

Tags (1)
0 Kudos
Reply
1 Solution
1,257 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Keith,

 

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

 

Regards

View solution in original post

0 Kudos
Reply
3 Replies
1,258 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Keith,

 

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

 

Regards

0 Kudos
Reply
1,233 Views
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 Kudos
Reply
1,249 Views
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 Kudos
Reply