Resuming rtsp stream on receiving EOS signal on message bus using re-connection timer

enthusiastic geek enthusiasticgeek at gmail.com
Thu Feb 7 09:01:34 PST 2013


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.


More information about the gstreamer-devel mailing list