参考:
总结:
GstStructure 是一个键值对结构,每一个GstStructure 都只有一个 key 和一个 value , key 是 GQuark 类型,value 是 GType 类型。
/**
* GstStructure:
* @type: the GType of a structure
*
* The GstStructure object. Most fields are private.
*/
struct _GstStructure {
GType type;
/*< private >*/
GQuark name;
};
创建 GstStructure 的时候可以一次性传入很多 键值对,gstreamer内部会依次创建 GstStructure 然后把他们连起来,然后把这些创建好的 GstStructure 对象归纳到一个 GstStructureImpl 内部,同时给 GstStructureImpl 一个 name。
typedef struct
{
GstStructure s;
/* owned by parent structure, NULL if no parent */
gint *parent_refcount;
GArray *fields;
} GstStructureImpl;
具体的用法见参考连接。