1
我嘗試創建x264enc:如果我刪除線並不是所有的元素可以創建(x264enc或TIVidEnc1?)
int main (int argc, char *argv[]) {
GstElement *pipeline, *src, *enc, *rtp, *sink;
...
...
src = gst_element_factory_make ("videotestsrc", "src");
enc = gst_element_factory_make ("x264enc", "enc");
rtp = gst_element_factory_make ("rtph264pay", "rtp");
sink = gst_element_factory_make ("udpsink", "sink");
pipeline = gst_pipeline_new ("test-pipeline");
if (!pipeline || !src || !enc || !rtp || !sink ) {
g_printerr ("Not all elements could be created.\n");
return -1;
}
}
:
enc = gst_element_factory_make ("x264enc", "enc");
程序會運行
和如果我運行命令
gst-inspect x264enc
我得到的編碼信息,所以它存在..
我也試圖從「x264enc」到「TIVidEnc1」
任何想法改變..? 謝謝