首先妳要建壹個pipeline,然後根據gst-launch後面的插件,建立相應的facotry就行了,類似這樣
source = gst_element_factory_make("filesrc", "filesrc");
return_val_if_fail(source,FALSE);
g_print("Good source Element\n");
GstElement *rtpmp2tdepay = gst_element_factory_make("rtpvp8depay",NULL);
if(!rtpmp2tdepay) {
g_print("rtpmp2tdepay == NULL\n");
}
最後到分流,建立相應的pad,最後設置state