Resuming rtsp stream on receiving EOS signal on message bus using re-connection timer
Federico Zamperini
fzamperini at tiscali.it
Thu Feb 7 09:17:05 PST 2013
One thing I noticed is that you don't check the return value from
setStatus; while I experienced that setting the state to NULL is always
synchronized (i.e. it blocks your thread's flow), setting it to the
PLAYING state returns ASYNC. In such case you will be notified that the
pipeline is started on the bus (GST_MESSAGE_STATE_CHANGED).
Il 07/02/2013 18:01, enthusiastic geek ha scritto:
> I am presenting my re initialization code below, which should be self
> explanatory
>
> The following routine is called at the very beginning once
>
> void VideoBroadcast::initializeStream(uint32_t index)
> {
> app->loop_[index] = Glib::MainLoop::create();
> this->initializeStreamData(index);
> }
>
>
> // The following function is called in the timeout callback if the stream is
> inactive
>
>
> void VideoBroadcast::initializeStreamData(uint32_t index)
> {
> app->pipeline_[index] = Glib::RefPtr<Gst::Pipeline>::cast_dynamic(
> Gst::Parse::launch(app->launch_string_[index]) );
> g_assert (app->pipeline_[index]);
> app->bus_[index] = app->pipeline_[index]->get_bus();
> g_assert (app->bus_[index]);
> app->bus_[index]->add_watch(sigc::bind(sigc::mem_fun(*this,
> &VideoBroadcast::on_bus_message), app->loop_[index], index));
> this->setStreamStatus(index, true); // Set the stream status to active
> //TODO (enthusiasticgeek) In the production code replace 'true' with
> something better
> this->playStream(index);
> }
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Resuming-rtsp-stream-on-receiving-EOS-signal-on-message-bus-using-re-connection-timer-tp4658402p4658421.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list