Can't receive EOS message on bus

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

Can't receive EOS message on bus

Dmitriy Shinkarev
Hello.

I creating pipeline which transform WebRTC stream to hls (webrtcbin as
src, hlssink2 as sink). When i want to stop pipeline i send EOS event to
it, but not receiveng EOS message on bus. I tried to set
'message-forwarding' property on webrtcbin and hlssink2 but this does
not helpd.

Maybe i try to stop pipeline incorrectly. What i doing wrong?


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can't receive EOS message on bus

gotsring
How are you trying to stop it? If you want to stop the entire pipeline, just
send an EOS event to the pipeline element. This will eventually flow down
the pipeline, and it will be picked up by the bus listener. Note that the
pipeline must be playing for the EOS to travel downstream.

// Pipeline creation
GstBus * bus = gst_element_get_bus(pipeline);
int bus_watch_id = gst_bus_add_watch(bus, event_listener, user_data);

// Wherever you want to stop the pipeline, call this, then wait for the
event to travel downstream
gst_element_send_event(pipeline, gst_event_new_eos());


// In the event listener, you can listen for the EOS
switch(GST_MESSAGE_TYPE(msg)) {
    ...
    case GST_MESSAGE_EOS:
        g_print("EOS received!");
        g_main_loop_quit(loop);
}


No need to set message-forwarding unless you want to receive events from a
particular element, I guess if you only want to stop part of a pipeline.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel