[vlc-devel] [Patch] Send an event even when snapshot failed

Laurent Aimar fenrir at via.ecp.fr
Mon Jan 18 10:31:57 CET 2010


Hi,

On Mon, Jan 18, 2010, Hugo Beauzee-Luyssen wrote:
> On Mon, Jan 18, 2010 at 10:21 AM, Rafaël Carré <rafael.carre at gmail.com> wrote:
> > On Mon, 18 Jan 2010 10:07:59 +0100
> > Hugo Beauzee-Luyssen <beauze.h at gmail.com> wrote:
> >
> >> On Mon, Jan 18, 2010 at 5:51 AM, Rafaël Carré
> >> <rafael.carre at gmail.com> wrote:
> >> > Le 18/01/10 01:34, Hugo Beauzee-Luyssen a écrit :
> >> >
> >> >> I know the string "(null)" is kinda dirty
> >> >
> >> > printf("%s\n", NULL); shows "(null") with glibc and OSX' libc, but
> >> > crashes when using other libcs so it's not correct.
> >> >
> >>
> >> I'm not sure I understand what you mean, is your point to say that
> >> using a NULL pointer to notify the snapshot failure is wrong ?
> >
> > "(null)" is not a NULL pointer
> >
> >> In that case what do you offer as an alternative ? I really don't feel
> >> like returning "invalid-snapshot" as snapshot filename.
> >
> > If "snapshot-file" variable is set to "(null)" you need to fix the bug,
> > not workaround it
> >
> 
> I don't think you understant me.
> I explicitely set a string to "(null)" because I can't use the NULL
> pointer, as it will be replaced by an empty string, and I don't want
> to rely on an empty string to detect an error.
> I do know that "(null)" isn't a NULL pointer, but maybe I was a bit
> confusing in my explanations.
> This patch is just about having a feedback when a snapshot fails.
 If it is to retreive a feedback when using libvlc_video_take_snapshot(), it
might then be better to modify this function directly.
 VoutSaveSnapshot will probably need to be changed and exported though.

Regards,

-- 
fenrir




More information about the vlc-devel mailing list