[Goodies-commits] r2889 - in thunar-thumbnailers/trunk: . ogg-thumbnailer

Erlend Davidson erland at xfce.org
Wed Jul 4 23:45:44 CEST 2007


Author: erland
Date: 2007-07-04 21:45:44 +0000 (Wed, 04 Jul 2007)
New Revision: 2889

Added:
   thunar-thumbnailers/trunk/ogg-thumbnailer/
   thunar-thumbnailers/trunk/ogg-thumbnailer/Makefile.am
   thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer
   thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer.desktop.in
Modified:
   thunar-thumbnailers/trunk/ChangeLog
   thunar-thumbnailers/trunk/Makefile.am
   thunar-thumbnailers/trunk/configure.in.in
Log:
Added a new Ogg thumbnailer (bug #3183) which will be enabled when ffmpeg thumbnailer is.

Modified: thunar-thumbnailers/trunk/ChangeLog
===================================================================
--- thunar-thumbnailers/trunk/ChangeLog	2007-07-04 21:18:32 UTC (rev 2888)
+++ thunar-thumbnailers/trunk/ChangeLog	2007-07-04 21:45:44 UTC (rev 2889)
@@ -1,3 +1,7 @@
+2007-07-04	Erlend Davidson <E.R.M.Davidson at sms.ed.ac.uk>
+
+	* Added a new Ogg Thumbnailer which is enabled whenever ffmpeg-thumbnailer is (bug #3183)
+
 2007-05-25	Erlend Davidson <E.R.M.Davidson at sms.ed.ac.uk>
 
 	* Added copyright information to source files (as per bug #3209)

Modified: thunar-thumbnailers/trunk/Makefile.am
===================================================================
--- thunar-thumbnailers/trunk/Makefile.am	2007-07-04 21:18:32 UTC (rev 2888)
+++ thunar-thumbnailers/trunk/Makefile.am	2007-07-04 21:45:44 UTC (rev 2889)
@@ -8,6 +8,7 @@
 	fig-thumbnailer							\
 	agr-thumbnailer							\
 	ffmpeg-thumbnailer						\
+	ogg-thumbnailer							\
 	mime
 
 distclean-local:

Modified: thunar-thumbnailers/trunk/configure.in.in
===================================================================
--- thunar-thumbnailers/trunk/configure.in.in	2007-07-04 21:18:32 UTC (rev 2888)
+++ thunar-thumbnailers/trunk/configure.in.in	2007-07-04 21:45:44 UTC (rev 2889)
@@ -112,5 +112,6 @@
 fig-thumbnailer/Makefile
 agr-thumbnailer/Makefile
 ffmpeg-thumbnailer/Makefile
+ogg-thumbnailer/Makefile
 mime/Makefile
 ])

Added: thunar-thumbnailers/trunk/ogg-thumbnailer/Makefile.am
===================================================================
--- thunar-thumbnailers/trunk/ogg-thumbnailer/Makefile.am	                        (rev 0)
+++ thunar-thumbnailers/trunk/ogg-thumbnailer/Makefile.am	2007-07-04 21:45:44 UTC (rev 2889)
@@ -0,0 +1,21 @@
+# $Id: Makefile.am 2296 2007-01-03 11:30:08Z benny $
+
+if ENABLE_FFMPEG
+    libexec_SCRIPTS=ogg-thumbnailer
+    desktop_in_files=ogg-thumbnailer.desktop.in
+endif
+
+desktopdir = $(datadir)/thumbnailers
+
+%.desktop: %.desktop.in
+	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+EXTRA_DIST =								\
+	$(desktop_in_files)						\
+	$(libexec_SCRIPTS)
+
+DISTCLEANFILES =							\
+	$(desktop_DATA)
+
+# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

Added: thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer
===================================================================
--- thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer	                        (rev 0)
+++ thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer	2007-07-04 21:45:44 UTC (rev 2889)
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+#  Copyright 2007 Erlend Davidson <Erlend.Davidson at gmail.com>
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU Library General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ffmpeg-thumbnailer - thumbnailer script for OGG files.
+#
+# Usage: ffmpeg-thumbnailer video-file png-file size
+#
+
+# command line parameters
+ifile=$1
+ofile=$2
+size=$3
+
+# The trouble with ogg files is that both audio and video files have
+# the mimetype application/ogg.  This makes is difficult to tell them apart
+# in a filemanager.  This thumbnailer is run for all application/ogg files,
+# and then checks if it contains a video stream.  If so ffmpegthumbnailer is invoked.
+isTheora=`hexdump -e '1/1 "%_c"' -n 40 "${ifile}" | grep -c theora`
+
+if [ $isTheora -gt 0 ]
+then
+    exec ffmpegthumbnailer -i "${ifile}" -o "${ofile}" -s "${size}" -f -t 15
+fi
+
+exit 1 # not video => tell thunar thumbnail generation wasn't successful
+ 
\ No newline at end of file


Property changes on: thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer
___________________________________________________________________
Name: svn:executable
   + *

Added: thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer.desktop.in
===================================================================
--- thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer.desktop.in	                        (rev 0)
+++ thunar-thumbnailers/trunk/ogg-thumbnailer/ogg-thumbnailer.desktop.in	2007-07-04 21:45:44 UTC (rev 2889)
@@ -0,0 +1,9 @@
+
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Type=X-Thumbnailer
+Name=Ogg Thumbnailer
+TryExec=ffmpegthumbnailer
+MimeType=application/ogg;
+X-Thumbnailer-Exec=@libexecdir@/ogg-thumbnailer %i %o %s




More information about the Goodies-commits mailing list