widget overlaying autovidesink

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

widget overlaying autovidesink

Nikola
Hello,

has anyone successfully overplayed widget over autovideosink.

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: widget overlaying autovidesink

Nicolas Dufresne-5
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: widget overlaying autovidesink

Nikola
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\"")


 Should I use it in different way? 


Kind regards,
Nikola.




On Wed, Sep 6, 2017 at 6:35 PM, Nicolas Dufresne <[hidden email]> 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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
God is Real, unless declared Integer.
J. Allan Toogood, FORTRAN programmer

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel