diff options
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | Makefile | 91 | ||||
-rw-r--r-- | README | 62 | ||||
-rw-r--r-- | README.DE | 61 | ||||
-rw-r--r-- | commands.c | 2 | ||||
-rw-r--r-- | commands.h | 2 | ||||
-rw-r--r-- | control-image.c | 64 | ||||
-rw-r--r-- | control-image.h | 15 | ||||
-rw-r--r-- | data-image.c | 2 | ||||
-rw-r--r-- | data.c | 6 | ||||
-rw-r--r-- | exif.c | 183 | ||||
-rw-r--r-- | exif.h | 42 | ||||
-rw-r--r-- | i18n.c | 109 | ||||
-rw-r--r-- | i18n.h | 2 | ||||
-rw-r--r-- | image.c | 10 | ||||
-rw-r--r-- | image.h | 2 | ||||
-rw-r--r-- | libimage/pnm.c | 2 | ||||
-rw-r--r-- | libimage/pnm.h | 2 | ||||
-rw-r--r-- | libimage/xpm.c | 2 | ||||
-rw-r--r-- | libimage/xpm.h | 2 | ||||
-rw-r--r-- | liboutput/encode.c | 2 | ||||
-rw-r--r-- | liboutput/encode.h | 2 | ||||
-rw-r--r-- | liboutput/stillimage-player.c | 2 | ||||
-rw-r--r-- | liboutput/stillimage-player.h | 2 | ||||
-rw-r--r-- | liboutput/stillimage.c | 2 | ||||
-rw-r--r-- | liboutput/stillimage.h | 2 | ||||
-rw-r--r-- | list.c | 2 | ||||
-rw-r--r-- | list.h | 2 | ||||
-rw-r--r-- | menu-commands.c | 8 | ||||
-rw-r--r-- | menu-commands.h | 6 | ||||
-rw-r--r-- | menu-image.c | 2 | ||||
-rw-r--r-- | menu.c | 2 | ||||
-rw-r--r-- | player-image.c | 2 | ||||
-rw-r--r-- | player-image.h | 2 | ||||
-rwxr-xr-x | scripts/imageplugin.sh | 2 | ||||
-rwxr-xr-x | scripts/magickplugin.sh | 2 | ||||
-rw-r--r-- | setup-image.c | 2 | ||||
-rw-r--r-- | setup-image.h | 2 |
38 files changed, 583 insertions, 130 deletions
@@ -1,11 +1,15 @@ VDR Plugin 'image' Revision History ----------------------------------- +2006-01-12 +- fix build failed without defined FFMDIR +- add exif support (required libexif) + 2006-01-11 - fix wrong register_avcodec (Thanks to Peter Holik) 2006-01-08 -- Bounce to vdr-1.3.38 (Required) +- Bounce to vdr-1.3.38 (required now vdr-1.3.38) 2006-01-06 - add italian/dutch/portuguese/spanish translations via babelfish @@ -1,39 +1,72 @@ # -# Makefile for a Video Disk Recorder plugin +# Makefile for Image plugin to VDR # -# $Id$ - -# The official name of this plugin. -# This name will be used in the '-P...' option of VDR to load the plugin. -# By default the main source file also carries this name. +# (C) 2004-2006 Andreas Brachold <anbr at users.berlios.de> # -PLUGIN = image +# This code 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 code 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Or, point your browser to http://www.gnu.org/copyleft/gpl.html -### The version number of this plugin (taken from the main source file): +# You can change the compile options here or create a Make.config +# in the VDR directory an set them there. + +### uncomment the following line, if you don't have libexif installed +#WITHOUT_LIBEXIF=1 + +#FFMDIR = ../../../../ffmpeg -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') ### The C++ compiler and options: CXX ?= g++ CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual +############################################### +############################################### +# +# no user configurable options below this point +# +############################################### +############################################### + ### The directory environment: DVBDIR = ../../../../DVB VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp -#FFMDIR = ../../../../ffmpeg ### Allow user defined options to overwrite defaults: -include $(VDRDIR)/Make.config +# The official name of this plugin. +# This name will be used in the '-P...' option of VDR to load the plugin. +# By default the main source file also carries this name. +# +PLUGIN = image + +### The version number of this plugin (taken from the main source file): + +VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') + ### The version number of VDR (taken from VDR's "config.h"): VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') + + ### The name of the distribution archive: ARCHIVE = $(PLUGIN)-$(VERSION) @@ -44,15 +77,6 @@ PACKAGE = vdr-$(ARCHIVE) ifdef FFMDIR FFMVERSION = $(shell grep "\#define FFMPEG_VERSION_INT " $(FFMDIR)/libavcodec/avcodec.h | \ cut -d "x" -f 2 ) -else -ifeq (,$(findstring 000,$(FFMVERSION))) -FFMVERSION = $(shell grep "\#define FFMPEG_VERSION_INT " /usr/include/ffmpeg/avcodec.h 2>/dev/null | \ - cut -d "x" -f 2 ) -endif -ifeq (,$(findstring 000,$(FFMVERSION))) -FFMVERSION = $(shell grep "\#define FFMPEG_VERSION_INT " /usr/local/include/ffmpeg/avcodec.h 2>/dev/null | \ - cut -d "x" -f 2 ) -endif endif ### Includes and Defines (add further entries here): @@ -75,30 +99,27 @@ endif endif LIBS += -lavcodec -ifneq ($(FFMVERSION),000408) -LIBS += -lavformat -lavutil -endif - LIBS += -lz ifdef FFMDIR DEFINES += -DFFMDIR endif +ifndef WITHOUT_LIBEXIF + LIBS += -lexif + DEFINES += -DHAVE_LIBEXIF +endif + ### The object files (add further files here): -OBJS = ${PLUGIN}.o -OBJS += i18n.o -OBJS += data.o -OBJS += menu.o -OBJS += data-image.o -OBJS += menu-image.o -OBJS += setup-image.o -OBJS += player-image.o -OBJS += control-image.o -OBJS += commands.o -OBJS += menu-commands.o -OBJS += list.o +OBJS = ${PLUGIN}.o i18n.o data.o menu.o data-image.o menu-image.o \ + setup-image.o player-image.o control-image.o commands.o menu-commands.o \ + list.o + + +ifndef WITHOUT_LIBEXIF + OBJS += exif.o +endif ### The subdirectories: @@ -3,12 +3,12 @@ This is a "plugin" for the Video Disk Recorder (VDR). Originaly written by: Kai Tobias Burwieck <kai-at-burwieck.net> "Interpohl" <interpohl-at-vdr-portal.de> Onno Kreuzinger <o.kreuzinger-at-kreuzinger.biz> - Andreas Brachold <vdr04-at-deltab.de> + Andreas Brachold <anbr at users.berlios.de> Former project's homepage: http://www.burwieck.net/vdr (dead?) http://vdr-image.kreuzinger.biz> -Maintainer: Andreas Brachold <vdr04-at-deltab.de> +Maintainer: Andreas Brachold <anbr at users.berlios.de> Project homepage: http://vdr-image.berlios.de/ @@ -19,10 +19,17 @@ Required: ----------- - fullfeatured dvb card - vdr 1.3.38+ -- to compile plugin depends package libavcodec1-dev (tested with ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) -- to run your will need package netpbm and libavcodec1 -- netpbm 10.0+ (check for "anytopnm", if it does not exist upgrade/install netpbm) -- not necessary but useful utils/file (file) for better imagetyp detection, used by anytopnm +- plugin depends follow packages + + ffmpeg (tested with ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) + http://ffmpeg.sourceforge.net + + libexif + http://libexif.sourceforge.net/ + + for running your will need also package netpbm + http://netpbm.sourceforge.net/ + netpbm 10.0+ (check for "anytopnm", if it does not exist upgrade/install netpbm) + + not necessary but useful utils/file (file) for better imagetyp detection, + this tools is used by script anytopnm + ftp://ftp.astron.com/pub/file Important Note: if tools are installed by source absolutely also for it provide that the @@ -32,26 +39,44 @@ otherwise adapt the variable "PATH" within the file imageplugin.sh. Install: ------------ Install the plugin part as usual (see vdr docs if you not know already). +You will need a full source tree from vdr, to build this plugins. +copy source to below defined folder. cd $VDRSOURCE/PLUGINS/src tar -xzvf vdr-image-x.x.x.tgz ln -s image-x.x.x image -Compile depends package libavcodec1-dev, libavcodec1 or also know ffmpeg. -later for run your will only need libavcodec1(libavcodec.so) and netpbm. -("apt-get install libavcodec1-dev libavcodec1 netpbm" on Debian) +Compile depends package ffmpeg, libexif. later for running your +need netpbm for image conversion. - to compile + build ffmpeg + $ configure --enable-shared && make && make install - cd $VDRSOURCE + build libexif + $ configure && make && make install - make plugins - make plugins-install + now compile plugin + + $ cd $VDRSOURCE + $ make plugins + + or if you need, defined a ffmpeg source folder ¹) + this essential if build ffmpeg without "--enable-shared" + + $ make plugins FFMDIR=/usr/src/ffmpeg-cvs + + compile without libexif ¹) + + $ make plugins WITHOUT_LIBEXIF=1 + + to install plugin + + $ make plugins-install + + +¹) Build options can also defined inside $VDRSOURCE/Make.config - or if you need, defined a ffmpeg source folder - make plugins FFMDIR=/usr/src/ffmpeg-cvs - make plugins-install In the ./examples directory you can find a sample file for imagesources.conf, change this file if needed and place it in @@ -93,10 +118,11 @@ At all modi OK toggle OSD informations Play/Pause begin/halt slide Stop/Blue stop plugin - Red open menu with imagecommands While watching pictures Back stop plugin + Red open menu with imagecommands + Info show exif informations Left previous picture Right next picture @@ -117,6 +143,8 @@ While watching pictures 'Zoom menu' Back Zoom outside image + Red open menu with imagecommands + Info show exif informations Left scroll zoomedframe inside picture to left Right scroll zoomedframe inside picture to right @@ -3,12 +3,12 @@ This is a "plugin" for the Video Disk Recorder (VDR). Originaly written by: Kai Tobias Burwieck <kai-at-burwieck.net> "Interpohl" <vdr-portal.de> Onno Kreuzinger <o.kreuzinger-at-kreuzinger.biz> - Andreas Brachold <vdr04-at-deltab.de> + Andreas Brachold <anbr at users.berlios.de> Former project's homepage: http://www.burwieck.net/vdr (dead?) http://vdr-image.kreuzinger.biz> -Maintainer: Andreas Brachold <vdr04-at-deltab.de> +Maintainer: Andreas Brachold <anbr at users.berlios.de> Project homepage: http://vdr-image.berlios.de/ @@ -19,10 +19,17 @@ Benötigt: ----------- - Full-Featured DVB Karte - vdr 1.3.38+ -- das Plugin ist abhängig vom Paket libavcodec1-dev zu übersetzen, (getestet mit ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) -- und Paket netpbm sowie libavcodec1 zur Ausführung -- netpbm 10.0+ (prüfe ob das Tool "anytopnm" existiert) -- nicht notwendig, aber sinnvoll utils/file (file) für bessere Bildtyperkennung, mit anytopnm +- das Plugin ist abhängig vom folgenden Paketen + + ffmpeg (getestet mit ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) + http://ffmpeg.sourceforge.net + + libexif + http://libexif.sourceforge.net/ + + zur Ausführung wird auch das Paket netpbm benötigt + http://netpbm.sourceforge.net/ + netpbm 10.0+ (prüfe ob das Tool "anytopnm" existiert) + + nicht notwendig, aber sinnvoll utils/file (file) für bessere Bildtyperkennung + dieses Tool wird vom Skript anytopnm genutzt + ftp://ftp.astron.com/pub/file WICHTIG, wenn Tools von Source installiert werden, unbedingt auch dafür sorgen das @@ -32,26 +39,43 @@ ansonsten die Variable "PATH" innerhalb der Datei imageplugin.sh anpassen. Installation: ------------------ Das Plugin wird wie alle Plugins installiert (siehe im Zweifel in vdr Dokumentation nach). +Es wird ein voll Quellcodebaum des vdr benötigt, um diese Plugin zu kompilieren. +Kopiere die Quellen in das vorgegebene Verzeichnis, wie unten aufgeführt.. cd $VDRSOURCE/PLUGINS/src tar -xzvf vdr-image-x.x.x.tgz ln -s image-x.x.x image -Das Kompilieren ist abhängig vom Paket libavcodec1-dev, libavcodec1, aber auch bekannt als ffmpeg. -Später zum Ausführen wird nur noch libavcodec1(libavcodec.so) und "netpbm" benötigt. -("apt-get install libavcodec1-dev libavcodec1 netpbm" in Debian) +Das Kompilieren ist abhängig vom Paket ffmpeg, libexif, und später zum Ausführen +wird noch das Paket "netpbm" benötigt. - zum Übersetzen + ffmpeg übersetzen + $ configure --enable-shared && make && make install - cd $VDRSOURCE + libexif übersetzen + $ configure && make && make install - make plugins - make plugins-install + Übersetzen des Plugin - oder wenn benötigt, definiere das ffmpeg source Verzeichnis + $ cd $VDRSOURCE + $ make plugins - make plugins FFMDIR=/usr/src/ffmpeg-cvs - make plugins-install + oder wenn benötigt, definiere das ffmpeg source Verzeichnis ¹) + das ist notwendig, wenn ffmpeg ohne "--enable-shared" übersetzt wurde. + + $ make plugins FFMDIR=/usr/src/ffmpeg-cvs + + Kompilieren ohne libexif ¹) + + $ make plugins WITHOUT_LIBEXIF=1 + + Installieren des Plugins + + $ make plugins-install + + +¹) Übersetzungsoptionen können auch innerhalb $VDRSOURCE/Make.config definiert + werden @@ -94,10 +118,11 @@ At all modi OK toggle OSD informations Play/Pause Starte Diaschau/ Stoppe Diaschau Stop/Blue Stoppe Plugin - Red Öffne Menu mit Bildbefehle Während der Bildbetrachtung: Back Stoppe Plugin + Red Öffne Menu mit Bildbefehle + Info Zeige Exif-Informationen Left vorheriges Bild Right nächstes Bild @@ -120,6 +145,8 @@ Während der Bildbetrachtung: 'Zoom-Bedienung' Back Zoomwert verkleinern + Red Öffne Menu mit Bildbefehle + Info Zeige Exif-Informationen Left Bildausschnitt nach Links verschieben Right Bildausschnitt nach Rechts verschieben @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/control-image.c b/control-image.c index d8a4561..fc149ea 100644 --- a/control-image.c +++ b/control-image.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * -* (C) 2004-2005 Andreas Brachold <vdr04 -at- deltab.de> +* (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai -at- burwieck.net> * * This code is free software; you can redistribute it and/or @@ -30,6 +30,10 @@ #include "menu-commands.h" #include "list.h" +#ifdef HAVE_LIBEXIF +#include "exif.h" +#endif + #include <vdr/status.h> #include <vdr/tools.h> #include <vdr/plugin.h> @@ -55,7 +59,10 @@ void cImageControl::SetSlideShow(cSlideShow * pNewSlideShow) */ cImageControl::cImageControl(cSlideShow * pNewSlideShow) : cControl(player = new cImagePlayer(pNewSlideShow)) - , m_pImageMenu(NULL) + , m_pCmdMenu(NULL) +#ifdef HAVE_LIBEXIF + , m_pExifMenu(NULL) +#endif , m_pDisplayReplay(NULL) { // Notity all cStatusMonitor @@ -83,9 +90,18 @@ cImageControl::cImageControl(cSlideShow * pNewSlideShow) */ cImageControl::~cImageControl() { - if(m_pImageMenu) - delete m_pImageMenu; - m_pImageMenu = NULL; + if(m_pCmdMenu) { + delete m_pCmdMenu; + m_pCmdMenu = NULL; + } + +#ifdef HAVE_LIBEXIF + if(m_pExifMenu) { + delete m_pExifMenu; + m_pExifMenu = NULL; + } +#endif + // Notity cleanup all cStatusMonitor cStatus::MsgReplaying(this, "image", NULL, false); // Hide OSD @@ -139,10 +155,18 @@ void cImageControl::HideOSD(void) m_eOSDStatusIsOpen = eDisplayNothing; } - if (m_pImageMenu) { - delete m_pImageMenu; - m_pImageMenu = NULL; - } + if (m_pCmdMenu) { + delete m_pCmdMenu; + m_pCmdMenu = NULL; + } + +#ifdef HAVE_LIBEXIF + if(m_pExifMenu) { + delete m_pExifMenu; + m_pExifMenu = NULL; + } +#endif + } ////////////////////////////////////////////////////////////////////////// /** Send Message if changed to any statusmonitor @@ -308,11 +332,18 @@ eOSState cImageControl::ProcessKey(eKeys nKey) eOSState eOSRet = osContinue; - if(m_pImageMenu + if(m_pCmdMenu || (m_ePlayMode != ePlayModeJump && (nKey == kRed))) { return ProcessKeyCommands(nKey); } +#ifdef HAVE_LIBEXIF + else if(m_pExifMenu + || (m_ePlayMode != ePlayModeJump && (nKey == kInfo))) + { + return ProcessKeyExif(nKey); + } +#endif else { switch(nKey) @@ -594,17 +625,17 @@ void cImageControl::ToogleSlideShowActiv(void) */ eOSState cImageControl::ProcessKeyCommands(eKeys nKey) { - if(m_pImageMenu) + if(m_pCmdMenu) { - eOSState eOSRet = m_pImageMenu->ProcessKey(nKey); + eOSState eOSRet = m_pCmdMenu->ProcessKey(nKey); switch(eOSRet) { case osEnd: case osBack: - if(m_pImageMenu->HasImageChanged()) + if(m_pCmdMenu->HasImageChanged()) OriginalImage(false); - delete m_pImageMenu; - m_pImageMenu = NULL; + delete m_pCmdMenu; + m_pCmdMenu = NULL; return osContinue; default: return eOSRet; @@ -634,13 +665,14 @@ eOSState cImageControl::ProcessKeyCommands(eKeys nKey) const char* szFileName = FileName(); char* szTitle; asprintf(&szTitle,"%s (%s)",tr("Commands"),basename(szFileName)); - m_pImageMenu = new cImageMenuCommands(szTitle,pCmd,szFileName); + m_pCmdMenu = new cImageMenuCommands(szTitle,pCmd,szFileName); free(szTitle); return osContinue; } } + ////////////////////////////////////////////////////////////////////////////// /** Check to get access for to viewed file @return bool - false access was denied diff --git a/control-image.h b/control-image.h index 69ab0af..4e7d5bb 100644 --- a/control-image.h +++ b/control-image.h @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04 -at- deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai -at- burwieck.net> * * This code is free software; you can redistribute it and/or @@ -33,6 +33,10 @@ class cImagePlayer; class cImageMenuCommands; +#ifdef HAVE_LIBEXIF +class cImageMenuExif; +#endif + class cImageControl : public cControl { @@ -48,7 +52,11 @@ class cImageControl /** Our one and only Imageplayer, don't rename it see cControl */ cImagePlayer *player; /** Interface to Menu with Usercommands*/ - cImageMenuCommands *m_pImageMenu; + cImageMenuCommands *m_pCmdMenu; +#ifdef HAVE_LIBEXIF + /** Interface to Menu to show exif infomations*/ + cImageMenuExif *m_pExifMenu; +#endif /** Current playing mode (Jump <-> Normal <-> Zoom) */ ePlayMode m_ePlayMode; /** Remember the active Slideshow mode before Jump or Zoom used */ @@ -135,6 +143,9 @@ private: eOSState ProcessKeyJumpMode(eKeys nKey); eOSState ProcessKeyZoomMode(eKeys nKey); eOSState ProcessKeyCommands(eKeys nKey); +#ifdef HAVE_LIBEXIF + eOSState ProcessKeyExif(eKeys nKey); +#endif void NextImage(int Step); void PrevImage(int Step); diff --git a/data-image.c b/data-image.c index 3c54f3c..0e8c778 100644 --- a/data-image.c +++ b/data-image.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04 -at- deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai -at- burwieck.net> * * This code is free software; you can redistribute it and/or @@ -1,11 +1,11 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> - * (C) 2003 Kai Tobias Burwieck <kai@burwieck.net> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> + * (C) 2003 Kai Tobias Burwieck <kai at burwieck.net> * * based on MP3/MPlayer plugin to VDR (C++) - * (C) 2001,2002 Stefan Huelswitt <huels@iname.com> + * (C) 2001,2002 Stefan Huelswitt <huels at iname.com> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -0,0 +1,183 @@ +/* + * Image plugin to VDR (C++) + * + * (C) 2006 Andreas Brachold <anbr at users.berlios.de> + * + * This code 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 code 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html + */ + +#include <libexif/exif-data.h> +#include <libexif/exif-ifd.h> +#include <libexif/exif-loader.h> + +#include <sstream> + +#include "player-image.h" +#include "control-image.h" +#include "exif.h" +#include "i18n.h" + +static void callbackShowEntry (ExifEntry *e, void *pData) +{ + if (!pData) + return; + + std::ostream* po = (std::ostream*)pData; + + char v[128]; + ExifIfd ifd = exif_entry_get_ifd (e); + + (*po) << exif_tag_get_title_in_ifd (e->tag, ifd); + (*po) << ":\t"; + (*po) << exif_entry_get_value (e, v, 59); + (*po) << std::endl; +} + +static void callbackShowIFD (ExifContent *content, void *pData) +{ + exif_content_foreach_entry (content, callbackShowEntry, pData); +} + +void TagList (std::ostream& o, ExifData *ed) +{ + if (!ed) + return; + + exif_data_foreach_content (ed, callbackShowIFD, &o); +} + +static bool MarkerNodes (std::ostream& o, ExifData *d) +{ + unsigned int i, c; + char v[1024], *p; + ExifMnoteData *md; + + md = exif_data_get_mnote_data (d); + if (!md) { + o << tr("Could not parse exif maker note!") << std::endl; + exif_data_unref (d); + return false; + } + + c = exif_mnote_data_count (md); + for (i = 0; i < c; i++) { + p = exif_mnote_data_get_value (md, i, v, sizeof (v)); + if (p) + { + o << exif_mnote_data_get_title (md, i); + o << ":\t"; + o << v << std::endl; + } + } + + return true; +} + +cImageMenuExif::cImageMenuExif(const char *szFileName) +: cOsdMenu(tr("Show exif informations from image")) +{ + std::ostringstream o; + ExifData *d; + + d = exif_data_new_from_file (szFileName); + if (d) { + TagList(o, d); + o << std::endl; + + MarkerNodes (o, d); + exif_data_unref (d); + } else + { + o << tr("Could not load exif data from image!") << std::endl; + } + + m_strText = o.str(); + SetHelp(NULL, NULL, NULL, tr("Back")); + Display(); +} + + +eOSState cImageMenuExif::ProcessKey(eKeys nKey) +{ + switch (nKey) { + case kUp|k_Repeat: + case kUp: + case kDown|k_Repeat: + case kDown: + case kLeft|k_Repeat: + case kLeft: + case kRight|k_Repeat: + case kRight: + DisplayMenu()->Scroll(NORMALKEY(nKey) == kUp || NORMALKEY(nKey) == kLeft, NORMALKEY(nKey) == kLeft || NORMALKEY(nKey) == kRight); + return osContinue; + default: break; + } + + eOSState nState = cOsdMenu::ProcessKey(nKey); + if (nState == osUnknown) { + switch (nKey) { + case kOk: + case kMenu: + case kBack: + case kBlue: + return osBack; + default: nState = osContinue; + } + } + return nState; +} + +void cImageMenuExif::Display(void) +{ + cOsdMenu::Display(); + DisplayMenu()->SetText(m_strText.c_str(),true); +} + +////////////////////////////////////////////////////////////////////////////// +/** Handle a Key stroke on exifmenu +@return eOSState +@param eKeys Key - the processed Keycode +*/ +eOSState cImageControl::ProcessKeyExif(eKeys nKey) +{ + if(m_pExifMenu) + { + eOSState eOSRet = m_pExifMenu->ProcessKey(nKey); + switch(eOSRet) + { + case osEnd: + case osBack: + delete m_pExifMenu; + m_pExifMenu = NULL; + return osContinue; + default: + return eOSRet; + } + } + else + { + if(!CheckAccess()) { + OSD_ErrorNumMsg(errno,tr("Operation failed")); + return osContinue; + } + + Hide(); + + m_pExifMenu = new cImageMenuExif(FileName()); + + return osContinue; + } +} @@ -0,0 +1,42 @@ +/* + * Image plugin to VDR (C++) + * + * (C) 2006 Andreas Brachold <anbr at users.berlios.de> + * + * This code 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 code 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html + */ + +#ifndef __MENU_EXIF_H +#define __MENU_EXIF_H + +#include "image.h" +#include <vdr/menuitems.h> +#include <vdr/interface.h> +#include <string> + + +class cImageMenuExif : public cOsdMenu +{ + std::string m_strText; +protected: + virtual void Display(void); +public: + cImageMenuExif(const char *szFileName); + virtual eOSState ProcessKey(eKeys Key); +}; + + +#endif //__MENU_EXIF_H @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2006 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2006 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * * This code is free software; you can redistribute it and/or @@ -114,7 +114,7 @@ const tI18nPhrase Phrases[] = { "precursore", // Italian "voorloper", // Dutch "precursor", // Portuguese - "Parent", // French + "", // French "", // Norwegian "Takaisin", // Finnish "", // Polish @@ -150,6 +150,48 @@ const tI18nPhrase Phrases[] = { "", // Eesti "", // Dansk }, + { "Play", + "Wiedergabe", + "Predvajaj", + "Riproduci", + "Weergeven", + "",// TODO + "Lecture", + "",// TODO + "Toista", + "Odtworzenie", + "Reproducir", + "ÁíáðáñáãùãÞ", + "Spela upp", + "Redare", + "Lejátszás", + "Reproduir", + "²ÞáßàÞØ×ÒÕÔÕÝØÕ", + "Start", + "Start", + "Afspil", + }, + { "Back", + "Zurück", + "Nazaj", + "Indietro", + "Terug", + "Voltar", + "Retour", + "Tilbake", + "Takaisin", + "Wstecz", + "Retornar", + "Ðßóù", + "Tillbaka", + "Înapoi", + "Vissza", + "Retornar", + "½Ð×ÐÔ", + "Nazad", + "Tagasi", + "Tilbage", + }, { "Error scanning directory!", // English "Fehler beim Lesen des Verzeichnisses!", // German "Napaka pri pregledovanju direktorija!", // Slovenian @@ -759,5 +801,68 @@ const tI18nPhrase Phrases[] = { "", // Eesti "", // Dansk }, + { "Show exif informations from image", // English + "Zeigt Exif Informationen zum Bild", // German + "", // Slovenian + "Mostri le informazioni del exif dall'immagine", // Italian + "Toon exif informatie van beeld", // Dutch + "Mostre a informação do exif da imagem", // Portuguese + "Montrez l'information d'exif de l'image", // French + "", // Norwegian + "", // Finnish + "", // Polish + "Demuestre la información del exif de la imagen", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hugarian + "", // Catalan + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + }, + { "Could not parse exif maker note!", // English + "Konnte Exif Erstellungsanmerkung nicht analysieren!", // German + "", // Slovenian + "Non ha potuto analizzare la nota del creatore del exif!", // Italian + "Kon exif maker geen nota ontleden!", // Dutch + "Não podia analisar gramaticalmente a nota do fabricante do exif!", // Portuguese + "N'a pas pu analyser la note de fabricant d'exif !", // French + "", // Norwegian + "", // Finnish + "", // Polish + "¡No podía analizar la nota del fabricante del exif!", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hugarian + "", // Catalan + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + }, + { "Could not load exif data from image!", // English + "Konnte Exif Daten nicht vom Bild laden!", // German + "", // Slovenian + "Non ha potuto caricare i dati del exif dall'immagine!", // Italian + "Kon exif geen gegevens van beeld laden!", // Dutch + "Não podia carregar dados do exif da imagem!", // Portuguese + "N'a pas pu charger des données d'exif de l'image !", // French + "", // Norwegian + "", // Finnish + "", // Polish + "¡No podía cargar datos del exif de imagen!", // Spanish + "", // Greek + "", // Swedish + "", // Romanian + "", // Hugarian + "", // Catalan + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + }, { NULL } }; @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004 Andreas Brachold <anbr at users.berlios.de> * (C) 2003 Kai Tobias Burwieck <kai@burwieck.net> * * This code is free software; you can redistribute it and/or @@ -1,13 +1,13 @@ /* * Image plugin to VDR (C++) * - * (C) 2003 Kai Tobias Burwieck <kai@burwieck.net> - * (C) 2004 "Interpohl" <interpohl@vdr-portal.de> - * (C) 2004 A. Brachold <vdr04-at-deltab.de> - * (C) 2004 O. Kreuzinger <Onno@Kreuzinger.biz> + * (C) 2003 Kai Tobias Burwieck <kai at burwieck.net> + * (C) 2004 "Interpohl" <interpohl at vdr-portal.de> + * (C) 2004 A. Brachold <anbr at users.berlios.de> + * (C) 2004 O. Kreuzinger <Onno at Kreuzinger.biz> * (C) 2004 A. Holzhammer for the massive script updates * - * based on mp3/mplayer plguin by Stefan Hülswitt <huels@iname.com> + * based on mp3/mplayer plguin by Stefan Hülswitt <huels at iname.com> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/libimage/pnm.c b/libimage/pnm.c index 3b59db9..cb91dc5 100644 --- a/libimage/pnm.c +++ b/libimage/pnm.c @@ -1,6 +1,6 @@ /*************************************************************************** * pnm.c - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * based on works from Fabian E. Bustamante <fabianb-at-cs.umd.edu> * Created: Thu Aug 7 2004 ****************************************************************************/ diff --git a/libimage/pnm.h b/libimage/pnm.h index f28e829..1b4d50e 100644 --- a/libimage/pnm.h +++ b/libimage/pnm.h @@ -1,6 +1,6 @@ /*************************************************************************** * pnm.h - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * based on works from Fabian E. Bustamante <fabianb-at-cs.umd.edu> * Created: Thu Aug 7 2004 ****************************************************************************/ diff --git a/libimage/xpm.c b/libimage/xpm.c index 9572ec4..2165f1f 100644 --- a/libimage/xpm.c +++ b/libimage/xpm.c @@ -1,7 +1,7 @@ /*************************************************************************** * xpm.c * - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 11 2004 * ****************************************************************************/ diff --git a/libimage/xpm.h b/libimage/xpm.h index 3e9fbb5..ace7837 100644 --- a/libimage/xpm.h +++ b/libimage/xpm.h @@ -1,7 +1,7 @@ /*************************************************************************** * xpm.h * - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 11 2004 * ****************************************************************************/ diff --git a/liboutput/encode.c b/liboutput/encode.c index 1eb2dfd..505d478 100644 --- a/liboutput/encode.c +++ b/liboutput/encode.c @@ -1,7 +1,7 @@ /*************************************************************************** * encode.c * - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004-2006 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * ****************************************************************************/ diff --git a/liboutput/encode.h b/liboutput/encode.h index 43f69f4..805e279 100644 --- a/liboutput/encode.h +++ b/liboutput/encode.h @@ -1,7 +1,7 @@ /*************************************************************************** * encode.h * - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * ****************************************************************************/ diff --git a/liboutput/stillimage-player.c b/liboutput/stillimage-player.c index f15ef8f..77cd1b1 100644 --- a/liboutput/stillimage-player.c +++ b/liboutput/stillimage-player.c @@ -1,6 +1,6 @@ /*************************************************************************** * stillimage-player.c - * (C) Copyright 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004-2005 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * ****************************************************************************/ diff --git a/liboutput/stillimage-player.h b/liboutput/stillimage-player.h index c0aa632..e1d5dc2 100644 --- a/liboutput/stillimage-player.h +++ b/liboutput/stillimage-player.h @@ -1,6 +1,6 @@ /*************************************************************************** * stillimage-player.h - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * ****************************************************************************/ diff --git a/liboutput/stillimage.c b/liboutput/stillimage.c index a83306d..6cefd44 100644 --- a/liboutput/stillimage.c +++ b/liboutput/stillimage.c @@ -1,6 +1,6 @@ /*************************************************************************** * stillimage.c - * (C) Copyright 2004 <vdr04-at-deltab.de> + * (C) Copyright 2004 <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * * parts of the code (c) Peter Seyringer diff --git a/liboutput/stillimage.h b/liboutput/stillimage.h index eb6428b..35abae1 100644 --- a/liboutput/stillimage.h +++ b/liboutput/stillimage.h @@ -1,6 +1,6 @@ /*************************************************************************** * stillimage.h - * (C) Copyright 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) Copyright 2004 Andreas Brachold <anbr at users.berlios.de> * Created: Thu Aug 5 2004 * ****************************************************************************/ @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 A. Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 A. Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/menu-commands.c b/menu-commands.c index 0200082..756d0fd 100644 --- a/menu-commands.c +++ b/menu-commands.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #include "menu-commands.h" #include "i18n.h" -cImageMenuCommands::cImageMenuCommands(const char *szTitle, cImageCommands *pCmds, const char *szFileName /*= NULL*/) +cImageMenuCommands::cImageMenuCommands(const char *szTitle, cImageCommands *pCmds, const char *szFileName) : cOsdMenu(m_szTitle = strdup(szTitle)) , m_pCmds( pCmds ) , m_szFileName(NULL) @@ -79,7 +79,7 @@ eOSState cImageMenuCommands::Execute(void) m_bImageChanged = stFile.st_mtime != stChanged.st_mtime; } if (szResult) - return AddSubMenu(new cImageMenuResult(p->Title(), szResult, fontFix)); + return AddSubMenu(new cImageMenuResult(p->Title(), szResult)); return osEnd; } return osContinue; @@ -111,7 +111,7 @@ eOSState cImageMenuCommands::ProcessKey(eKeys nKey) -cImageMenuResult::cImageMenuResult(const char *szTitle, const char *szText, eDvbFont Font) +cImageMenuResult::cImageMenuResult(const char *szTitle, const char *szText) : cOsdMenu(szTitle) , m_szText(szText) { diff --git a/menu-commands.h b/menu-commands.h index 9796fcb..828a2e1 100644 --- a/menu-commands.h +++ b/menu-commands.h @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -37,7 +37,7 @@ class cImageMenuCommands protected: eOSState Execute(void); public: - cImageMenuCommands(const char *szTitle, cImageCommands *Cmds, const char *szFileName = NULL); + cImageMenuCommands(const char *szTitle, cImageCommands *Cmds, const char *szFileName); virtual ~cImageMenuCommands(); virtual eOSState ProcessKey(eKeys Key); bool HasImageChanged() const { return m_bImageChanged; } @@ -50,7 +50,7 @@ class cImageMenuResult : public cOsdMenu protected: virtual void Display(void); public: - cImageMenuResult(const char *Title, const char *Text, eDvbFont Font = fontOsd); + cImageMenuResult(const char *Title, const char *Text); virtual eOSState ProcessKey(eKeys Key); }; diff --git a/menu-image.c b/menu-image.c index e85e606..6e37a2d 100644 --- a/menu-image.c +++ b/menu-image.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2006 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2006 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * * This code is free software; you can redistribute it and/or @@ -2,7 +2,7 @@ * image plugin to VDR (C++) * * (C) 2004 "Interpohl" <interpohl-at-vdr-portal.de> - * (C) 2004-2006 A.Brachold <vdr04-at-deltab.de> + * (C) 2004-2006 A.Brachold <anbr at users.berlios.de> * (C) 2004 O.Kreuzinger <Onno-at-Kreuzinger.biz> * (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * (C) 2001,2002 Stefan Huelswitt <huels-at-iname.com> diff --git a/player-image.c b/player-image.c index e738c28..ebb2164 100644 --- a/player-image.c +++ b/player-image.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * * This code is free software; you can redistribute it and/or diff --git a/player-image.h b/player-image.h index 6a784de..bfb0ebf 100644 --- a/player-image.h +++ b/player-image.h @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004 Andreas Brachold <anbr at users.berlios.de> * 2003 Kai Tobias Burwieck <kai@burwieck.net> * * This code is free software; you can redistribute it and/or diff --git a/scripts/imageplugin.sh b/scripts/imageplugin.sh index 7242413..28ed564 100755 --- a/scripts/imageplugin.sh +++ b/scripts/imageplugin.sh @@ -5,7 +5,7 @@ # History: # 2005-07-26 add commando for rotate 180 # 2005-07-18 wrong lookup for pnmscale and really are pnmscalefixed used -# 2004-08-12 Initalrelease, Andreas Brachold <vdr04-at-deltab.de> +# 2004-08-12 Initalrelease, Andreas Brachold <anbr at users.berlios.de> # base on prior work for convert.sh # by Onno Kreuzinger <o.kreuzinger-at-kreuzinger.biz> # Andreas Holzhammer and <Interpohl-at-vdr-portal.de> diff --git a/scripts/magickplugin.sh b/scripts/magickplugin.sh index e48379f..fd54df9 100755 --- a/scripts/magickplugin.sh +++ b/scripts/magickplugin.sh @@ -6,7 +6,7 @@ # 2005-08-19 better resolution retrieval (provided by kc_captain-at-vdr-portal de) # 2005-07-26 add commando for rotate 180 # 2005-07-18 Reimplement with imagemagick -# 2004-08-12 Initalrelease, Andreas Brachold <vdr04-at-deltab.de> +# 2004-08-12 Initalrelease, Andreas Brachold <anbr at users.berlios.de> # base on prior work for convert.sh # by Onno Kreuzinger <o.kreuzinger-at-kreuzinger.biz> # Andreas Holzhammer and <Interpohl-at-vdr-portal.de> diff --git a/setup-image.c b/setup-image.c index de4ef52..bb66f08 100644 --- a/setup-image.c +++ b/setup-image.c @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2006 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2006 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * * based on MP3/MPlayer plugin to VDR (C++) diff --git a/setup-image.h b/setup-image.h index 117c69e..715edaa 100644 --- a/setup-image.h +++ b/setup-image.h @@ -1,7 +1,7 @@ /* * Image plugin to VDR (C++) * - * (C) 2004-2005 Andreas Brachold <vdr04-at-deltab.de> + * (C) 2004-2005 Andreas Brachold <anbr at users.berlios.de> * based on (C) 2003 Kai Tobias Burwieck <kai-at-burwieck.net> * * This code is free software; you can redistribute it and/or |