/* Copyright Rafaël Carré (licence WTFPL) */ /* A video thumbnailer compatible with nautilus */ /* Copyright © 2007-2011 Rafaël Carré */ /* Works with : libvlc 2.0.0 gcc -pedantic -Wall -Werror -Wextra `pkg-config --cflags --libs libvlc` -lpthread # to register the thumbnailer on gnome 3.x: cp vlc-thumb.thumbnailer /usr/share/thumbnailers # to register the thumbnailer on gnome 2.x: list=`grep ^Mime vlc.desktop|cut -d= -f2-|sed -e s/";"/\\\n/g -e s,/,@,g` vid=`echo $mimes|grep ^vid` for i in $vid do key=/desktop/gnome/thumbnailers/$i/enable gconftool-2 -t boolean -s $key true gconftool-2 -t string -s $key "vlc-thumb -s %s %u %o" done */ #include #include #include #include #include #include #include #include #include #if !defined (_POSIX_CLOCK_SELECTION) # define _POSIX_CLOCK_SELECTION (-1) #endif #if (_POSIX_CLOCK_SELECTION < 0) # error Clock selection is not available! #endif #include /* position at which the snapshot is taken */ #define VLC_THUMBNAIL_POSITION (30./100.) static void usage(const char *name, int ret) { fprintf(stderr, "Usage: %s [-s width]