我正在使用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发布于 2016-05-31 13:24:15
在GStreamer中,这是caps的语法(元素功能):
视频/x-原始,width=100,height=100
解析器希望它位于两个元素之间,以确定它们应该如何连接。它本身并不是一个元素。如果要解析管道,可以在末尾添加一个identity。这将产生原始的100x100视频帧,一些未确定的颜色空间。
正如你可能知道的那样,除非你把一个水槽连接到管道上,否则管道什么也做不了。
https://stackoverflow.com/questions/37533639
复制相似问题