linux gst_element_factory_make(“rtspsrc”,NULL)在qt5上失败

时间:2022-09-08 19:56:53

My problem is, why does gst_element_factory_make ("rtspsrc", NULL) fails every times? I use Qt5 on Ubuntu 14.04. I tried gst_element_factory_find ("rtspsrc") with success, I also tried

我的问题是,为什么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

and all successfully

一切顺利

here are link I found on tiku.io, on *, on quabr.com and I tried to follow instructions, but have the same error:

这里是我在tiku.io上发现的链接,在*上,在quabr.com上,我试图按照说明操作,但是有相同的错误:

GStreamer-CRITICAL **: gst_bus_timed_pop_filtered: assertion 'GST_IS_BUS (bus)' failed.

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

The error occur only when it is time to execute gst_element_factory_make ("rtspsrc", NULL).

只有在执行gst_element_factory_make(“rtspsrc”,NULL)时才会发生错误。

I tried to create (successfully) )

我试图创建(成功))

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

and I got no error.

我没有错

here is my .pro file content:

这是我的.pro文件内容:

CONFIG += link_pkgconfig

PKGCONFIG += \
    gstreamer-0.10 \ 
    gstreamer-base-0.10 \
    gstreamer-interfaces-0.10 \
    gstreamer-audio-0.10 \
    gstreamer-video-0.10 \
    gstreamer-app-0.10 \
    gstreamer-rtsp-0.10 \
    gstreamer-rtp-0.10 

CONFIG   -= app_bundle

LIBS += -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

but my problem still there. Any help would be apprecied.

但我的问题仍然存在。任何帮助都会得到认可。

Thanks

1 个解决方案

#1


0  

After several hours digging my head, I finally found the answer. it was not about rtspsrc.

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

in fact, I had to use gstreamer-0.10, and I tried to create avdec_h264 element with that version, instead of gstreamer-1.0.

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

But I finally move to ffdec_h264, wich is an element of gstreamer-0.10, and ... My program now runs like a charm.

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

gst_element_factory_make ("avdec_h264", NULL) // gave me the error with gstreame-0.10
gst_element_factory_make ("ffdec_h264", NULL) //  Right element to use with gstreamer-0.10

Thanks mpr.

#1


0  

After several hours digging my head, I finally found the answer. it was not about rtspsrc.

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

in fact, I had to use gstreamer-0.10, and I tried to create avdec_h264 element with that version, instead of gstreamer-1.0.

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

But I finally move to ffdec_h264, wich is an element of gstreamer-0.10, and ... My program now runs like a charm.

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

gst_element_factory_make ("avdec_h264", NULL) // gave me the error with gstreame-0.10
gst_element_factory_make ("ffdec_h264", NULL) //  Right element to use with gstreamer-0.10

Thanks mpr.