Emulating behavior of gst-launch -e in gst program

Ian Davidson id012c3076 at blueyonder.co.uk
Tue Feb 12 03:54:02 PST 2013


Hi Kris,

I have been looking at your code and I might be about to make a fool of 
myself - but here goes.

You have coded some lines - I'll just quote 2
   int res = 0;
   res &= sigemptyset (&mask);

It is the &= which bothers me.  Since ret starts off as zero, ANDing 
anything to that means that ret will continue to be zero. Shouldn't you 
have used |= ?

Ian

On 09/02/2013 16:45, Krzysztof Konopko wrote:
> On 04/02/13 10:44, Krzysztof Konopko wrote:
>> On 02/02/13 23:39, Tim-Philipp Müller wrote:
>>> On Sat, 2013-02-02 at 16:58 +0000, 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].
>>> Yes, that would indeed be better. However, we'll probably have to keep
>>> the old code for compatibility reasons anyway. Feel free to make a
>>> patch :)
>>>
>>> Cheers
>>>   -Tim
>>>
>> Oh yes, I'd like to grapple with it, although signalfd() is not directly
>> available in all libc implementations, e. g. some uClibc versions do not
>> provide it so need to make a syscall directly (need to roll out
>> autotools/preprocessor machinery to cater for this).
>>
>> Also for SIGSEGV (and probably SIGBUS) still need to use the classic
>> approach (these are some of which signals where originally designed for).
>>
>> So need to give it a bit of thinking in case of gst-launch. In user apps
>> it seems to be of less hassle.
>>
>> Cheers,
>> Kris
>>
>>
> I gave it a go:
> https://bugzilla.gnome.org/show_bug.cgi?id=693481
>
> Cheers,
> Kris
>
>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



More information about the gstreamer-devel mailing list