我正在使用 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