【问题标题】:linux gst_element_factory_make ("rtspsrc", NULL) fails on qt5linux gst_element_factory_make ("rtspsrc", NULL) 在 qt5 上失败
【发布时间】:2015-04-13 01:19:13
【问题描述】:

我的问题是,为什么gst_element_factory_make ("rtspsrc", NULL) 每次都失败?我在 Ubuntu 14.04 上使用 Qt5。 我试过gst_element_factory_find ("rtspsrc")成功了, 我也试过了

  • gst-ispect rtspsrc
  • gst-inspect-0.10 rtspsrc
  • gst-inspect-1.0 rtspsrc

一切顺利

这是我找到的链接 on tiku.ioon stackoverflow,在quabr.com 上,我尝试按照说明进行操作,但出现相同的错误:

GStreamer-CRITICAL **:gst_bus_timed_pop_filtered:断言 “GST_IS_BUS(总线)”失败。

只有到了执行gst_element_factory_make ("rtspsrc", NULL)的时候才会出现这个错误。

我尝试创建(成功))

gst_element_factory_make ("uridecodebin", NULL)
gst_element_factory_make ("fakesrc", NULL)
gst_element_factory_make ("v4l2src", NULL)

我没有出错。

这是我的 .pro 文件内容:

配置 += 链接_pkgconfig PKGCONFIG += \ gstreamer-0.10 \ gstreamer-base-0.10 \ gstreamer-interfaces-0.10 \ gstreamer-audio-0.10\ gstreamer-视频-0.10 \ gstreamer-app-0.10 \ gstreamer-rtsp-0.10 \ gstreamer-rtp-0.10 配置 -= app_bundle 库 += -pthread \ -lgstrtsp-0.10 \ -lgstrtp-0.10 \ -lgstreamer-0.10 \ -lgstsdp-0.10 \ -lgobject-2.0 \ -lgmodule-2.0 \ -lgthread-2.0 \ -lxml2\ -lglib-2.0 QMAKE_CXXFLAGS += -fpermissive

但我的问题仍然存在。 任何帮助将不胜感激。

谢谢

【问题讨论】:

  • 您能否粘贴调用 gst_element_factory_make 之前存在的设置代码?

标签: linux qt5 gstreamer rtsp


【解决方案1】:

经过几个小时的挖掘,我终于找到了答案。 这与 rtspsrc 无关。

事实上,我必须使用 gstreamer-0.10,我尝试使用该版本创建 avdec_h264 元素,而不是 gstreamer-1.0。

但我终于转向 ffdec_h264,它是 gstreamer-0.10 的一个元素,并且......我的程序现在运行起来就像一个魅力。

gst_element_factory_make ("avdec_h264", NULL) // 给了我 gstreame-0.10 的错误 gst_element_factory_make ("ffdec_h264", NULL) // 与 gstreamer-0.10 一起使用的正确元素

谢谢mpr。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-29
    • 2013-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多