gstreamer 一些结构体

本文介绍了GStreamer框架中两个关键的结构体——GstMapInfo和GstBuffer。GstMapInfo用于存储映射操作的结果,包含数据和大小信息。而GstBuffer则是GStreamer中用于处理媒体数据的结构,可以通过相关宏来访问其公共变量。
摘要由CSDN通过智能技术生成

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().
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值