[vlc-devel] [RFC] -- improving the art files user experience ....

brezhoneg1 brezhoneg1 at yahoo.fr
Mon Jan 28 16:26:35 CET 2013

Hi team,

    A while ago, the image demux was rewritten from scratch, and fenrir 
implemented a clean and very efficient content-based detection to 
replace the usual detection based on file extensions.

    One place where this content-based detection would be very useful is 
the art file cache. While trying to debug the skins2 interface to ensure 
that art files be properly displayed, I realized that a fair amount of 
art files would not display because of broken extensions. (Most of them 
with no extension at all, and a few of them with a JPEG content within a 
file with a .png extension, ....). For my test case, these ''broken" 
files amounted to roughly 30% or 40% of the total cache.

    So, I just duplicated fenrir's content-based detection code into vlc 
core (src/misc/image.c) and __ALL__ art files would then be displayed 
without any problem.

    As a note, the qt4 interface did a slightly better job using a 
QPixmap. This Qt class seems to be extension-based if an extension is 
provided (a JPEG content with a .png extension would not display), and 
content-based if there is no extension (those would display fine).

    So, the question, is : Would it be ok to move this content-based 
detection at the vlc core (src/misc/image.c) so that it can be used 
throughout vlc whenever a still image needs to be read ? Or, any other 
means to benefit from this detection  ?


More information about the vlc-devel mailing list