Emulating behavior of gst-launch -e in gst program

Ian Davidson id012c3076 at blueyonder.co.uk
Sun Feb 3 08:17:11 PST 2013


Thanks for those links Kris,

For years, I've been teaching 'Event Based Programming', giving the 
example of

    You set your alarm
    You go to sleep
    You get up when the alarm rings


I have been criticising students who wrote code which went

    Set the alarm
    Keep one eye on the alarm, waiting for it to go off.


Now, it seems, that thanks to a feature in the design of Unix, I have to 
do just that.

Ah well.  At least I know what I am trying to prevent.

Ian

On 02/02/2013 16:58, Krzysztof Konopko wrote:
> I think that gst-launch doesn't take the best approach to signal
> handling.  Use signalfd instead [1]. An example might be useful [2].
>
> You get a file descriptor which you can watch it with g_io_add_watch()
> [3]. See the example [4]
>
> [1] http://linux.die.net/man/2/signalfd
> [2] http://kriscience.blogspot.co.uk/2013/02/handling-posix-signals.html
> [3] http://developer.gnome.org/glib/stable/glib-IO-Channels.html
> [4]
> http://kriscience.blogspot.co.uk/2012/12/reading-standard-input-from-gmainloop.html
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130203/e78209c1/attachment.html>


More information about the gstreamer-devel mailing list