|
List Info
Thread: Stopping playback
|
|
| Stopping playback |

|
2007-02-07 11:57:28 |
|
Hi
I'm writing an application where I might need to interrupt playback. From what I've read I'm supposed to change the state with gst_element_set_state (pipeline, GST_STATE_NULL); but I'm unable to because
g_main_loop_run (loop); is blocking. How can I solve this? Can I throw the call g_main_loop_run (loop); into another thread or something?
Regards Christoffer Nyborg
|
| Re: Stopping playback |
  Finland |
2007-02-08 13:01:13 |
hi,
Christoffer Nyborg wrote:
> Hi
>
> I'm writing an application where I might need to
interrupt playback.
> From what I've read I'm supposed to change the state
with
> gst_element_set_state (pipeline, GST_STATE_NULL);
> but I'm unable to because
> g_main_loop_run (loop);
> is blocking. How can I solve this? Can I throw the
call
> g_main_loop_run (loop);
> into another thread or something?
>
Once the mainloop run, all signal handlers will be
triggered. E.g. if you run a
UI, you can do the
gst_element_set_state (pipeline, GST_STATE_NULL);
call, when the user presses a button. If you do a
commandline application, you
have to handle that on your own.
>
> Regards
> Christoffer Nyborg
>
Stefan
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
| Re: Stopping playback |

|
2007-02-08 15:16:32 |
|
Hi again, thanks for the reply.
On 2/8/07, Stefan Kost < ensonic hora-obscura.de">ensonic hora-obscura.de> wrote:
hi, Christoffer Nyborg wrote: > Hi > > I'm writing an application where I might need to interrupt playback. > From what I've read I'm supposed to change the state with > gst_element_set_state (pipeline, GST_STATE_NULL);
> but I'm unable to because > g_main_loop_run (loop); > is blocking. How can I solve this? Can I throw the call > g_main_loop_run (loop); > into another thread or something? > Once the mainloop run, all signal handlers will be triggered.
E.g. if you run a UI, you can do the gst_element_set_state (pipeline, GST_STATE_NULL); call, when the user presses a button. If you do a commandline application, you have to handle that on your own.
Yes, because I'm developing a command line application that is my problem, I don't know how to handle it. If anyone have a suggestion I'd greatly appreciate it.
> > Regards > Christoffer Nyborg > Stefan
Regards Christoffer Nyborg
|
| Re: Stopping playback |

|
2007-02-08 16:05:20 |
On 2/8/07, Christoffer Nyborg <christoffer.nyborg gmail.com> wrote:
> Hi again, thanks for the reply.
>
> On 2/8/07, Stefan Kost <ensonic hora-obscura.de> wrote:
> > hi,
> > Christoffer Nyborg wrote:
> > > Hi
> > >
> > > I'm writing an application where I might need
to interrupt playback.
> > > From what I've read I'm supposed to change
the state with
> > > gst_element_set_state (pipeline,
GST_STATE_NULL);
> > > but I'm unable to because
> > > g_main_loop_run (loop);
> > > is blocking. How can I solve this? Can I
throw the call
> > > g_main_loop_run (loop);
> > > into another thread or something?
> > >
> > Once the mainloop run, all signal handlers will be
triggered. E.g. if you
> run a
> > UI, you can do the
> > gst_element_set_state (pipeline, GST_STATE_NULL);
> > call, when the user presses a button. If you do a
commandline application,
> you
> > have to handle that on your own.
>
>
> Yes, because I'm developing a command line application
that is my problem, I
> don't know how to handle it.
> If anyone have a suggestion I'd greatly appreciate it.
You could try adding a glib IO channel connected to stdin to
the glib main loop:
http://developer.gnome.org/doc/API/2.0/glib/gli
b-IO-Channels.html
see g_io_add_watch().
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|