[gst-devel] How control state of a video streaming pipeline & g_main_loop_run()

Sandeep Prakash 123sandy at gmail.com
Mon Jul 19 07:08:35 CEST 2010


djlorenzoc wrote:
>  /* we add all elements into the pipeline */
>   gst_bin_add_many (GST_BIN (pipeline),
>                     source, videorate, filter, encoder, payloader, sink,
> NULL);
>   gst_element_link_many (source, videorate, filter, encoder, payloader,
> sink, NULL); 
What is the role of the "filter" element here?

djlorenzoc wrote:
> I want to control its state from an external program,but I saw that
> g_main_loop_run() blocks the execution of the pipe.
By external program you mean from a different process launched from the same
application, or a completely different program, or a different thread?? Plz

djlorenzoc wrote:
> 1) Control the state of the pipe: when I want to stop stream I set the
> pipe to the READY state; when I want to stream I set it to PLAY. I think
> that in this way I reduce the launch time of the pipe. Is it exactly?
> Have I to add a bus? Can anyone suggest me a possible solution?
You can add a bus watch as follows:
gboolean bus_call(GstBus *bus, GstMessage *msg, gpointer data)
bus = gst_pipeline_get_bus (GST_PIPELINE(pipeline));
gst_bus_add_watch (bus, bus_call, NULL);
gst_object_unref (bus);

djlorenzoc wrote:
> 2) Launch a g_main_loop_quit. 
> What do you think about? Is it possible to do that? 
Not sure what is "Launching a g_main_loop_quit" is? Plz Explain.

View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-control-state-of-a-video-streaming-pipeline-g-main-loop-run-tp2292629p2293553.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

More information about the gstreamer-devel mailing list