Created attachment 2874 proposed patch Hi, I implemented a video thumbnailer for tumbler using libffmpegthumbnailer (<http://code.google.com/p/ffmpegthumbnailer/>). Ffmpegthumbnailer binary is used by thunar-thumbnailers, so I thought it might be a good idea to use its lib for tumbler. The patch is against git master, and I tested it with tumbler 0.1.1, and it worked fine here (root & removable drives). It can surely still be improved: * it's the first time I use gobjects/gio, so I probably over complicated myself, or made basic mistakes ;) * supported mimetypes are hardcoded (taken from thunar-thumbnailers). I couldn't figure out an easy way to get them manually, except testing "video/*" with g_content_type_is_a () on all types returned by g_content_types_get_registered (), which seems to be overkill; * libffmpegthumbnailer doesn't support uris (with special characters encoded), so I had to convert them to a path with g_file_get_path (), so I don't know if it works on network/special filesystems (but I'm not sure either it's an issue); * probably other problems I missed... Thanks!
Ah, and the namespace chosen can probably be improved... (I wanted to use video_thumbnailer instead of ffmpeg_thumbnailer, but libffmpegthumbnailer API defines video_thumbnailer_create () and video_thumbnailer_destroy (), which would have created name conflicts otherwise...)
Great work! I'll be testing the patch in a few minutes. One thing I wonder is: can we somehow detect supported video types/formats at runtime instead of hardcoding them?
I just committed the patch: commit 2621ee8d1db623ef28f8b4aabd7fb246f9e8991e Author: Lionel Le Folgoc <mrpouit@ubuntu.com> Date: Sat Mar 6 00:21:47 2010 +0100 Add a video thumbnailer (using libffmpegthumbnailer). Signed-off-by: Jannis Pohlmann <jannis@xfce.org>