gs--常见函数说明

个人理解,仅供参考。​​​​​​​
 

按字典结构排序

gst_base_transform_find_transform

//获取src的属性,依据是capstemple跟下一个的sink的caps。
static GstCaps * gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad, GstCaps * caps)
trans为element,pad为element的一端,caps为此pad的属性,得到另一PAD的最可能属性(必须为固定值)。这个函数返回的是能被处理的,而且能被下个元素接受的属性。

gst_caps_is_fixed

gboolean gst_caps_is_fixed (const GstCaps * caps),描述值是否是具体的,不能是范围,或者枚举。
gst_caps_intersect_full
GstCaps * gst_caps_intersect_full (GstCaps * caps1, GstCaps * caps2,GstCapsIntersectMode mode)
得到一个交织,即属于1,也属于2.
GST_CAPS_INTERSECT_FIRST is useful when an element wants topreserve another element's caps priority order when intersecting with its owncaps. Example: If caps1 is [A,B, C] and caps2 is [E, B, D, A], the resultwould be [A, B], maintaining the first caps priority on the intersection.
GST_CAPS_INTERSECT_ZIG_ZAG Zig-zags over both caps.
GST_CAPS_INTERSECT_FIRST Keeps the first caps order.
gst_caps_is_equal
gboolean  gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
检查两个CAPS的集合是否一样。

gst_element_iterate_src_pads

迭代获取所有src类型的pad.

gst_pad_accept_caps
gboolean  
gst_pad_accept_caps(GstPad * pad, GstCaps * caps)
检测PAD能否接受CAPS,最终还还是调用gst_base_transform_acceptcaps(acceptfunc = GST_PAD_ACCEPTCAPSFUNC (pad);),最终调用的是gst_base_transform_acceptcaps_default。

gst_pad_get_caps
GstCaps * gst_pad_get_caps (GstPad * pad)
得到这个PAD能够产生或者处理的CAPS。
gst_pad_get_allowed_caps

GstCaps * gst_pad_get_allowed_caps (GstPad * pad), 允许通过的CAPS,PAD跟PEER都能接收。

gst_pad_set_caps

 gboolean gst_pad_set_caps (GstPad * pad, GstCaps * caps), 给pad设置CAPS,如果一样就不用设置了,如果不一样,调用gst_base_transform_configure_caps(setcaps = GST_PAD_SETCAPSFUNC (pad);)进行设置,

在gst_base_transform_configure_caps中,还对另一端的PAD进行设置(调用gst_pad_set_caps )。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

山西茄子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值