widget overlaying autovidesink
Nikola
nikola1010 at gmail.com
Wed Sep 6 19:47:47 UTC 2017
Thank you for your response.
I didn't know this is possibility in QT.
Only thing which is confusing now is how to implement this.
I have looked at examples around but I didn't get the general idea.
Currently I am showing video by using following code:
----
void GstPlayer::playRTP(int port) {
m_pipeline = QGst::Pipeline::create();
QString rtpPipeDescription01 = QString("udpsrc port=\"%1\" ! "
"application/x-rtp,
encoding-name=JPEG,payload=26 ! "
"rtpjpegdepay ! "
"jpegdec ! "
"autovideosink").arg(port);
try {
m_pipeline =
QGst::Parse::launch(rtpPipeDescription01).dynamicCast<QGst::Pipeline>();
} catch (const QGlib::Error & error) {
qCritical() << error;
qFatal("One or more elements are missing");
}
watchPipeline(m_pipeline);
m_pipeline->setState(QGst::StatePlaying);
}
-----
First this class would be instantiated.
On the qtdesigner I would add widget and promote it to this class, and then
play would be called with designated port.
I have tried to use several sinks instead of autovideosink: qtvideosink",
"qtglvideosink" , "qwidgetvideosink" (or "qt5videosink", "qt5glvideosink"
and "qwidget5videosink" in Qt5) but all are reported as not present
(example: "no element \"qwidget5videosink\"")
Found them on this page:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/classQGst_1_1Ui_1_1VideoWidget.html
Should I use it in different way?
Kind regards,
Nikola.
On Wed, Sep 6, 2017 at 6:35 PM, Nicolas Dufresne <nicolas at ndufresne.ca>
wrote:
> Le mercredi 06 septembre 2017 à 16:45 +0200, Nikola a écrit :
> > Hello,
> >
> > has anyone successfully overplayed widget over autovideosink.
>
> This is not possible in a portable way. On X11 you could place semi-
> transparent window on top with your controls, but this is not possible
> on wayland.
>
> In general best is to use a specific videosink for your application
> widget system. For QT you could maybe try qmlglsink. It will use a GL
> rendererer, and the display will be just like any other widget.
> >
> > Setup includes testing videosource which broadcasts over udp to
> > udpsink.
> >
> > I am trying to do exactly that in Qt 5.8 on windows but when I start
> > video widget gets overwritten.
> > Are there any examples of this, especially because this seems pretty
> > standard task to most things done with video playing.
> >
> >
> > Kind regards,
> > Nikola.
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
--
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170906/e29ef666/attachment.html>
More information about the gstreamer-devel
mailing list