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

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

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

跳至解决方案
1,006 次查看
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 项奖励
回复
1 解答
996 次查看
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 项奖励
回复
1 回复
997 次查看
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 项奖励
回复