[英]Issue with creating QtGStreamer pipeline from description
我正在使用Qt GStreamer包裝器,並嘗試如下創建管道:
QGst::ElementPtr bin =
QGst::Bin::fromDescription("videotestsrc ! videoscale
! video/x-raw,width=100,height=100");
但是,當我運行此命令時,出現錯誤:
GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed
terminate called after throwing an instance of 'QGlib::Error'
what(): no element "video"
我認為"/"
存在一些問題,但不確定如何解決。
gstreamer管道具有:
gst-launch-1.0 -v videotestsrc ! videoscale ! video/x-raw,width=100,height=100
! xvimagesink -e --gst-debug-level=3 sync=false
工作正常。
我嘗試通過將引號轉義為:
QGst::ElementPtr bin =
QGst::Bin::fromDescription(\""videotestsrc ! videoscale
! video/x-raw,width=100,height=100\"");
但這給出了:
terminate called after throwing an instance of 'QGlib::Error'
what(): specified empty bin "bin", not allowed
在GStreamer中,這是上限(元素功能)的語法:
video / x-raw,width = 100,height = 100
解析器希望它位於兩個元素之間,以確定它們應如何結合。 它本身不是元素。 如果希望管道解析,則可以在末尾添加一個identity
。 這將產生原始的100x100視頻幀,具有一些不確定的色彩空間。
您可能已經知道,在將接收器連接到該管道之前,該管道不會做任何事情。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.