Qurl gst-pipeline error - DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x800c000d()
-
For Windows 10 platform, I am trying to play udp network video stream using QMediaPlayer and setmedia. I am using QUrl and gst-pipeline to decode video stream. I have added code snippet below. I am able to build successfully, but gives below error during run.
Error in Qt Application Output: DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x800c000d()
mainwindow.cpp code snippet :
QMediaPlayer* player = new QMediaPlayer; QVideoWidget* vw = new QVideoWidget; player->setVideoOutput(vw); player->setMedia(QUrl("gst-pipeline: udpsrc port=60004 ! tsdemux name=demuxer demuxer. ! queue ! h264parse ! decodebin ! queue ! videoconvert ! videoscale ! autovideosink")); vw->setGeometry(100,100,300,400); vw->show(); player->play();
.pro:
QT += core gui widgets multimedia multimediawidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets INCLUDEPATH += C:\gstreamer\1.0\x86\include\ C:\gstreamer\1.0\x86\include\gstreamer-1.0\ C:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\ C:\gstreamer\1.0\x86\include\glib-2.0\ C:\gstreamer\1.0\x86\include\glib-2.0\glib\ C:\gstreamer\1.0\x86\lib\glib-2.0\include DEPENDPATH += C:\gstreamer\1.0\x86\lib\ LIBS += C:\gstreamer\1.0\x86\lib\gstreamer-1.0.lib C:\gstreamer\1.0\x86\lib\glib-2.0.lib #LIBS += -lglib-2.0 -lwindpthread -lgstreamer-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 #LIBS += -lgstvideo-1.0 CONFIG += c++11 link_pkgconfig PKGCONFIG+= gstreamer-1.0 \ glib-2.0 \ gobject-2.0 \ gio-2.0 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
I have used Desktop Qt 5.12.11 MinGW 64-bit kit. Gstreamer is installed in the system.
Please share solution if anyone has already faced such issue.
-
Hi and welcome to devnet,
Did you build the QtMultimedia GStreamer backend ?
-
For Windows 10 platform, I am trying to play udp network video stream using QMediaPlayer and setmedia. I am using QUrl and gst-pipeline to decode video stream. I have added code snippet below. I am able to build successfully, but gives below error during run.
Error in Qt Application Output: DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x800c000d()
mainwindow.cpp code snippet :
QMediaPlayer* player = new QMediaPlayer; QVideoWidget* vw = new QVideoWidget; player->setVideoOutput(vw); player->setMedia(QUrl("gst-pipeline: udpsrc port=60004 ! tsdemux name=demuxer demuxer. ! queue ! h264parse ! decodebin ! queue ! videoconvert ! videoscale ! autovideosink")); vw->setGeometry(100,100,300,400); vw->show(); player->play();
.pro:
QT += core gui widgets multimedia multimediawidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets INCLUDEPATH += C:\gstreamer\1.0\x86\include\ C:\gstreamer\1.0\x86\include\gstreamer-1.0\ C:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\ C:\gstreamer\1.0\x86\include\glib-2.0\ C:\gstreamer\1.0\x86\include\glib-2.0\glib\ C:\gstreamer\1.0\x86\lib\glib-2.0\include DEPENDPATH += C:\gstreamer\1.0\x86\lib\ LIBS += C:\gstreamer\1.0\x86\lib\gstreamer-1.0.lib C:\gstreamer\1.0\x86\lib\glib-2.0.lib #LIBS += -lglib-2.0 -lwindpthread -lgstreamer-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 #LIBS += -lgstvideo-1.0 CONFIG += c++11 link_pkgconfig PKGCONFIG+= gstreamer-1.0 \ glib-2.0 \ gobject-2.0 \ gio-2.0 # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp HEADERS += \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target
I have used Desktop Qt 5.12.11 MinGW 64-bit kit. Gstreamer is installed in the system.
Please share solution if anyone has already faced such issue.
-
@SGaist ,
I want to play video, received through udp network stream. I am receiving video in TS format over udp. I want to play it in Qt's window for Windows10 platform. Please advise the possible solutions. I have installed gstreamer in the system. Then how to build QtMultimedia gstreamer backend ? Any other solution to play udp network video stream for windows platform ?