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

sudarshan bisht bisht.sudarshan at gmail.com
Mon Jul 19 07:25:04 CEST 2010


 g_main_loop_quit can be used inside the bus callback handler , once you get
the NULL state of pipeline .


On Mon, Jul 19, 2010 at 10:38 AM, Sandeep Prakash <123sandy at gmail.com>wrote:

>
> Hi,
>
>
> 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
> Explain.
>
>
> 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.
>
>
> Regards,
> Sandeep
> --
> 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.
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Regards,

Sudarshan Bisht
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100719/e3d10e9c/attachment.htm>


More information about the gstreamer-devel mailing list