iMX8 Gstreamer, pointer to access to overlay rectangle, GstBuffer data

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

iMX8 Gstreamer, pointer to access to overlay rectangle, GstBuffer data

Jump to solution
675 Views
Keith_RL
Contributor II

Using an iMX8MPLUS-BB, Yocto honister, 

 

Gstreamer plugin that can write initially static data (RGBA)  that is overlaid on video. Similar to what is described in

Basic tutorial 8: Short-cutting the pipeline (gstreamer.freedesktop.org)

The overlay on video will be a gst_video_overlay_rectangle

 

Gst_video_overlay_rectangle_new_raw(
                GstBuffer * pixels,
                gint render_x, render_y
                gint render_width, render_height
GstVideoOVerlayFormatFlags flags)

 

In old Gstreamer 0.10 the GstBuffer structure was as follows and contained a pointer to the actual data, *data. And a Macro for access the pointer. Looks like what I need. But is old gstreamer

struct _GstBuffer {
  GstMiniObject          mini_object;
  /*< public >*/ /* with COW */
  /* pointer to data and its size */

  guint8                *data;
  guint                  size;

  /* timestamp */
  GstClockTime           timestamp;
  GstClockTime           duration;

  /* the media type of this buffer */
  GstCaps               *caps;

  /* media specific offset */
  guint64                offset;
  guint64                offset_end;
  guint8                *malloc_data;

  /* ABI Added */
  GFreeFunc              free_func;
  GstBuffer             *parent;

  /*< private >*/
  gpointer _gst_reserved[GST_PADDING - 2];
};

 

GST_BUFFER_DATA (buffer)

 

The iMX8 used GStreamer Core Library version 1.18.5, where the structure of GstBuffer is a follows

struct _GstBuffer {
GstMiniObject          mini_object;
  /*< public >*/ /* with COW */
  GstBufferPool         *pool;

  /* timestamp */
  GstClockTime           pts;
  GstClockTime           dts;
  GstClockTime           duration;

  /* media specific offset */
  guint64                offset;
  guint64                offset_end;
};

 

It no longer provides the data pointer and uses GstBufferPool, I have investigated the GstBufferPool but have not found an obvious method to get the memory address, so  is there a mechanism for obtaining a pointer to the memory address from the GstBufferPool ?

 

0 Kudos
1 Solution
665 Views
Keith_RL
Contributor II

Found the answer to my question in the gstreamer 0.10 to 1.0 porting guide

docs/random/porting-to-1.0.txt · master · GStreamer / gstreamer · GitLab

View solution in original post

0 Kudos
1 Reply
666 Views
Keith_RL
Contributor II

Found the answer to my question in the gstreamer 0.10 to 1.0 porting guide

docs/random/porting-to-1.0.txt · master · GStreamer / gstreamer · GitLab

0 Kudos