簡體   English   中英

從 static pad 模板 [GStreamer pipeline] 創建 gst pad

[英]Create a gst pad from a static pad template [GStreamer pipeline]

您好,我正在嘗試從 static 墊模板創建流光墊。

迄今為止,

  1. 我創建了一個具有正確元素名稱的接收器工廠sink_factory = gst_element_factory_find("elementName");
  2. 我檢索了 static 墊模板列表(來自gst_element_factory_get_static_pad_templates ),基於方向和存在我從列表中找到了墊(靜態模板)並保存在變量中( GstStaticPadTemplate *padtemplate

現在我想從 static pad 模板創建一個 pad 模板,我找到了這個 function

GstPadTemplate *
gst_pad_template_new_from_static_pad_template_with_gtype (GstStaticPadTemplate * pad_template,
                                                          GType pad_type)

我打算將其與gst_element_request_pad一起使用,如下所示

GstPad *
gst_element_request_pad (GstElement * element,
                         GstPadTemplate * templ,
                         const gchar * name,
                         const GstCaps * caps)

我的問題是我不太確定如何處理GType pad_type 我找不到任何應用程序來解決這個問題。

干杯,加寧杜。

聚苯乙烯

我知道gst_element_request_pad_simplegst_element_get_request_pad

簡單的答案:

 GType pad_type;
 pad_type = GST_TYPE_PAD;

上下文:我只是查找了源代碼並發現了這個斷言

  g_return_val_if_fail (g_type_is_a (pad_type, GST_TYPE_PAD), NULL);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM