现在的位置: 首页 > 综合 > 正文

gstreamer 一些结构体

2018年02月23日 ⁄ 综合 ⁄ 共 1588字 ⁄ 字号 评论关闭
文章目录

GstMapInfo

typedef struct {
  GstMemory *memory;
  GstMapFlags flags;
  guint8 *data;
  gsize size;
  gsize maxsize;
} GstMapInfo;

A structure containing the result of a map operation such asgst_memory_map().
It contains the data and size.

Members

GstMemory *memory;

a pointer to the mapped memory

 

GstMapFlags flags;

flags used when mapping the memory

 

guint8 *data;

a pointer to the mapped data.

[array length=size]

gsize size;

the valid size in data

 

gsize maxsize;

the maximum bytes in data

 

GstBuffer

typedef struct {
  GstMiniObject		 mini_object;

  /* 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;
} GstBuffer;

The structure of a
GstBuffer
. Use the associated macros to access the publicvariables.

GstMiniObject mini_object; the parent structure
guint8 *data; pointer to the buffer data
guint size; size of buffer data
GstClockTime timestamp; timestamp of the buffer, can be
GST_CLOCK_TIME_NONE
when the timestamp is not known or relevant.
GstClockTime duration; duration in time of the buffer data, can be
GST_CLOCK_TIME_NONE
when the duration is not known or relevant.
GstCaps *caps; the
GstCaps
describing the data format in this buffer
guint64 offset; a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte
in this buffer.
guint64 offset_end; the last offset contained in this buffer. It has the same format as
offset
.
guint8 *malloc_data; a pointer to the allocated memory associated with this buffer. When the buffer is freed, this data will freed with
free().

抱歉!评论已关闭.