[vlc-devel] [PATCH 1/3] lib: Add libvlc_picture API

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Oct 10 11:32:31 CEST 2018


On Mon, Oct 8, 2018, at 5:45 PM, Rémi Denis-Courmont wrote:
> Le perjantaina 5. lokakuuta 2018, 17.37.54 EEST Hugo Beauzée-Luyssen a écrit :
> > +/**
> > + * Saves this picture to a file. The image format is the same as the one
> > + * returned by \link libvlc_picture_type \endlink
> > + *
> > + * \param p_pic A picture object
> > + * \param psz_path The path to the generated file
> > + * \return 0 in case of success, -1 otherwise
> > + */
> > +LIBVLC_API int
> > +libvlc_picture_save( const libvlc_picture_t* p_pic, const char* psz_path );
> 
> How do you handle the security and functional implications here? I would 
> rather move the problem to the application and have LibVLC write to an already 
> open file handle, frankly.
> 

Hi,

To be fair I was aiming at something like libvlc_video_take_snapshot, which would just fail if the path isn't valid/accessible, and I'd like to keep at least a way to pass a file for convenience. I suppose I can add a variant that takes a FILE*, would that be OK?

Regards,

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list