gstreamermm Gst::ElementInterfaced and Gst::XOverlay cannot be resolved

pjsanfil . pjsanfil at gmail.com
Tue Jun 21 19:30:02 UTC 2016


My code is below. I'm trying to get it to put the video in an existing
window Gtk DrawingArea object. Instead it appears to create a new window
and put the video frames in that window. The same thing happens whether or
not I comment out this code so it appears this code has no effect.

Thanks,
Paul

// this callback is connected to bus->signal_sync_message()
void Camera::onSyncMsg(const Glib::RefPtr<Gst::Message>& msg){
    if(msg->get_message_type() != Gst::MESSAGE_ELEMENT){
        return;
    }
    if(msg->get_structure().has_name("prepare-xwindow-id")){
        std::cout << "prepare-xwindow-id message sent\n";
        //msg->get_source()->set_property("force-aspect-ratio", true);
        Glib::RefPtr<Gst::Element> element =
Glib::RefPtr<Gst::Element>::cast_dynamic(msg->get_source()); // get element
from msg
        Glib::RefPtr<Gst::VideoOverlay> xvid =
Glib::RefPtr<Gst::VideoOverlay>::cast_dynamic(element); // turn element
into overlay
        xvid->set_window_handle(m_xid);
        // TODO this line actually has no effect, I think set_window_handle
is completely wrong function

//Glib::RefPtr<Gst::VideoOverlay>::cast_dynamic(msg->get_source())->set_window_handle(m_xid);
}


On Mon, Jun 20, 2016 at 4:01 PM, Tim Müller <tim at centricular.com> wrote:

> On Mon, 2016-06-20 at 15:37 -0500, pjsanfil wrote:
>
> > I tried using VideoOverlay and then using   set_window_handle(XID);
> > and that compiled but did not work. Once I ran the program the
> > default behavior of creating a new window to put the video stream in
> > occurred. The documentation saying to use XOverlay is in the
> > VideoOverlay class documentation.
> >
>
> The interface got renamed a few years ago in the 0.10 -> 1.x
> transition. It's VideoOverlay, XOverlay no longer exists.
>
> If it does not work, that's a separate issue. It's hard to help without
> further details (e.g. code, what exactly happens vs. expected
> behaviour, etc.).
>
> Cheers
>  -Tim
>
> --
>
> Tim Müller, Centricular Ltd - http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160621/00160ac1/attachment.html>


More information about the gstreamer-devel mailing list