summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY18
-rw-r--r--Makefile32
-rw-r--r--README29
-rw-r--r--TODO1
-rw-r--r--decoder.c144
-rw-r--r--decoder.h38
-rw-r--r--i18n.c1312
-rw-r--r--i18n.h6
-rw-r--r--osd.c1083
-rw-r--r--osd.h55
-rw-r--r--osd_info.c590
-rw-r--r--osd_info.h44
-rw-r--r--osdpip.c88
-rw-r--r--patches/vdr-osd.diff51
-rw-r--r--pes.c30
-rw-r--r--pes.h24
-rw-r--r--po/ca_ES.po120
-rw-r--r--po/cs_CZ.po118
-rw-r--r--po/da_DK.po118
-rw-r--r--po/de_DE.po118
-rw-r--r--po/el_GR.po118
-rw-r--r--po/es_ES.po118
-rw-r--r--po/et_EE.po118
-rw-r--r--po/fi_FI.po121
-rw-r--r--po/fr_FR.po121
-rw-r--r--po/hr_HR.po119
-rw-r--r--po/hu_HU.po119
-rw-r--r--po/it_IT.po120
-rw-r--r--po/nl_NL.po120
-rw-r--r--po/nn_NO.po119
-rw-r--r--po/pl_PL.po118
-rw-r--r--po/pt_PT.po118
-rw-r--r--po/ro_RO.po119
-rw-r--r--po/ru_RU.po118
-rw-r--r--po/sl_SI.po119
-rw-r--r--po/sv_SE.po119
-rw-r--r--po/tr_TR.po118
-rw-r--r--quantize.c810
-rw-r--r--quantize.h94
-rw-r--r--receiver.c186
-rw-r--r--receiver.h19
-rw-r--r--setup.c204
-rw-r--r--setup.h43
43 files changed, 4966 insertions, 2431 deletions
diff --git a/HISTORY b/HISTORY
index dab90e3..0b4ec45 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,24 @@
VDR Plugin 'osdpip' Revision History
------------------------------------
+2008-04-27: Version 0.0.9 (written by Andreas Regel)
+- dropped support for VDR version lower than 1.3.47.
+- Now using palette replacemen introduced in VDR 1.4.27, so palette
+ setting workaround is not needed any longer. This simplifies code a
+ bit.
+- added support for VDR 1.6. Now 1.4 and 1.6 are supported (tested with
+ 1.4.7 and 1.6.0)
+- added gettext localization support introduced with VDR 1.5.7.
+- Do not decode B frames when dropping them.
+- Use cCondWait::SleepMs instead of usleep.
+- Fixed automatic closing of OSD after some minutes.
+- Fixed showing wrong channel information.
+- Added missing inclusion of <vdr/device.h>.
+- Added new colour reduction mode using 256 dithered colours (thanks to
+ Martin Wache).
+- Added french translations (thanks to micky979)
+
+
2005-05-15: Version 0.0.8 (written by Andreas Regel)
- Added Navigation through channel in a way like with ordinary VDR. Use
the Left/Right keys to select channel groups, OK to choose one or the
diff --git a/Makefile b/Makefile
index c2dc1de..5e27692 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ TMPDIR = /tmp
### 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')
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
### The name of the distribution archive:
@@ -68,13 +68,38 @@ $(DEPFILE): Makefile
-include $(DEPFILE)
+### Internationalization (I18N):
+
+PODIR = po
+LOCALEDIR = $(VDRDIR)/locale
+I18Npo = $(wildcard $(PODIR)/*.po)
+I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+I18Npot = $(PODIR)/$(PLUGIN).pot
+
+%.mo: %.po
+ msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.c)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<andreas.regel@powarman.de>' -o $@ $^
+
+%.po: $(I18Npot)
+ msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
+ touch $@
+
+$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
+ mkdir -p $(dir $@)
+ cp $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmsgs)
+
### Targets:
-all: libvdr-$(PLUGIN).so
+all: libvdr-$(PLUGIN).so i18n
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared -o $@ $^ $(LIBS)
- @cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+ @cp $@ $(LIBDIR)/$@.$(APIVERSION)
dist: clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -85,4 +110,5 @@ dist: clean
@echo Distribution package created as $(PACKAGE).tgz
clean:
+ @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
diff --git a/README b/README
index c35f54d..306aa5d 100644
--- a/README
+++ b/README
@@ -13,7 +13,7 @@ See the file COPYING for license information.
Requirements:
-------------
-- vdr 1.3.8 or higher
+- vdr 1.3.47 or higher, tested here with 1.4.7 and 1.6.0
- libavcodec from ffmpeg (http://ffmpeg.sourceforge.net) version 0.4.8 or
higher
@@ -21,14 +21,15 @@ Requirements:
Description:
------------
-OSD Picture-in-Picture is a PlugIn that displays the current channel in a
-small box on the screen (default upper right corner). You can switch up and
-down now, watching the progress of the previous channel in the box. Quality is
-not too good yet, and only I-Frames are displayed.
-The plugin supports four modes:
+OSD Picture-in-Picture is a PlugIn that displays the current channel in a
+small box on the screen (default upper right corner). You can switch up and
+down now, watching the progress of the previous channel in the box. Quality is
+not too good yet, and only I-Frames are displayed.
+The plugin supports five modes:
- greyscaled (16 shades of grey)
- greyscaled (256 shades of grey)
- 256 colors with fixed palette
+ - 256 colors with dithering
- 128 colors with variable palette
They all work with an ordinary vdr installation.
The plugin has the possibility to choose the PiP size (in the setup menu from
@@ -50,22 +51,15 @@ the amount of information shown.
Installation:
-------------
-Let's say osdpip's version is 0.0.1 and vdr's version is 1.3.8. If you
+Let's say osdpip's version is 0.0.9 and vdr's version is 1.4.0. If you
use anything else please exchange the version numbers appropriately (this
way I don't have to update this section all the times;) ).
-cd vdr-1.3.8/PLUGINS/src
-tar xvfz vdr-osdpip-0.0.1.tgz
-ln -s osdpip-0.0.1 osdpip
+cd vdr-1.4.0/PLUGINS/src
+tar xvfz vdr-osdpip-0.0.9.tgz
+ln -s osdpip-0.0.9 osdpip
cd ../..
-If you have a VDR version lower than 1.2.25, you will have to patch it using
-the file vdr-osd.diff. This patch fixes a bug in VDR regardings osd usage.
-
-patch -p1 < PLUGINS/src/osdpip/patches/vdr-osd.diff
-
-After applying it you have to recompile your VDR.
-
If you have ffmpeg installed, "make plugins" should do just fine now, but if
you have it next to your vdr folder (e.g. as the DXR3 plugin needs it), you
have to compile with "make FFMPEG_STATIC=1 plugins". Ffmpeg must then be
@@ -90,4 +84,3 @@ Cursor keys Move PiP window around
Green Switch to normal mode
0 Switch back to PiP channel and exit PiP
Back Exit PiP without switching back
-
diff --git a/TODO b/TODO
index 7c7bdfe..257fb32 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,2 @@
- improve fixed palette color quantization
-- vdr-like navigation through channels
diff --git a/decoder.c b/decoder.c
index cc2ae54..5bc790b 100644
--- a/decoder.c
+++ b/decoder.c
@@ -13,105 +13,105 @@
int cDecoder::Open()
{
- m_Codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO);
- if (!m_Codec)
- {
- printf("codec not found\n");
- return -1;
- }
- m_Context = avcodec_alloc_context();
- if (avcodec_open(m_Context, m_Codec) < 0)
- {
- printf("could not open codec\n");
- return -1;
- }
- m_PicDecoded = avcodec_alloc_frame();
- m_PicResample = avcodec_alloc_frame();
- m_BufferResample = new unsigned char[(400 * 300 * 3) / 2]; // size for YUV 420
- m_PicConvert = avcodec_alloc_frame();
- m_BufferConvert = new unsigned char[400 * 300 * 4]; // size for RGBA32
-
- return 0;
+ m_Codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO);
+ if (!m_Codec)
+ {
+ printf("codec not found\n");
+ return -1;
+ }
+ m_Context = avcodec_alloc_context();
+ if (avcodec_open(m_Context, m_Codec) < 0)
+ {
+ printf("could not open codec\n");
+ return -1;
+ }
+ m_PicDecoded = avcodec_alloc_frame();
+ m_PicResample = avcodec_alloc_frame();
+ m_BufferResample = new unsigned char[(400 * 300 * 3) / 2]; // size for YUV 420
+ m_PicConvert = avcodec_alloc_frame();
+ m_BufferConvert = new unsigned char[400 * 300 * 4]; // size for RGBA32
+
+ return 0;
}
int cDecoder::Close()
{
- delete[] m_BufferConvert;
- free(m_PicConvert);
- delete[] m_BufferResample;
- free(m_PicResample);
- avcodec_close(m_Context);
- free(m_Context);
- free(m_PicDecoded);
-
- return 0;
+ delete[] m_BufferConvert;
+ free(m_PicConvert);
+ delete[] m_BufferResample;
+ free(m_PicResample);
+ avcodec_close(m_Context);
+ free(m_Context);
+ free(m_PicDecoded);
+
+ return 0;
}
int cDecoder::Decode(unsigned char * data, int length)
{
- int gotPicture, len;
-
- len = avcodec_decode_video(m_Context, m_PicDecoded, &gotPicture, data, length);
- if (len < 0)
- {
- printf("Error while decoding frame\n");
- return -1;
- }
- if (!gotPicture)
- {
- return -1;
- }
-
- return 0;
+ int gotPicture, len;
+
+ len = avcodec_decode_video(m_Context, m_PicDecoded, &gotPicture, data, length);
+ if (len < 0)
+ {
+ printf("Error while decoding frame\n");
+ return -1;
+ }
+ if (!gotPicture)
+ {
+ return -1;
+ }
+
+ return 0;
}
int cDecoder::Resample(int width, int height)
{
- ImgReSampleContext * contextResample;
+ ImgReSampleContext * contextResample;
- m_Width = width;
- m_Height = height;
+ m_Width = width;
+ m_Height = height;
#if LIBAVCODEC_BUILD < 4708
- contextResample = img_resample_full_init(m_Width, m_Height,
- m_Context->width, m_Context->height,
- OsdPipSetup.CropTop, OsdPipSetup.CropBottom,
- OsdPipSetup.CropLeft, OsdPipSetup.CropRight);
+ contextResample = img_resample_full_init(m_Width, m_Height,
+ m_Context->width, m_Context->height,
+ OsdPipSetup.CropTop, OsdPipSetup.CropBottom,
+ OsdPipSetup.CropLeft, OsdPipSetup.CropRight);
#else
- contextResample = img_resample_full_init(m_Width, m_Height,
- m_Context->width, m_Context->height,
- OsdPipSetup.CropTop, OsdPipSetup.CropBottom,
- OsdPipSetup.CropLeft, OsdPipSetup.CropRight,
- 0, 0, 0, 0);
+ contextResample = img_resample_full_init(m_Width, m_Height,
+ m_Context->width, m_Context->height,
+ OsdPipSetup.CropTop, OsdPipSetup.CropBottom,
+ OsdPipSetup.CropLeft, OsdPipSetup.CropRight,
+ 0, 0, 0, 0);
#endif
- if (!contextResample) {
- printf("Error initializing resample context.\n");
- return -1;
- }
- avpicture_fill((AVPicture *) m_PicResample, m_BufferResample,
- PIX_FMT_YUV420P, m_Width, m_Height);
- img_resample(contextResample, (AVPicture *) m_PicResample, (AVPicture *) m_PicDecoded);
- img_resample_close(contextResample);
-
- return 0;
+ if (!contextResample) {
+ printf("Error initializing resample context.\n");
+ return -1;
+ }
+ avpicture_fill((AVPicture *) m_PicResample, m_BufferResample,
+ PIX_FMT_YUV420P, m_Width, m_Height);
+ img_resample(contextResample, (AVPicture *) m_PicResample, (AVPicture *) m_PicDecoded);
+ img_resample_close(contextResample);
+
+ return 0;
}
int cDecoder::ConvertToRGB()
{
- avpicture_fill((AVPicture *) m_PicConvert, m_BufferConvert,
- PIX_FMT_RGBA32, m_Width, m_Height);
- img_convert((AVPicture *) m_PicConvert, PIX_FMT_RGBA32,
- (AVPicture *) m_PicResample, PIX_FMT_YUV420P,
- m_Width, m_Height);
+ avpicture_fill((AVPicture *) m_PicConvert, m_BufferConvert,
+ PIX_FMT_RGBA32, m_Width, m_Height);
+ img_convert((AVPicture *) m_PicConvert, PIX_FMT_RGBA32,
+ (AVPicture *) m_PicResample, PIX_FMT_YUV420P,
+ m_Width, m_Height);
- return 0;
+ return 0;
}
double cDecoder::AspectRatio()
{
#if LIBAVCODEC_BUILD < 4687
- return m_Context->aspect_ratio;
+ return m_Context->aspect_ratio;
#else
- return av_q2d(m_Context->sample_aspect_ratio) * (double) m_Context->width / (double) m_Context->height;
+ return av_q2d(m_Context->sample_aspect_ratio) * (double) m_Context->width / (double) m_Context->height;
#endif
}
diff --git a/decoder.h b/decoder.h
index ecc0adb..f38870e 100644
--- a/decoder.h
+++ b/decoder.h
@@ -10,32 +10,32 @@
extern "C"
{
#ifdef HAVE_FFMPEG_STATIC
-# include <avcodec.h>
+# include <avcodec.h>
#else
-# include <ffmpeg/avcodec.h>
+# include <ffmpeg/avcodec.h>
#endif
}
class cDecoder {
private:
- AVCodec * m_Codec;
- AVCodecContext * m_Context;
- AVFrame * m_PicDecoded;
- AVFrame * m_PicResample;
- AVFrame * m_PicConvert;
- unsigned char * m_BufferResample;
- unsigned char * m_BufferConvert;
- int m_Width;
- int m_Height;
+ AVCodec * m_Codec;
+ AVCodecContext * m_Context;
+ AVFrame * m_PicDecoded;
+ AVFrame * m_PicResample;
+ AVFrame * m_PicConvert;
+ unsigned char * m_BufferResample;
+ unsigned char * m_BufferConvert;
+ int m_Width;
+ int m_Height;
public:
- int Open();
- int Close();
- int Decode(unsigned char * data, int length);
- int Resample(int width, int height);
- int ConvertToRGB();
- AVFrame * PicResample() { return m_PicResample; }
- AVFrame * PicConvert() { return m_PicConvert; }
- double AspectRatio();
+ int Open();
+ int Close();
+ int Decode(unsigned char * data, int length);
+ int Resample(int width, int height);
+ int ConvertToRGB();
+ AVFrame * PicResample() { return m_PicResample; }
+ AVFrame * PicConvert() { return m_PicConvert; }
+ double AspectRatio();
};
#endif // VDR_OSDPIP_DECODER_H
diff --git a/i18n.c b/i18n.c
index 070a1d2..25bb047 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,669 +4,659 @@
* See the README file for copyright information and how to reach the author.
*/
+#if (APIVERSNUM < 10507)
+
#include "i18n.h"
const tI18nPhrase Phrases[] = {
- {
- "OSD Picture-in-Picture", // English
- "OSD Bild-in-Bild", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Kuva kuvassa -toiminto (OSD)", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Picture-in-Picture", // English
- "Bild-in-Bild", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Kuva kuvassa", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Crop left", // English
- "Links abschneiden", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Leikkaa vasemmalta", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Crop right", // English
- "Rechts abschneiden", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Leikkaa oikealta", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Crop at top", // English
- "Oben abschneiden", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Leikkaa ylhäältä", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Crop at bottom", // English
- "Unten abschneiden", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Leikkaa alhaalta", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Color depth", // English
- "Farbtiefe", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Värisyvyys", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Size", // English
- "Größe", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Koko", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Frames to display", // English
- "Darzustellende Bilder", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Näytä kehykset", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Drop frames", // English
- "Einzelbilder auslassen", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Hylkää kehyksiä", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Swap FFMPEG output", // English
- "FFMPEG Ausgabe umdrehen", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Invertoi FFMPEG-kuva", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Show info window", // English
- "Info-Fenster anzeigen", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Näytä kanavatieto", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Info window width", // English
- "Breite Info-Fenster", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Kanavatiedon leveys", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Info window position", // English
- "Position Info-Fenster", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Kanavatiedon sijainti", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "top left", // English
- "oben links", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "vasen yläreuna", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "top right", // English
- "oben rechts", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "oikea yläreuna", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "bottom left", // English
- "unten links", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "vasen alareuna", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "bottom right", // English
- "unten rechts", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "oikea alareuna", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Greyscale (16)", // English
- "16 Graustufen", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "harmaasävy (16)", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Greyscale (256)", // English
- "256 Graustufen", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "harmaasävy (256)", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Color (256, fixed)", // English
- "256 Farben (fest)", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "väri (256)", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Color (128, variable)", // English
- "128 Farben (variabel)", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "väri (128, vaihtuva)", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "X Position", // English
- "X-Position", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Vaakasijainti", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Y Position", // English
- "Y-Position", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Pystysijainti", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "automatic", // English
- "automatisch", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "automaattisesti", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "none", // English
- "keine", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "ei", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "1 frame", // English
- "1 Frame", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "1 kehys", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "2 frames", // English
- "2 Frames", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "2 kehystä", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "channel only", // English
- "nur Kanal", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "kanava", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "simple", // English
- "einfach", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "lyhyt", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "complete", // English
- "komplett", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "pitkä", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Normal mode", // English
- "Normaler Modus", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Normaalitoiminto", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- {
- "Move mode", // English
- "Bewegungsmodus", // Deutsch
- "", // Slovenski
- "", // Italiano
- "", // Nederlands
- "", // Português
- "", // Français
- "", // Norsk
- "Siirtotoiminto", // Suomi
- "", // Polski
- "", // Español
- "", // Ellinika
- "", // Svenska
- "", // Romaneste
- "", // Magyar
- "", // Catala
- "", // Russian
- "", // Croatian
- },
- { NULL }
+ { "OSD Picture-in-Picture", // English
+ "OSD Bild-in-Bild", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "OSD-PIP Incrustation d'image dans l'image", // Français
+ "", // Norsk
+ "Kuva kuvassa -toiminto (OSD)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Picture-in-Picture", // English
+ "Bild-in-Bild", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Incrustation d'image", // Français
+ "", // Norsk
+ "Kuva kuvassa", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Crop left", // English
+ "Links abschneiden", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couper a gauche", // Français
+ "", // Norsk
+ "Leikkaa vasemmalta", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Crop right", // English
+ "Rechts abschneiden", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couper a droite", // Français
+ "", // Norsk
+ "Leikkaa oikealta", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Crop at top", // English
+ "Oben abschneiden", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couper la partie haute", // Français
+ "", // Norsk
+ "Leikkaa ylhäältä", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Crop at bottom", // English
+ "Unten abschneiden", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couper la partie basse", // Français
+ "", // Norsk
+ "Leikkaa alhaalta", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Color depth", // English
+ "Farbtiefe", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Nobre de couleur pour l'image", // Français
+ "", // Norsk
+ "Värisyvyys", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Size", // English
+ "Größe", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Taille", // Français
+ "", // Norsk
+ "Koko", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Frames to display", // English
+ "Darzustellende Bilder", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Sequence a afficher", // Français
+ "", // Norsk
+ "Näytä kehykset", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Drop frames", // English
+ "Einzelbilder auslassen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Sauter des sequences", // Français
+ "", // Norsk
+ "Hylkää kehyksiä", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Swap FFMPEG output", // English
+ "FFMPEG Ausgabe umdrehen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Changer la sortie de FFMPEG", // Français
+ "", // Norsk
+ "Invertoi FFMPEG-kuva", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Show info window", // English
+ "Info-Fenster anzeigen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Montrer les informations de la fenetre", // Français
+ "", // Norsk
+ "Näytä kanavatieto", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Info window width", // English
+ "Breite Info-Fenster", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Information sur la taille de la fenetre", // Français
+ "", // Norsk
+ "Kanavatiedon leveys", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Info window position", // English
+ "Position Info-Fenster", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Information sur la position de la fenetre", // Français
+ "", // Norsk
+ "Kanavatiedon sijainti", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "top left", // English
+ "oben links", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "En haut a gauche", // Français
+ "", // Norsk
+ "vasen yläreuna", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "top right", // English
+ "oben rechts", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "En haut a droite", // Français
+ "", // Norsk
+ "oikea yläreuna", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "bottom left", // English
+ "unten links", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "En bas a gauche", // Français
+ "", // Norsk
+ "vasen alareuna", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "bottom right", // English
+ "unten rechts", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "En bas a droite", // Français
+ "", // Norsk
+ "oikea alareuna", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Greyscale (16)", // English
+ "16 Graustufen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Niveau de gris (16)", // Français
+ "", // Norsk
+ "harmaasävy (16)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Greyscale (256)", // English
+ "256 Graustufen", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Niveau de gris (256)", // Français
+ "", // Norsk
+ "harmaasävy (256)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Color (256, fixed)", // English
+ "256 Farben (fest)", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couleur (256 fixe)", // Français
+ "", // Norsk
+ "väri (256)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Color (128, variable)", // English
+ "128 Farben (variabel)", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Couleur (128 variable)", // Français
+ "", // Norsk
+ "väri (128, vaihtuva)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Color (256, dithered)", // English
+ "256 Farben (dithered)", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "väri (256)", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "X Position", // English
+ "X-Position", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "X Position", // Français
+ "", // Norsk
+ "Vaakasijainti", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Y Position", // English
+ "Y-Position", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Y Position", // Français
+ "", // Norsk
+ "Pystysijainti", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "automatic", // English
+ "automatisch", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Automatique", // Français
+ "", // Norsk
+ "automaattisesti", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "none", // English
+ "keine", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Aucun", // Français
+ "", // Norsk
+ "ei", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "1 frame", // English
+ "1 Frame", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Sequence 1", // Français
+ "", // Norsk
+ "1 kehys", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "2 frames", // English
+ "2 Frames", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Sequence 2", // Français
+ "", // Norsk
+ "2 kehystä", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "channel only", // English
+ "nur Kanal", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Seulement la chaine", // Français
+ "", // Norsk
+ "kanava", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "simple", // English
+ "einfach", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Simple", // Français
+ "", // Norsk
+ "lyhyt", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "complete", // English
+ "komplett", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Complet", // Français
+ "", // Norsk
+ "pitkä", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Normal mode", // English
+ "Normaler Modus", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Mode normale", // Français
+ "", // Norsk
+ "Normaalitoiminto", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { "Move mode", // English
+ "Bewegungsmodus", // Deutsch
+ "", // Slovenski
+ "", // Italiano
+ "", // Nederlands
+ "", // Português
+ "Mode mouvement", // Français
+ "", // Norsk
+ "Siirtotoiminto", // Suomi
+ "", // Polski
+ "", // Español
+ "", // Ellinika
+ "", // Svenska
+ "", // Romaneste
+ "", // Magyar
+ "", // Catala
+ "", // Russian
+ "", // Croatian
+ },
+ { NULL }
};
+#endif
+
diff --git a/i18n.h b/i18n.h
index 7ed5d79..1518403 100644
--- a/i18n.h
+++ b/i18n.h
@@ -7,8 +7,14 @@
#ifndef VDR_OSDPIP_I18N_H
#define VDR_OSDPIP_I18N_H
+#include <vdr/config.h>
#include <vdr/i18n.h>
+#if (APIVERSNUM < 10507)
+#define trNOOP(a) a
+#define trVDR tr
+#endif
+
extern const tI18nPhrase Phrases[];
#endif // VDR_OSDPIP_I18N_H
diff --git a/osd.c b/osd.c
index 2b0822f..0a7773e 100644
--- a/osd.c
+++ b/osd.c
@@ -2,8 +2,12 @@
* OSD Picture in Picture plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
+ *
+ * Copyright (C) 2007 Martin Wache for the dithered 256 color mode
*/
+#include <stdint.h>
+
#include "osd.h"
#include "decoder.h"
#include "quantize.h"
@@ -17,537 +21,624 @@
cMutex Mutex;
cOsdPipObject::cOsdPipObject(cDevice *Device, const cChannel *Channel)
-: cOsdObject(true)
+: cOsdObject(true),
+ cThread("osdpip_osd")
{
- m_Channel = Channel;
- m_Osd = NULL;
- m_ESBuffer = new cRingBufferFrame(MEGABYTE(3), true);
-
- m_Active = false;
- m_Ready = false;
- m_Reset = true;
- m_MoveMode = false;
- m_Width = m_Height = -1;
- m_Bitmap = NULL;
- m_InfoWindow = NULL;
-
- m_AlphaBase = 0xFF000000;
- for (int i = 0; i < 256; i++)
- m_Palette[i] = 0xFD000000 | i;
- m_PaletteStart = 1;
-
- Device->SwitchChannel(m_Channel, false);
- m_Receiver = new cOsdPipReceiver(m_Channel, m_ESBuffer);
- Device->AttachReceiver(m_Receiver);
+ m_Channel = Channel;
+ m_Osd = NULL;
+ m_ESBuffer = new cRingBufferFrame(MEGABYTE(3), true);
+
+ m_Active = false;
+ m_Ready = false;
+ m_Reset = true;
+ m_MoveMode = false;
+ m_Width = m_Height = -1;
+ m_Bitmap = NULL;
+ m_InfoWindow = NULL;
+
+ m_AlphaBase = 0xFF000000;
+ for (int i = 0; i < 256; i++)
+ m_Palette[i] = m_AlphaBase | i;
+ m_PaletteStart = 1;
+
+ Device->SwitchChannel(m_Channel, false);
+ m_Receiver = new cOsdPipReceiver(m_Channel, m_ESBuffer);
+ Device->AttachReceiver(m_Receiver);
}
cOsdPipObject::~cOsdPipObject()
{
- Stop();
-
- delete m_Receiver;
- delete m_ESBuffer;
- if (m_Bitmap != NULL)
- delete m_Bitmap;
- delete m_InfoWindow;
- if (m_Osd != NULL)
- delete m_Osd;
+ Stop();
+
+ delete m_Receiver;
+ delete m_ESBuffer;
+ if (m_Bitmap != NULL)
+ delete m_Bitmap;
+ delete m_InfoWindow;
+ if (m_Osd != NULL)
+ delete m_Osd;
}
void cOsdPipObject::Stop(void)
{
- if (m_Active)
- {
- m_Active = false;
- Cancel(3);
- }
- m_ESBuffer->Clear();
+ if (m_Active)
+ {
+ m_Active = false;
+ Cancel(3);
+ }
+ m_ESBuffer->Clear();
}
void cOsdPipObject::SwapChannels(void)
{
- const cChannel *chan = cDevice::CurrentChannel() != 0
- ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
- if (chan) {
- Stop();
- Channels.SwitchTo(m_Channel->Number());
- cDevice *dev = cDevice::GetDevice(chan, 1);
- if (dev) {
- DELETENULL(m_Receiver);
- m_Channel = chan;
- dev->SwitchChannel(m_Channel, false);
- m_Receiver = new cOsdPipReceiver(m_Channel, m_ESBuffer);
- dev->AttachReceiver(m_Receiver);
- }
- Start();
- }
+ const cChannel *chan = cDevice::CurrentChannel() != 0
+ ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
+ if (chan) {
+ Stop();
+ Channels.SwitchTo(m_Channel->Number());
+#if (APIVERSNUM < 10500)
+ cDevice *dev = cDevice::GetDevice(chan, 1);
+#else
+ cDevice *dev = cDevice::GetDevice(chan, 1, false);
+#endif
+ if (dev) {
+ DELETENULL(m_Receiver);
+ m_Channel = chan;
+ dev->SwitchChannel(m_Channel, false);
+ m_Receiver = new cOsdPipReceiver(m_Channel, m_ESBuffer);
+ dev->AttachReceiver(m_Receiver);
+ }
+ Start();
+ }
+}
+
+static inline uint8_t clip(int x)
+{
+ if (x<=0)
+ return 0;
+ if (x>=255)
+ return 255;
+ return (uint8_t) x;
+}
+
+static inline uint32_t YUV_to_RGB32(int py, int pu, int pv)
+{
+ py=(((int) py)-16)*298+128;
+ pu=((int) pu)-128;
+ pv=((int) pv)-128;
+
+ int r=(409*pv);
+ int g=(-100*pu-208*pv);
+ int b=(516*pu);
+
+ //printf("%d %d %d -> %d %d %d \n", py,pu, pv,clip((py+r)>>8),clip((py+g)>>8),clip((py+b)>>8));
+ return (clip((py+r)>>8)<<16) | (clip((py+g)>>8)<<8) | clip((py+b)>>8);
}
void cOsdPipObject::ProcessImage(unsigned char * data, int length)
{
- unsigned int value;
- unsigned int * outputPalette;
- unsigned char * outputImage;
- int height;
-
- if (m_FrameDrop != -1)
- {
- if (OsdPipSetup.FrameMode == kFrameModeI)
- {
- if (m_FrameDrop == OsdPipSetup.FrameDrop)
- {
- m_FrameDrop = 0;
- }
- else
- {
- m_FrameDrop++;
- return;
- }
- }
- }
-
- if (decoder.Decode(data, length) != 0)
- return;
-
- if (m_FrameDrop != -1)
- {
- if (OsdPipSetup.FrameMode == kFrameModeIP ||
- OsdPipSetup.FrameMode == kFrameModeIPB)
- {
- if (m_FrameDrop == OsdPipSetup.FrameDrop)
- {
- m_FrameDrop = 0;
- }
- else
- {
- m_FrameDrop++;
- return;
- }
- }
- }
-
- if (!m_Ready)
- {
- if (m_Bitmap != NULL)
- delete m_Bitmap;
- m_Bitmap = NULL;
- if (m_InfoWindow != NULL)
- delete m_InfoWindow;
- m_InfoWindow = NULL;
- switch (OsdPipSetup.Size)
- {
- case 0: m_Width = 100; m_Height = 80; break;
- case 1: m_Width = 120; m_Height = 96; break;
- case 2: m_Width = 140; m_Height = 112; break;
- case 3: m_Width = 160; m_Height = 128; break;
- case 4: m_Width = 180; m_Height = 144; break;
- case 5: m_Width = 200; m_Height = 160; break;
- case 6: m_Width = 220; m_Height = 176; break;
- case 7: m_Width = 240; m_Height = 192; break;
- case 8: m_Width = 260; m_Height = 208; break;
- case 9: m_Width = 280; m_Height = 224; break;
- case 10: m_Width = 300; m_Height = 240; break;
- }
- if (OsdPipSetup.ShowInfo > 0)
- {
- int infoX = 0;
- int infoY = 0;
- int infoH = OsdPipSetup.ShowInfo * 30;
-
- switch (OsdPipSetup.InfoPosition)
- {
- case kInfoTopLeft:
- infoX = Setup.OSDLeft;
- infoY = Setup.OSDTop;
- break;
- case kInfoTopRight:
- infoX = Setup.OSDLeft + Setup.OSDWidth - OsdPipSetup.InfoWidth;
- infoY = Setup.OSDTop;
- break;
- case kInfoBottomLeft:
- infoX = Setup.OSDLeft;
- infoY = Setup.OSDTop + Setup.OSDHeight - infoH;
- break;
- case kInfoBottomRight:
- infoX = Setup.OSDLeft + Setup.OSDWidth - OsdPipSetup.InfoWidth;
- infoY = Setup.OSDTop + Setup.OSDHeight - infoH;
- break;
- }
- tArea areas[] =
- {
- { OsdPipSetup.XPosition, OsdPipSetup.YPosition, OsdPipSetup.XPosition + m_Width - 1, OsdPipSetup.YPosition + m_Height - 1, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8 },
- { infoX, infoY, infoX + OsdPipSetup.InfoWidth - 1, infoY + infoH - 1, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8 }
- };
- if (m_Osd->CanHandleAreas(areas, 2) == oeOk)
- m_Osd->SetAreas(areas, 2);
- else
- m_Osd->SetAreas(areas, 1);
- m_Bitmap = new cBitmap(m_Width, m_Height, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
- m_InfoWindow = new cOsdInfoWindow(m_Osd, m_Palette, infoX, infoY);
- }
- else
- {
- tArea areas[] =
- {
- { OsdPipSetup.XPosition, OsdPipSetup.YPosition, OsdPipSetup.XPosition + m_Width - 1, OsdPipSetup.YPosition + m_Height - 1, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8 }
- };
- m_Osd->SetAreas(areas, 1);
- m_Bitmap = new cBitmap(m_Width, m_Height, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
- }
-
- Mutex.Lock();
- if (OsdPipSetup.ColorDepth == kDepthGrey256)
- {
- for (int i = 0; i < 256; i++)
- m_Palette[i] = m_AlphaBase | (i << 16) | (i << 8) | i;
- m_Palette[0] = 0xFD000000;
- m_Palette[255] = 0xFDFFFFFF;
- }
- if (OsdPipSetup.ColorDepth == kDepthColor256fix)
- {
- for (int i = 0; i < 252; i++)
- m_Palette[i + 1] = m_AlphaBase | quantizer->OutputPalette()[i];
- m_Palette[0] = 0xFD000000;
- m_Palette[255] = 0xFDFFFFFF;
- }
- if (OsdPipSetup.ColorDepth == kDepthColor128var)
- {
- m_Palette[0] = 0xFD000000;
- m_Palette[255] = 0xFDFFFFFF;
- }
- Mutex.Unlock();
- }
-
- if (decoder.AspectRatio() > 0.1)
- height = (int) ((float) m_Width / decoder.AspectRatio() * 16.0f / 15.0f + 0.5);
- else
- height = m_Height;
- if (decoder.Resample(m_Width, height) != 0)
- return;
-
- int size;
- size = m_Width * height;
-
- if (OsdPipSetup.ColorDepth == kDepthGrey16)
- {
- m_Bitmap->DrawRectangle(0, 0, m_Width - 1, (m_Height - height) / 2 - 1, m_Palette[0]);
- m_Bitmap->DrawRectangle(0, (m_Height + height) / 2, m_Width - 1, m_Height - 1, m_Palette[0]);
- outputImage = decoder.PicResample()->data[0];
- for (int y = 0; y < height; y++)
- {
- for (int x = 0; x < m_Width; x++)
- {
- value = outputImage[y * m_Width + x];
- value = value & 0xF0;
- value = m_AlphaBase | (value << 16) | (value << 8) | value;
- m_Bitmap->DrawPixel(x, y + (m_Height - height) / 2, value);
- }
- }
- }
- if (OsdPipSetup.ColorDepth == kDepthGrey256)
- {
- outputImage = decoder.PicResample()->data[0];
- m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- for (int y = 0; y < height; y++)
- {
- for (int x = 0; x < m_Width; x++)
- {
- m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, outputImage[y * m_Width + x]);
- }
- }
- }
- if (OsdPipSetup.ColorDepth == kDepthColor256fix ||
- OsdPipSetup.ColorDepth == kDepthColor128var)
- {
- if (decoder.ConvertToRGB() != 0)
- return;
-
- if (OsdPipSetup.SwapFfmpeg)
- {
- unsigned int * bufPtr = (unsigned int *) decoder.PicConvert()->data[0];
- unsigned char red, green, blue, alpha;
- for (int i = 0; i < size; i++)
- {
- value = *bufPtr;
- blue = value;
- green = value >> 8;
- red = value >> 16;
- alpha = value >> 24;
- value = (alpha << 24) | (blue << 16) | (green << 8) | red;
- *bufPtr = value;
- bufPtr++;
- }
- }
-
- quantizer->Quantize(decoder.PicConvert()->data[0], size, 127);
-
- outputPalette = quantizer->OutputPalette();
- outputImage = quantizer->OutputImage();
- if (OsdPipSetup.ColorDepth == kDepthColor256fix)
- {
- m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- for (int y = 0; y < height; y++)
- {
- for (int x = 0; x < m_Width; x++)
- {
- m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, outputImage[y * m_Width + x] + 1);
- }
- }
- }
- else
- {
- Mutex.Lock();
- for (int i = 0; i < 127; i++)
- {
- m_Palette[m_PaletteStart + i] = outputPalette[i];
- m_Palette[m_PaletteStart + i] |= m_AlphaBase;
- }
- Mutex.Unlock();
-
- m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- for (int y = 0; y < height; y++)
- {
- for (int x = 0; x < m_Width; x++)
- {
- m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, m_PaletteStart + outputImage[y * m_Width + x]);
- }
- }
-
- if (m_PaletteStart == 1)
- {
- m_PaletteStart = 128;
- m_AlphaBase = 0xFE000000;
- }
- else
- {
- m_PaletteStart = 1;
- m_AlphaBase = 0xFF000000;
- }
- }
- }
- if (!m_Ready)
- {
- if (OsdPipSetup.ShowInfo)
- {
- m_InfoWindow->SetChannel(Channels.GetByNumber(cDevice::ActualDevice()->CurrentChannel()));
- m_InfoWindow->Show();
- }
- m_Ready = true;
- }
- Mutex.Lock();
- m_Osd->DrawBitmap(OsdPipSetup.XPosition, OsdPipSetup.YPosition, *m_Bitmap);
- m_Osd->Flush();
- Mutex.Unlock();
+ unsigned int value;
+ unsigned int * outputPalette;
+ unsigned char * outputImage;
+ int height;
+
+ if (m_FrameDrop != -1)
+ {
+ if (OsdPipSetup.FrameMode == kFrameModeI)
+ {
+ if (m_FrameDrop == OsdPipSetup.FrameDrop)
+ {
+ m_FrameDrop = 0;
+ }
+ else
+ {
+ m_FrameDrop++;
+ return;
+ }
+ }
+ }
+
+ if (decoder.Decode(data, length) != 0)
+ return;
+
+ if (m_FrameDrop != -1)
+ {
+ if (OsdPipSetup.FrameMode == kFrameModeIP ||
+ OsdPipSetup.FrameMode == kFrameModeIPB)
+ {
+ if (m_FrameDrop == OsdPipSetup.FrameDrop)
+ {
+ m_FrameDrop = 0;
+ }
+ else
+ {
+ m_FrameDrop++;
+ return;
+ }
+ }
+ }
+
+ if (!m_Ready)
+ {
+ if (m_Bitmap != NULL)
+ delete m_Bitmap;
+ m_Bitmap = NULL;
+ if (m_InfoWindow != NULL)
+ delete m_InfoWindow;
+ m_InfoWindow = NULL;
+ switch (OsdPipSetup.Size)
+ {
+ case 0: m_Width = 100; m_Height = 80; break;
+ case 1: m_Width = 120; m_Height = 96; break;
+ case 2: m_Width = 140; m_Height = 112; break;
+ case 3: m_Width = 160; m_Height = 128; break;
+ case 4: m_Width = 180; m_Height = 144; break;
+ case 5: m_Width = 200; m_Height = 160; break;
+ case 6: m_Width = 220; m_Height = 176; break;
+ case 7: m_Width = 240; m_Height = 192; break;
+ case 8: m_Width = 260; m_Height = 208; break;
+ case 9: m_Width = 280; m_Height = 224; break;
+ case 10: m_Width = 300; m_Height = 240; break;
+ }
+ if (OsdPipSetup.ShowInfo > 0)
+ {
+ int infoX = 0;
+ int infoY = 0;
+ int infoH = OsdPipSetup.ShowInfo * 30;
+
+ switch (OsdPipSetup.InfoPosition)
+ {
+ case kInfoTopLeft:
+ infoX = Setup.OSDLeft;
+ infoY = Setup.OSDTop;
+ break;
+ case kInfoTopRight:
+ infoX = Setup.OSDLeft + Setup.OSDWidth - OsdPipSetup.InfoWidth;
+ infoY = Setup.OSDTop;
+ break;
+ case kInfoBottomLeft:
+ infoX = Setup.OSDLeft;
+ infoY = Setup.OSDTop + Setup.OSDHeight - infoH;
+ break;
+ case kInfoBottomRight:
+ infoX = Setup.OSDLeft + Setup.OSDWidth - OsdPipSetup.InfoWidth;
+ infoY = Setup.OSDTop + Setup.OSDHeight - infoH;
+ break;
+ }
+ tArea areas[] =
+ {
+ {
+ OsdPipSetup.XPosition,
+ OsdPipSetup.YPosition,
+ OsdPipSetup.XPosition + m_Width - 1,
+ OsdPipSetup.YPosition + m_Height - 1,
+ OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8
+ },
+ {
+ infoX,
+ infoY,
+ infoX + OsdPipSetup.InfoWidth - 1,
+ infoY + infoH - 1,
+ OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8
+ }
+ };
+ if (m_Osd->CanHandleAreas(areas, 2) == oeOk)
+ m_Osd->SetAreas(areas, 2);
+ else
+ m_Osd->SetAreas(areas, 1);
+ m_Bitmap = new cBitmap(m_Width, m_Height, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
+ m_InfoWindow = new cOsdInfoWindow(m_Osd, m_Palette, infoX, infoY);
+ }
+ else
+ {
+ tArea areas[] =
+ {
+ {
+ OsdPipSetup.XPosition,
+ OsdPipSetup.YPosition,
+ OsdPipSetup.XPosition + m_Width - 1,
+ OsdPipSetup.YPosition + m_Height - 1,
+ OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8
+ }
+ };
+ m_Osd->SetAreas(areas, 1);
+ m_Bitmap = new cBitmap(m_Width, m_Height, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
+ }
+
+ Mutex.Lock();
+ if (OsdPipSetup.ColorDepth == kDepthGrey256)
+ {
+ for (int i = 0; i < 256; i++)
+ m_Palette[i] = m_AlphaBase | (i << 16) | (i << 8) | i;
+ m_Palette[0] = m_AlphaBase | 0x00000000;
+ m_Palette[255] = m_AlphaBase | 0x00FFFFFF;
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthColor256fix)
+ {
+ for (int i = 0; i < 252; i++)
+ m_Palette[i + 1] = m_AlphaBase | quantizer->OutputPalette()[i];
+ m_Palette[0] = m_AlphaBase | 0x00000000;
+ m_Palette[255] = m_AlphaBase | 0x00FFFFFF;
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthColor128var)
+ {
+ m_Palette[0] = m_AlphaBase | 0x00000000;
+ m_Palette[255] = m_AlphaBase | 0x00FFFFFF;
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthColor256dither)
+ {
+#define Y_STEPS 10
+#define U_STEPS 5
+#define V_STEPS 5
+ for (int y=0; y<Y_STEPS; y++)
+ for (int u=0; u<U_STEPS; u++)
+ for (int v=0; v<V_STEPS; v++)
+ m_Palette[y*U_STEPS*V_STEPS+u*V_STEPS+v+1] = m_AlphaBase
+ | YUV_to_RGB32(y*255/(Y_STEPS), u*255/(U_STEPS), v*255/(V_STEPS));
+ m_Palette[0] = m_AlphaBase | 0x00000000;
+ m_Palette[255] = m_AlphaBase | 0x00FFFFFF;
+ }
+ Mutex.Unlock();
+ }
+
+ if (decoder.AspectRatio() > 0.1)
+ height = (int) ((float) m_Width / decoder.AspectRatio() * 16.0f / 15.0f + 0.5);
+ else
+ height = m_Height;
+ if (decoder.Resample(m_Width, height) != 0)
+ return;
+
+ int size;
+ size = m_Width * height;
+
+ if (OsdPipSetup.ColorDepth == kDepthGrey16)
+ {
+ m_Bitmap->DrawRectangle(0, 0, m_Width - 1, (m_Height - height) / 2 - 1, m_Palette[0]);
+ m_Bitmap->DrawRectangle(0, (m_Height + height) / 2, m_Width - 1, m_Height - 1, m_Palette[0]);
+ outputImage = decoder.PicResample()->data[0];
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < m_Width; x++)
+ {
+ value = outputImage[y * m_Width + x];
+ value = value & 0xF0;
+ value = m_AlphaBase | (value << 16) | (value << 8) | value;
+ m_Bitmap->DrawPixel(x, y + (m_Height - height) / 2, value);
+ }
+ }
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthGrey256)
+ {
+ outputImage = decoder.PicResample()->data[0];
+ m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < m_Width; x++)
+ {
+ m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, outputImage[y * m_Width + x]);
+ }
+ }
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthColor256dither)
+ {
+ outputImage = decoder.PicResample()->data[0];
+ uint8_t *pY=decoder.PicResample()->data[0];
+ uint8_t *pU=(uint8_t*)decoder.PicResample()->data[1];
+ uint8_t *pV=(uint8_t*)decoder.PicResample()->data[2];
+ m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < m_Width; x++)
+ {
+ int uvpos = (y>>1) * (m_Width>>1) + (x>>1);
+ static int uvdither[] =
+ {
+ 2*255/U_STEPS/4,
+ 3*255/U_STEPS/4,
+ 4*255/U_STEPS/4,
+ 1*255/U_STEPS/4
+ };
+ static int ydither[] =
+ {
+ 2*255/Y_STEPS/4,
+ 3*255/Y_STEPS/4,
+ 4*255/Y_STEPS/4,
+ 1*255/Y_STEPS/4
+ };
+ int cy=((unsigned int)pY[y*m_Width+x]);
+ int cu=((unsigned int)pU[uvpos]);
+ int cv=((unsigned int)pV[uvpos]);
+#define CLAMP(C,var) ((var)>=C##_STEPS?C##_STEPS-1:(var))
+ cy=(cy+ydither[2*(y&1)+(x&1)])*Y_STEPS/255;
+ cu=(cu+uvdither[2*(y&1)+(x&1)])*U_STEPS/255;
+ cv=(cv+uvdither[2*(y&1)+(x&1)])*V_STEPS/255;
+ int color=CLAMP(Y,cy)*(V_STEPS*U_STEPS)+CLAMP(U,cu)*(V_STEPS)+CLAMP(V,cv);
+ m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, color+1);
+ }
+ }
+ }
+ else if (OsdPipSetup.ColorDepth == kDepthColor256fix ||
+ OsdPipSetup.ColorDepth == kDepthColor128var)
+ {
+ if (decoder.ConvertToRGB() != 0)
+ return;
+
+ if (OsdPipSetup.SwapFfmpeg)
+ {
+ unsigned int * bufPtr = (unsigned int *) decoder.PicConvert()->data[0];
+ unsigned char red, green, blue, alpha;
+ for (int i = 0; i < size; i++)
+ {
+ value = *bufPtr;
+ blue = value;
+ green = value >> 8;
+ red = value >> 16;
+ alpha = value >> 24;
+ value = (alpha << 24) | (blue << 16) | (green << 8) | red;
+ *bufPtr = value;
+ bufPtr++;
+ }
+ }
+
+ quantizer->Quantize(decoder.PicConvert()->data[0], size, 127);
+
+ outputPalette = quantizer->OutputPalette();
+ outputImage = quantizer->OutputImage();
+ if (OsdPipSetup.ColorDepth == kDepthColor256fix)
+ {
+ m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < m_Width; x++)
+ {
+ m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, outputImage[y * m_Width + x] + 1);
+ }
+ }
+ }
+ else
+ {
+ Mutex.Lock();
+ for (int i = 0; i < 127; i++)
+ {
+ m_Palette[m_PaletteStart + i] = outputPalette[i];
+ m_Palette[m_PaletteStart + i] |= m_AlphaBase;
+ }
+ Mutex.Unlock();
+
+ m_Bitmap->DrawRectangle(0, 0, m_Width - 1, m_Height - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ for (int y = 0; y < height; y++)
+ {
+ for (int x = 0; x < m_Width; x++)
+ {
+ m_Bitmap->SetIndex(x, y + (m_Height - height) / 2, m_PaletteStart + outputImage[y * m_Width + x]);
+ }
+ }
+
+ if (m_PaletteStart == 1)
+ {
+ m_PaletteStart = 128;
+ }
+ else
+ {
+ m_PaletteStart = 1;
+ }
+ }
+ }
+ if (!m_Ready)
+ {
+ if (OsdPipSetup.ShowInfo)
+ {
+ m_InfoWindow->SetChannel(Channels.GetByNumber(cDevice::ActualDevice()->CurrentChannel()));
+ m_InfoWindow->Show();
+ }
+ m_Ready = true;
+ }
+ Mutex.Lock();
+ m_Osd->DrawBitmap(OsdPipSetup.XPosition, OsdPipSetup.YPosition, *m_Bitmap, 0, 0, true);
+ m_Osd->Flush();
+ Mutex.Unlock();
}
void cOsdPipObject::Action(void)
{
- m_Active = true;
-
- isyslog("osdpip: decoder thread started (pid = %d)", getpid());
-
- decoder.Open();
-
- if (OsdPipSetup.ColorDepth == kDepthColor128var)
- quantizer = new cQuantizeWu();
- if (OsdPipSetup.ColorDepth == kDepthColor256fix)
- quantizer = new cQuantizeFixed();
-
- cFrame * frame;
- int pictureType;
- m_FrameDrop = OsdPipSetup.FrameDrop;
-
- while (m_Active)
- {
- if (m_Reset)
- {
- if (m_Osd)
- delete m_Osd;
- m_Osd = cOsdProvider::NewOsd(0, 0);
- if (!m_Osd)
- break;
- m_Ready = false;
- m_Reset = false;
- }
- if (m_FrameDrop == -1)
- {
- while ((frame = m_ESBuffer->Get()) != NULL)
- {
- if (frame->Count() > 0)
- {
- if (m_ESBuffer->Available() == frame->Count())
- break;
- if (OsdPipSetup.FrameMode == kFrameModeIP ||
- OsdPipSetup.FrameMode == kFrameModeIPB)
- {
- decoder.Decode(frame->Data(), frame->Count());
- }
- }
- m_ESBuffer->Drop(frame);
- }
- if (frame)
- {
- pictureType = frame->Index();
- ProcessImage(frame->Data(), frame->Count());
- m_ESBuffer->Drop(frame);
- }
- }
- else
- {
- frame = m_ESBuffer->Get();
- {
- if (frame && frame->Count() > 0)
- {
- pictureType = frame->Index();
- ProcessImage(frame->Data(), frame->Count());
- m_ESBuffer->Drop(frame);
- }
- else
- {
- if (frame)
- m_ESBuffer->Drop(frame);
- usleep(1);
- }
- }
- }
- }
-
- if (OsdPipSetup.ColorDepth == kDepthColor128var ||
- OsdPipSetup.ColorDepth == kDepthColor256fix)
- delete quantizer;
- decoder.Close();
-
- isyslog("osdpip: decoder thread stopped");
+ m_Active = true;
+
+ isyslog("osdpip: decoder thread started (pid = %d)", getpid());
+
+ decoder.Open();
+
+ if (OsdPipSetup.ColorDepth == kDepthColor128var)
+ quantizer = new cQuantizeWu();
+ if (OsdPipSetup.ColorDepth == kDepthColor256fix)
+ quantizer = new cQuantizeFixed();
+
+ cFrame * frame;
+ m_FrameDrop = OsdPipSetup.FrameDrop;
+
+ while (m_Active)
+ {
+ if (m_Reset)
+ {
+ if (m_Osd)
+ delete m_Osd;
+ m_Osd = cOsdProvider::NewOsd(0, 0);
+ if (!m_Osd)
+ break;
+ m_Ready = false;
+ m_Reset = false;
+ }
+ if (m_FrameDrop == -1)
+ {
+ while ((frame = m_ESBuffer->Get()) != NULL)
+ {
+ if (frame->Count() > 0)
+ {
+ if (m_ESBuffer->Available() == frame->Count())
+ break;
+ if (OsdPipSetup.FrameMode == kFrameModeIP ||
+ OsdPipSetup.FrameMode == kFrameModeIPB)
+ {
+ if (frame->Index() != B_FRAME)
+ decoder.Decode(frame->Data(), frame->Count());
+ }
+ }
+ m_ESBuffer->Drop(frame);
+ }
+ if (frame)
+ {
+ ProcessImage(frame->Data(), frame->Count());
+ m_ESBuffer->Drop(frame);
+ }
+ }
+ else
+ {
+ frame = m_ESBuffer->Get();
+ if (frame)
+ {
+ if (frame->Count() > 0)
+ {
+ ProcessImage(frame->Data(), frame->Count());
+ }
+ m_ESBuffer->Drop(frame);
+ }
+ }
+ cCondWait::SleepMs(1);
+ }
+
+ if (OsdPipSetup.ColorDepth == kDepthColor128var ||
+ OsdPipSetup.ColorDepth == kDepthColor256fix)
+ delete quantizer;
+ decoder.Close();
+
+ isyslog("osdpip: decoder thread stopped");
}
void cOsdPipObject::Show(void)
{
- Start();
+ Start();
}
eOSState cOsdPipObject::ProcessKey(eKeys Key)
{
- eOSState state = cOsdObject::ProcessKey(Key);
- if (state == osUnknown)
- {
- if (m_MoveMode)
- {
- switch (Key & ~k_Repeat)
- {
- case k0:
- Channels.SwitchTo(m_Channel->Number());
- case kBack:
- return osEnd;
- case kGreen:
- m_MoveMode = false;
- if (m_Ready && m_InfoWindow)
- {
- m_InfoWindow->SetMessage(tr("Normal mode"));
- m_InfoWindow->Show();
- }
- break;
- case kUp:
- if (OsdPipSetup.YPosition >= 10)
- OsdPipSetup.YPosition -= 10;
- m_Reset = true;
- break;
- case kLeft:
- if (OsdPipSetup.XPosition >= 10)
- OsdPipSetup.XPosition -= 10;
- m_Reset = true;
- break;
- case kRight:
- if (OsdPipSetup.XPosition + m_Width <= 720 - 10)
- OsdPipSetup.XPosition += 10;
- m_Reset = true;
- break;
- case kDown:
- if (OsdPipSetup.YPosition + m_Height <= 576 - 10)
- OsdPipSetup.YPosition += 10;
- m_Reset = true;
- break;
- }
- state = osContinue;
- }
- else
- {
- if (m_Ready && m_InfoWindow)
- state = m_InfoWindow->ProcessKey(Key);
- }
- }
- if (state == osUnknown)
- {
- switch (Key & ~k_Repeat)
- {
- case k0:
- Channels.SwitchTo(m_Channel->Number());
- case kBack:
- return osEnd;
- case kRed:
- SwapChannels();
- break;
- case kGreen:
- m_MoveMode = true;
- if (m_Ready && m_InfoWindow)
- {
- m_InfoWindow->SetMessage(tr("Move mode"));
- m_InfoWindow->Show();
- }
- break;
- case kUp:
- case kDown:
- cDevice::SwitchChannel(NORMALKEY(Key) == kUp ? 1 : -1);
- break;
- case kOk:
- if (OsdPipSetup.ShowInfo)
- {
- m_InfoWindow->Show();
- }
- break;
- default:
- return state;
- }
- state = osContinue;
- }
- return state;
+ eOSState state = cOsdObject::ProcessKey(Key);
+ if (state == osUnknown)
+ {
+ if (m_MoveMode)
+ {
+ switch (Key & ~k_Repeat)
+ {
+ case k0:
+ Channels.SwitchTo(m_Channel->Number());
+ case kBack:
+ return osEnd;
+ case kGreen:
+ m_MoveMode = false;
+ if (m_Ready && m_InfoWindow)
+ {
+ m_InfoWindow->SetMessage(tr("Normal mode"));
+ m_InfoWindow->Show();
+ }
+ break;
+ case kUp:
+ if (OsdPipSetup.YPosition >= 10)
+ OsdPipSetup.YPosition -= 10;
+ m_Reset = true;
+ break;
+ case kLeft:
+ if (OsdPipSetup.XPosition >= 10)
+ OsdPipSetup.XPosition -= 10;
+ m_Reset = true;
+ break;
+ case kRight:
+ if (OsdPipSetup.XPosition + m_Width <= 720 - 10)
+ OsdPipSetup.XPosition += 10;
+ m_Reset = true;
+ break;
+ case kDown:
+ if (OsdPipSetup.YPosition + m_Height <= 576 - 10)
+ OsdPipSetup.YPosition += 10;
+ m_Reset = true;
+ break;
+ }
+ state = osContinue;
+ }
+ else
+ {
+ if (m_Ready && m_InfoWindow)
+ state = m_InfoWindow->ProcessKey(Key);
+ }
+ }
+ if (state == osUnknown)
+ {
+ switch (Key & ~k_Repeat)
+ {
+ case kNone:
+ return osContinue;
+ case k0:
+ Channels.SwitchTo(m_Channel->Number());
+ case kBack:
+ return osEnd;
+ case kRed:
+ SwapChannels();
+ break;
+ case kGreen:
+ m_MoveMode = true;
+ if (m_Ready && m_InfoWindow)
+ {
+ m_InfoWindow->SetMessage(tr("Move mode"));
+ m_InfoWindow->Show();
+ }
+ break;
+ case kUp:
+ case kDown:
+ cDevice::SwitchChannel(NORMALKEY(Key) == kUp ? 1 : -1);
+ break;
+ case kOk:
+ if (OsdPipSetup.ShowInfo)
+ {
+ m_InfoWindow->Show();
+ }
+ break;
+ default:
+ return state;
+ }
+ state = osContinue;
+ }
+ return state;
}
void cOsdPipObject::ChannelSwitch(const cDevice * device, int channelNumber)
{
- if (device != cDevice::ActualDevice())
- return;
- if (channelNumber == 0)
- return;
- if (channelNumber != cDevice::CurrentChannel())
- return;
- if (!m_Ready)
- return;
- if (OsdPipSetup.ShowInfo)
- {
- m_InfoWindow->SetChannel(Channels.GetByNumber(channelNumber));
- m_InfoWindow->Show();
- }
-}
-
-void cOsdPipObject::OsdClear(void)
-{
- //printf("OsdClear\n");
+ if (device != cDevice::PrimaryDevice())
+ return;
+ if (channelNumber == 0)
+ return;
+ if (channelNumber != cDevice::CurrentChannel())
+ return;
+ if (!m_Ready)
+ return;
+ if (OsdPipSetup.ShowInfo)
+ {
+ m_InfoWindow->SetChannel(Channels.GetByNumber(channelNumber));
+ m_InfoWindow->Show();
+ }
}
void cOsdPipObject::OsdStatusMessage(const char * message)
{
- if (!m_Ready)
- return;
- if (OsdPipSetup.ShowInfo)
- {
- m_InfoWindow->SetMessage(message);
- m_InfoWindow->Show();
- }
+ if (!m_Ready)
+ return;
+ if (OsdPipSetup.ShowInfo)
+ {
+ m_InfoWindow->SetMessage(message);
+ m_InfoWindow->Show();
+ }
}
-
diff --git a/osd.h b/osd.h
index 6bf7427..48f2312 100644
--- a/osd.h
+++ b/osd.h
@@ -23,43 +23,42 @@ class cQuantize;
class cOsdPipObject: public cOsdObject, public cThread, public cStatus {
private:
- cOsd *m_Osd;
- cRingBufferFrame *m_ESBuffer;
- cOsdPipReceiver *m_Receiver;
- const cChannel *m_Channel;
- cBitmap * m_Bitmap;
- cOsdInfoWindow * m_InfoWindow;
+ cOsd *m_Osd;
+ cRingBufferFrame *m_ESBuffer;
+ cOsdPipReceiver *m_Receiver;
+ const cChannel *m_Channel;
+ cBitmap * m_Bitmap;
+ cOsdInfoWindow * m_InfoWindow;
- bool m_Active;
- bool m_Ready;
- bool m_Reset;
- bool m_MoveMode;
- int m_Width, m_Height;
- int m_FrameDrop;
+ bool m_Active;
+ bool m_Ready;
+ bool m_Reset;
+ bool m_MoveMode;
+ int m_Width, m_Height;
+ int m_FrameDrop;
- unsigned int m_AlphaBase;
- unsigned int m_Palette[256];
- int m_PaletteStart;
+ unsigned int m_AlphaBase;
+ unsigned int m_Palette[256];
+ int m_PaletteStart;
- cDecoder decoder;
- cQuantize * quantizer;
+ cDecoder decoder;
+ cQuantize * quantizer;
- void ProcessImage(unsigned char * data, int length);
+ void ProcessImage(unsigned char * data, int length);
- void Stop(void);
- void SwapChannels(void);
+ void Stop(void);
+ void SwapChannels(void);
protected:
- virtual void Action(void);
- virtual void ChannelSwitch(const cDevice * device, int channelNumber);
- virtual void OsdClear(void);
- virtual void OsdStatusMessage(const char * message);
+ virtual void Action(void);
+ virtual void ChannelSwitch(const cDevice * device, int channelNumber);
+ virtual void OsdStatusMessage(const char * message);
public:
- cOsdPipObject(cDevice *Device, const cChannel *Channel);
- virtual ~cOsdPipObject(void);
+ cOsdPipObject(cDevice *Device, const cChannel *Channel);
+ virtual ~cOsdPipObject(void);
- virtual void Show(void);
- eOSState ProcessKey(eKeys k);
+ virtual void Show(void);
+ eOSState ProcessKey(eKeys k);
};
#endif // VDR_OSDPIP_OSD_H
diff --git a/osd_info.c b/osd_info.c
index b0c8e31..7c729d8 100644
--- a/osd_info.c
+++ b/osd_info.c
@@ -1,6 +1,8 @@
#include "osd_info.h"
#include "setup.h"
+#include "i18n.h"
+#include <vdr/device.h>
#include <vdr/thread.h>
#define DIRECTCHANNELTIMEOUT 1
@@ -9,327 +11,327 @@
extern cMutex Mutex;
cOsdInfoWindow::cOsdInfoWindow(cOsd * osd, unsigned int * palette, int x, int y)
-: m_Osd(osd),
- m_Palette(palette),
- m_InfoX(x),
- m_InfoY(y),
- m_Shown(false),
- m_LastTime(0),
- m_Number(0),
- m_Group(-1),
- m_WithInfo(false),
- m_Message(NULL),
- m_Channel(NULL)
+: m_Osd(osd),
+ m_Palette(palette),
+ m_InfoX(x),
+ m_InfoY(y),
+ m_Shown(false),
+ m_LastTime(0),
+ m_Number(0),
+ m_Group(-1),
+ m_WithInfo(false),
+ m_Message(NULL),
+ m_Channel(NULL)
{
- m_Bitmap = new cBitmap(OsdPipSetup.InfoWidth, OsdPipSetup.ShowInfo * 30, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
+ m_Bitmap = new cBitmap(OsdPipSetup.InfoWidth, OsdPipSetup.ShowInfo * 30, OsdPipSetup.ColorDepth == kDepthGrey16 ? 4 : 8);
}
cOsdInfoWindow::~cOsdInfoWindow()
{
- delete m_Bitmap;
+ delete m_Bitmap;
}
void cOsdInfoWindow::SetMessage(const char * message)
{
- m_Message = message;
+ m_Message = message;
}
void cOsdInfoWindow::SetChannel(const cChannel * channel)
{
- m_Channel = channel;
- m_WithInfo = true;
- m_Number = 0;
- m_Group = -1;
+ m_Channel = channel;
+ m_WithInfo = true;
+ m_Number = 0;
+ m_Group = -1;
}
void cOsdInfoWindow::Show()
{
- char channel[101] = "";
- char presentName[101] = "";
- char presentTime[10] = "";
- char followingName[101] = "";
- char followingTime[10] = "";
+ char channel[101] = "";
+ char presentName[101] = "";
+ char presentTime[10] = "";
+ char followingName[101] = "";
+ char followingTime[10] = "";
- if (m_Message)
- {
- snprintf(channel, 100, "%s", m_Message);
- m_Message = NULL;
- }
- else if (m_Channel)
- {
- if (m_Channel->GroupSep())
- snprintf(channel, 100, "%s", m_Channel->Name());
- else
- snprintf(channel, 100, "%d%s %s", m_Channel->Number(), m_Number ? "-" : "", m_Channel->Name());
- if (m_WithInfo)
- {
- const cEvent * present = NULL;
- const cEvent * following = NULL;
- cSchedulesLock schedulesLock;
- const cSchedules * schedules = cSchedules::Schedules(schedulesLock);
- if (schedules)
- {
- const cSchedule * schedule = schedules->GetSchedule(m_Channel->GetChannelID());
- if (schedule)
- {
- if ((present = schedule->GetPresentEvent()) != NULL)
- {
- const char * presentTitle = present->Title();
- if (!isempty(presentTitle))
- {
- sprintf(presentTime, "%s", (const char *) present->GetTimeString());
- sprintf(presentName, "%s", (const char *) presentTitle);
- }
- }
- if ((following = schedule->GetFollowingEvent()) != NULL)
- {
- const char * followingTitle = following->Title();
- if (!isempty(followingTitle))
- {
- sprintf(followingTime, "%s", (const char *) following->GetTimeString());
- sprintf(followingName, "%s", (const char *) followingTitle);
- }
- }
- }
- }
- }
- }
- else if (m_Number)
- snprintf(channel, 100, "%d-", m_Number);
- else
- snprintf(channel, 100, "%s", tr("*** Invalid Channel ***"));
+ if (m_Message)
+ {
+ snprintf(channel, 100, "%s", m_Message);
+ m_Message = NULL;
+ }
+ else if (m_Channel)
+ {
+ if (m_Channel->GroupSep())
+ snprintf(channel, 100, "%s", m_Channel->Name());
+ else
+ snprintf(channel, 100, "%d%s %s", m_Channel->Number(), m_Number ? "-" : "", m_Channel->Name());
+ if (m_WithInfo)
+ {
+ const cEvent * present = NULL;
+ const cEvent * following = NULL;
+ cSchedulesLock schedulesLock;
+ const cSchedules * schedules = cSchedules::Schedules(schedulesLock);
+ if (schedules)
+ {
+ const cSchedule * schedule = schedules->GetSchedule(m_Channel->GetChannelID());
+ if (schedule)
+ {
+ if ((present = schedule->GetPresentEvent()) != NULL)
+ {
+ const char * presentTitle = present->Title();
+ if (!isempty(presentTitle))
+ {
+ sprintf(presentTime, "%s", (const char *) present->GetTimeString());
+ sprintf(presentName, "%s", (const char *) presentTitle);
+ }
+ }
+ if ((following = schedule->GetFollowingEvent()) != NULL)
+ {
+ const char * followingTitle = following->Title();
+ if (!isempty(followingTitle))
+ {
+ sprintf(followingTime, "%s", (const char *) following->GetTimeString());
+ sprintf(followingName, "%s", (const char *) followingTitle);
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (m_Number)
+ snprintf(channel, 100, "%d-", m_Number);
+ else
+ snprintf(channel, 100, "%s", trVDR("*** Invalid Channel ***"));
- Mutex.Lock();
- if (OsdPipSetup.ColorDepth == kDepthGrey16)
- {
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, clrBlack);
- const cFont * font = cFont::GetFont(fontOsd);
-
- m_Bitmap->DrawText(0, 0, channel, clrWhite, clrBlack, font, m_Bitmap->Width(), 29);
- if (m_Bitmap->Height() > 30)
- {
- m_Bitmap->DrawText(0, 30, presentTime, clrWhite, clrBlack, font, 80, 29);
- m_Bitmap->DrawText(80, 30, presentName, clrWhite, clrBlack, font, m_Bitmap->Width() - 80, 29);
- }
- if (m_Bitmap->Height() > 2*30)
- {
- m_Bitmap->DrawText(0, 2*30, followingTime, clrWhite, clrBlack, font, 80, 29);
- m_Bitmap->DrawText(80, 2*30, followingName, clrWhite, clrBlack, font, m_Bitmap->Width() - 80, 29);
- }
- }
- else
- {
- m_Palette[0] = 0xFD000000;
- m_Palette[255] = 0x00FFFFFF;
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap);
- m_Osd->Flush();
- m_Palette[255] = 0xFDFFFFFF;
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- const cFont *font = cFont::GetFont(fontOsd);
- m_Bitmap->DrawText(0, 0, channel, m_Palette[255], m_Palette[0], font, m_Bitmap->Width(), 29);
- if (m_Bitmap->Height() > 30)
- {
- m_Bitmap->DrawText(0, 30, presentTime, m_Palette[255], m_Palette[0], font, 80, 29);
- m_Bitmap->DrawText(80, 30, presentName, m_Palette[255], m_Palette[0], font, m_Bitmap->Width() - 80, 29);
- }
- if (m_Bitmap->Height() > 2*30)
- {
- m_Bitmap->DrawText(0, 2*30, followingTime, m_Palette[255], m_Palette[0], font, 80, 29);
- m_Bitmap->DrawText(80, 2*30, followingName, m_Palette[255], m_Palette[0], font, m_Bitmap->Width() - 80, 29);
- }
- }
- m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap);
- m_Osd->Flush();
- m_Shown = true;
- time(&m_LastTime);
- Mutex.Unlock();
+ Mutex.Lock();
+ if (OsdPipSetup.ColorDepth == kDepthGrey16)
+ {
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, clrBlack);
+ const cFont * font = cFont::GetFont(fontOsd);
+
+ m_Bitmap->DrawText(0, 0, channel, clrWhite, clrBlack, font, m_Bitmap->Width(), 29);
+ if (m_Bitmap->Height() > 30)
+ {
+ m_Bitmap->DrawText(0, 30, presentTime, clrWhite, clrBlack, font, 80, 29);
+ m_Bitmap->DrawText(80, 30, presentName, clrWhite, clrBlack, font, m_Bitmap->Width() - 80, 29);
+ }
+ if (m_Bitmap->Height() > 2*30)
+ {
+ m_Bitmap->DrawText(0, 2*30, followingTime, clrWhite, clrBlack, font, 80, 29);
+ m_Bitmap->DrawText(80, 2*30, followingName, clrWhite, clrBlack, font, m_Bitmap->Width() - 80, 29);
+ }
+ }
+ else
+ {
+ m_Palette[0] = 0xFF000000;
+ m_Palette[255] = 0x00FFFFFF;
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap, 0, 0, true);
+ m_Osd->Flush();
+ m_Palette[255] = 0xFFFFFFFF;
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ const cFont *font = cFont::GetFont(fontOsd);
+ m_Bitmap->DrawText(0, 0, channel, m_Palette[255], m_Palette[0], font, m_Bitmap->Width(), 29);
+ if (m_Bitmap->Height() > 30)
+ {
+ m_Bitmap->DrawText(0, 30, presentTime, m_Palette[255], m_Palette[0], font, 80, 29);
+ m_Bitmap->DrawText(80, 30, presentName, m_Palette[255], m_Palette[0], font, m_Bitmap->Width() - 80, 29);
+ }
+ if (m_Bitmap->Height() > 2*30)
+ {
+ m_Bitmap->DrawText(0, 2*30, followingTime, m_Palette[255], m_Palette[0], font, 80, 29);
+ m_Bitmap->DrawText(80, 2*30, followingName, m_Palette[255], m_Palette[0], font, m_Bitmap->Width() - 80, 29);
+ }
+ }
+ m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap, 0, 0, true);
+ m_Osd->Flush();
+ m_Shown = true;
+ time(&m_LastTime);
+ Mutex.Unlock();
}
void cOsdInfoWindow::Hide()
{
- Mutex.Lock();
- if (OsdPipSetup.ColorDepth == kDepthGrey16)
- {
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, clrTransparent);
- }
- else
- {
- m_Palette[0] = 0xFD000000;
- m_Palette[255] = 0x00FFFFFF;
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
- for (int i = 0; i < 256; i++)
- m_Bitmap->SetColor(i, m_Palette[i]);
- m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width()/2 - 1, m_Bitmap->Height() - 1, m_Palette[255]);
- m_Bitmap->DrawRectangle(m_Bitmap->Width()/2, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[255]);
- }
- m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap);
- m_Osd->Flush();
- m_Shown = false;
- Mutex.Unlock();
+ Mutex.Lock();
+ if (OsdPipSetup.ColorDepth == kDepthGrey16)
+ {
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, clrTransparent);
+ }
+ else
+ {
+ m_Palette[0] = 0xFF000000;
+ m_Palette[255] = 0x00FFFFFF;
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[0]);
+ for (int i = 0; i < 256; i++)
+ m_Bitmap->SetColor(i, m_Palette[i]);
+ m_Bitmap->DrawRectangle(0, 0, m_Bitmap->Width()/2 - 1, m_Bitmap->Height() - 1, m_Palette[255]);
+ m_Bitmap->DrawRectangle(m_Bitmap->Width()/2, 0, m_Bitmap->Width() - 1, m_Bitmap->Height() - 1, m_Palette[255]);
+ }
+ m_Osd->DrawBitmap(m_InfoX, m_InfoY, *m_Bitmap, 0, 0, true);
+ m_Osd->Flush();
+ m_Shown = false;
+ Mutex.Unlock();
}
eOSState cOsdInfoWindow::ProcessKey(eKeys key)
{
- time_t curTime;
+ time_t curTime;
- switch (key)
- {
- case k0:
- if (m_Number == 0)
- {
- m_Group = -1;
- Hide();
- return osUnknown;
- }
- case k1 ... k9:
- if (m_Number >= 0)
- {
- m_Number = m_Number * 10 + key - k0;
- if (m_Number > 0)
- {
- cChannel * channel = Channels.GetByNumber(m_Number);
- m_Channel = channel;
- m_WithInfo = false;
- Show();
- // Lets see if there can be any useful further input:
- int n = channel ? m_Number * 10 : 0;
- while (channel && (channel = Channels.Next(channel)) != NULL)
- {
- if (!channel->GroupSep())
- {
- if (n <= channel->Number() && channel->Number() <= n + 9)
- {
- n = 0;
- break;
- }
- if (channel->Number() > n)
- n *= 10;
- }
- }
- if (n > 0)
- {
- // This channel is the only one that fits the input, so let's take it right away:
- int number = m_Number;
- m_Number = 0;
- m_Group = -1;
- m_WithInfo = true;
- Channels.SwitchTo(number);
- }
- }
- }
- return osContinue;
- case kLeft|k_Repeat:
- case kLeft:
- case kRight|k_Repeat:
- case kRight:
- m_WithInfo = false;
- if (m_Group < 0)
- {
- cChannel * channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (channel)
- m_Group = channel->Index();
- }
- if (m_Group >= 0)
- {
- int SaveGroup = m_Group;
- if (NORMALKEY(key) == kRight)
- m_Group = Channels.GetNextGroup(m_Group);
- else
- m_Group = Channels.GetPrevGroup(m_Group < 1 ? 1 : m_Group);
- if (m_Group < 0)
- m_Group = SaveGroup;
- cChannel * channel = Channels.Get(m_Group);
- if (channel)
- {
- m_Channel = channel;
- Show();
- if (!channel->GroupSep())
- m_Group = -1;
- }
- }
- return osContinue;
- case kUp|k_Repeat:
- case kUp:
- case kDown|k_Repeat:
- case kDown:
- cDevice::SwitchChannel(NORMALKEY(key) == kUp ? 1 : -1);
- // no break here
- case kChanUp|k_Repeat:
- case kChanUp:
- case kChanDn|k_Repeat:
- case kChanDn:
- m_WithInfo = true;
- m_Number = 0;
- m_Group = -1;
- //Show();
- return osContinue;
- case kNone:
- if (Shown())
- {
- time(&curTime);
- if (m_Number && curTime - m_LastTime > DIRECTCHANNELTIMEOUT)
- {
- if (Channels.GetByNumber(m_Number))
- {
- int number = m_Number;
- m_Number = 0;
- m_Group = -1;
- Channels.SwitchTo(number);
- }
- else
- {
- m_Number = 0;
- m_Group = -1;
- m_Channel = NULL;
- Show();
- m_Channel = Channels.Get(cDevice::CurrentChannel());
- m_WithInfo = true;
- return osContinue;
- }
- return osContinue;
- }
- }
- break;
- case kOk:
- if (Shown())
- {
- if (m_Group >= 0)
- {
- int group = m_Group;
- m_Group = -1;
- m_Number = 0;
- Channels.SwitchTo(Channels.Get(Channels.GetNextNormal(group))->Number());
- }
- else
- {
- m_Group = -1;
- m_Number = 0;
- m_Channel = Channels.Get(cDevice::CurrentChannel());
- m_WithInfo = true;
- Hide();
- }
- return osContinue;
- }
- break;
- default:
- return osUnknown;
- }
- if (Shown())
- {
- time(&curTime);
- if (curTime - m_LastTime >= INFOTIMEOUT)
- {
- m_Group = -1;
- m_Number = 0;
- Hide();
- }
- return osContinue;
- }
- return osUnknown;
+ switch (key)
+ {
+ case k0:
+ if (m_Number == 0)
+ {
+ m_Group = -1;
+ Hide();
+ return osUnknown;
+ }
+ case k1 ... k9:
+ if (m_Number >= 0)
+ {
+ m_Number = m_Number * 10 + key - k0;
+ if (m_Number > 0)
+ {
+ cChannel * channel = Channels.GetByNumber(m_Number);
+ m_Channel = channel;
+ m_WithInfo = false;
+ Show();
+ // Lets see if there can be any useful further input:
+ int n = channel ? m_Number * 10 : 0;
+ while (channel && (channel = Channels.Next(channel)) != NULL)
+ {
+ if (!channel->GroupSep())
+ {
+ if (n <= channel->Number() && channel->Number() <= n + 9)
+ {
+ n = 0;
+ break;
+ }
+ if (channel->Number() > n)
+ n *= 10;
+ }
+ }
+ if (n > 0)
+ {
+ // This channel is the only one that fits the input, so let's take it right away:
+ int number = m_Number;
+ m_Number = 0;
+ m_Group = -1;
+ m_WithInfo = true;
+ Channels.SwitchTo(number);
+ }
+ }
+ }
+ return osContinue;
+ case kLeft|k_Repeat:
+ case kLeft:
+ case kRight|k_Repeat:
+ case kRight:
+ m_WithInfo = false;
+ if (m_Group < 0)
+ {
+ cChannel * channel = Channels.GetByNumber(cDevice::CurrentChannel());
+ if (channel)
+ m_Group = channel->Index();
+ }
+ if (m_Group >= 0)
+ {
+ int SaveGroup = m_Group;
+ if (NORMALKEY(key) == kRight)
+ m_Group = Channels.GetNextGroup(m_Group);
+ else
+ m_Group = Channels.GetPrevGroup(m_Group < 1 ? 1 : m_Group);
+ if (m_Group < 0)
+ m_Group = SaveGroup;
+ cChannel * channel = Channels.Get(m_Group);
+ if (channel)
+ {
+ m_Channel = channel;
+ Show();
+ if (!channel->GroupSep())
+ m_Group = -1;
+ }
+ }
+ return osContinue;
+ case kUp|k_Repeat:
+ case kUp:
+ case kDown|k_Repeat:
+ case kDown:
+ cDevice::SwitchChannel(NORMALKEY(key) == kUp ? 1 : -1);
+ // no break here
+ case kChanUp|k_Repeat:
+ case kChanUp:
+ case kChanDn|k_Repeat:
+ case kChanDn:
+ m_WithInfo = true;
+ m_Number = 0;
+ m_Group = -1;
+ //Show();
+ return osContinue;
+ case kNone:
+ if (Shown())
+ {
+ time(&curTime);
+ if (m_Number && curTime - m_LastTime > DIRECTCHANNELTIMEOUT)
+ {
+ if (Channels.GetByNumber(m_Number))
+ {
+ int number = m_Number;
+ m_Number = 0;
+ m_Group = -1;
+ Channels.SwitchTo(number);
+ }
+ else
+ {
+ m_Number = 0;
+ m_Group = -1;
+ m_Channel = NULL;
+ Show();
+ m_Channel = Channels.Get(cDevice::CurrentChannel());
+ m_WithInfo = true;
+ return osContinue;
+ }
+ return osContinue;
+ }
+ }
+ break;
+ case kOk:
+ if (Shown())
+ {
+ if (m_Group >= 0)
+ {
+ int group = m_Group;
+ m_Group = -1;
+ m_Number = 0;
+ Channels.SwitchTo(Channels.Get(Channels.GetNextNormal(group))->Number());
+ }
+ else
+ {
+ m_Group = -1;
+ m_Number = 0;
+ m_Channel = Channels.Get(cDevice::CurrentChannel());
+ m_WithInfo = true;
+ Hide();
+ }
+ return osContinue;
+ }
+ break;
+ default:
+ return osUnknown;
+ }
+ if (Shown())
+ {
+ time(&curTime);
+ if (curTime - m_LastTime >= INFOTIMEOUT)
+ {
+ m_Group = -1;
+ m_Number = 0;
+ Hide();
+ }
+ return osContinue;
+ }
+ return osUnknown;
}
diff --git a/osd_info.h b/osd_info.h
index e315ce1..309d2d3 100644
--- a/osd_info.h
+++ b/osd_info.h
@@ -17,29 +17,29 @@
class cOsdInfoWindow
{
private:
- cOsd * m_Osd;
- unsigned int * m_Palette;
- cBitmap * m_Bitmap;
- int m_InfoX;
- int m_InfoY;
- bool m_Shown;
- time_t m_LastTime;
-
- int m_Number;
- int m_Group;
- bool m_WithInfo;
- const char * m_Message;
- const cChannel * m_Channel;
+ cOsd * m_Osd;
+ unsigned int * m_Palette;
+ cBitmap * m_Bitmap;
+ int m_InfoX;
+ int m_InfoY;
+ bool m_Shown;
+ time_t m_LastTime;
+
+ int m_Number;
+ int m_Group;
+ bool m_WithInfo;
+ const char * m_Message;
+ const cChannel * m_Channel;
public:
- cOsdInfoWindow(cOsd * osd, unsigned int * palette, int x, int y);
- ~cOsdInfoWindow();
- void SetMessage(const char * message);
- void SetChannel(const cChannel * channel);
- void Show();
- void Hide();
- eOSState ProcessKey(eKeys key);
-
- bool Shown() const { return m_Shown; }
+ cOsdInfoWindow(cOsd * osd, unsigned int * palette, int x, int y);
+ ~cOsdInfoWindow();
+ void SetMessage(const char * message);
+ void SetChannel(const cChannel * channel);
+ void Show();
+ void Hide();
+ eOSState ProcessKey(eKeys key);
+
+ bool Shown() const { return m_Shown; }
};
#endif
diff --git a/osdpip.c b/osdpip.c
index 6b73dde..3c9b7b2 100644
--- a/osdpip.c
+++ b/osdpip.c
@@ -15,32 +15,34 @@ extern "C"
#include "osd.h"
#include "setup.h"
+#if (APIVERSNUM < 10507)
#include "i18n.h"
+#endif
#include <vdr/plugin.h>
-static const char *VERSION = "0.0.8";
-static const char *DESCRIPTION = "OSD Picture-in-Picture";
-static const char *MAINMENUENTRY = "Picture-in-Picture";
+static const char *VERSION = "0.0.9";
+static const char *DESCRIPTION = trNOOP("OSD Picture-in-Picture");
+static const char *MAINMENUENTRY = trNOOP("Picture-in-Picture");
class cPluginOsdpip : public cPlugin
{
private:
-
+
public:
- cPluginOsdpip(void);
- virtual ~cPluginOsdpip();
- virtual const char *Version(void) { return VERSION; }
- virtual const char *Description(void) { return tr(DESCRIPTION); }
- virtual const char *CommandLineHelp(void);
- virtual bool ProcessArgs(int argc, char *argv[]);
- virtual bool Initialize(void);
- virtual bool Start(void);
- virtual void Housekeeping(void);
- virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
- virtual cOsdObject *MainMenuAction(void);
- virtual cMenuSetupPage *SetupMenu(void);
- virtual bool SetupParse(const char *Name, const char *Value);
+ cPluginOsdpip(void);
+ virtual ~cPluginOsdpip();
+ virtual const char *Version(void) { return VERSION; }
+ virtual const char *Description(void) { return tr(DESCRIPTION); }
+ virtual const char *CommandLineHelp(void);
+ virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Initialize(void);
+ virtual bool Start(void);
+ virtual void Housekeeping(void);
+ virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
+ virtual cOsdObject *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *Name, const char *Value);
};
cPluginOsdpip::cPluginOsdpip(void)
@@ -53,28 +55,30 @@ cPluginOsdpip::~cPluginOsdpip()
const char *cPluginOsdpip::CommandLineHelp(void)
{
- return NULL;
+ return NULL;
}
bool cPluginOsdpip::ProcessArgs(int argc, char *argv[])
{
- return true;
+ return true;
}
bool cPluginOsdpip::Initialize(void)
{
- // must be called before using avcodec lib
- avcodec_init();
- // register all the codecs (you can also register only the codec
- // you wish to have smaller code)
- avcodec_register_all();
- return true;
+ // must be called before using avcodec lib
+ avcodec_init();
+ // register all the codecs (you can also register only the codec
+ // you wish to have smaller code)
+ avcodec_register_all();
+ return true;
}
bool cPluginOsdpip::Start(void)
{
- RegisterI18n(Phrases);
- return true;
+#if (APIVERSNUM < 10507)
+ RegisterI18n(Phrases);
+#endif
+ return true;
}
void cPluginOsdpip::Housekeeping(void)
@@ -83,27 +87,31 @@ void cPluginOsdpip::Housekeeping(void)
cOsdObject *cPluginOsdpip::MainMenuAction(void)
{
- const cChannel *chan;
- cDevice *dev;
-
- chan = cDevice::CurrentChannel() != 0
- ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
- if (chan != NULL) {
- dev = cDevice::GetDevice(chan, 1);
- if (dev)
- return new cOsdPipObject(dev, chan);
- }
- return NULL;
+ const cChannel *chan;
+ cDevice *dev;
+
+ chan = cDevice::CurrentChannel() != 0
+ ? Channels.GetByNumber(cDevice::CurrentChannel()) : NULL;
+ if (chan != NULL) {
+#if (APIVERSNUM < 10500)
+ dev = cDevice::GetDevice(chan, 1);
+#else
+ dev = cDevice::GetDevice(chan, 1, false);
+#endif
+ if (dev)
+ return new cOsdPipObject(dev, chan);
+ }
+ return NULL;
}
cMenuSetupPage *cPluginOsdpip::SetupMenu(void)
{
- return new cOsdPipSetupPage;
+ return new cOsdPipSetupPage;
}
bool cPluginOsdpip::SetupParse(const char *Name, const char *Value)
{
- return OsdPipSetup.SetupParse(Name, Value);
+ return OsdPipSetup.SetupParse(Name, Value);
}
VDRPLUGINCREATOR(cPluginOsdpip); // Don't touch this!
diff --git a/patches/vdr-osd.diff b/patches/vdr-osd.diff
deleted file mode 100644
index 0acc0f2..0000000
--- a/patches/vdr-osd.diff
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -Nu vdr-1.3.24/osd.c vdr/osd.c
---- vdr-1.3.24/osd.c 2004-12-19 13:27:38.000000000 +0100
-+++ vdr/osd.c 2005-05-14 13:59:03.000000000 +0200
-@@ -574,7 +574,7 @@
-
- // --- cOsd ------------------------------------------------------------------
-
--bool cOsd::isOpen = false;
-+int cOsd::isOpen = 0;
-
- cOsd::cOsd(int Left, int Top)
- {
-@@ -585,7 +585,7 @@
- left = Left;
- top = Top;
- width = height = 0;
-- isOpen = true;
-+ isOpen++;
- }
-
- cOsd::~cOsd()
-@@ -593,7 +593,7 @@
- for (int i = 0; i < numBitmaps; i++)
- delete bitmaps[i];
- delete savedRegion;
-- isOpen = false;
-+ isOpen--;
- }
-
- cBitmap *cOsd::GetBitmap(int Area)
-diff -Nu vdr-1.3.24/osd.h vdr/osd.h
---- vdr-1.3.24/osd.h 2004-10-16 12:33:44.000000000 +0200
-+++ vdr/osd.h 2005-05-14 13:58:08.000000000 +0200
-@@ -210,7 +210,7 @@
- class cOsd {
- friend class cOsdProvider;
- private:
-- static bool isOpen;
-+ static int isOpen;
- cBitmap *savedRegion;
- cBitmap *bitmaps[MAXOSDAREAS];
- int numBitmaps;
-@@ -235,7 +235,7 @@
- public:
- virtual ~cOsd();
- ///< Shuts down the OSD.
-- static bool IsOpen(void) { return isOpen; }
-+ static int IsOpen(void) { return isOpen; }
- int Left(void) { return left; }
- int Top(void) { return top; }
- int Width(void) { return width; }
diff --git a/pes.c b/pes.c
index f76090e..1d4c7fb 100644
--- a/pes.c
+++ b/pes.c
@@ -7,29 +7,29 @@
#include "pes.h"
cPESPacket::cPESPacket(unsigned char * data, int length)
-: data(data),
- length(length)
+: data(data),
+ length(length)
{
- streamId = data[3];
- packetLength = (data[4] << 8) | data[5];
- headerDataLength = data[8];
- payloadStart = headerDataLength + 9;
- payloadLength = packetLength + 6 - payloadStart;
+ streamId = data[3];
+ packetLength = (data[4] << 8) | data[5];
+ headerDataLength = data[8];
+ payloadStart = headerDataLength + 9;
+ payloadLength = packetLength + 6 - payloadStart;
}
void cPESPacket::Dump(FILE * fp)
{
- fprintf(fp, "Stream ID: %02X ", streamId);
- fprintf(fp, "Packet Length: %d ", packetLength);
- fprintf(fp, "Header Data Length: %d ", headerDataLength);
- fprintf(fp, "Payload Start: %d ", payloadStart);
- fprintf(fp, "Payload Length: %d ", payloadLength);
- fprintf(fp, "\n");
+ fprintf(fp, "Stream ID: %02X ", streamId);
+ fprintf(fp, "Packet Length: %d ", packetLength);
+ fprintf(fp, "Header Data Length: %d ", headerDataLength);
+ fprintf(fp, "Payload Start: %d ", payloadStart);
+ fprintf(fp, "Payload Length: %d ", payloadLength);
+ fprintf(fp, "\n");
}
unsigned char * cPESPacket::Payload(int & retLength)
{
- retLength = payloadLength;
- return data + payloadStart;
+ retLength = payloadLength;
+ return data + payloadStart;
}
diff --git a/pes.h b/pes.h
index a63425b..91fa63c 100644
--- a/pes.h
+++ b/pes.h
@@ -12,20 +12,20 @@
class cPESPacket
{
private:
- unsigned char * data;
- int length;
+ unsigned char * data;
+ int length;
- unsigned char streamId;
- unsigned short packetLength;
- unsigned char headerDataLength;
- int payloadStart;
- int payloadLength;
+ unsigned char streamId;
+ unsigned short packetLength;
+ unsigned char headerDataLength;
+ int payloadStart;
+ int payloadLength;
public:
- cPESPacket(unsigned char * data, int length);
- void Dump(FILE * fp = stdout);
- unsigned char StreamId() const { return streamId; }
- unsigned char * Payload(int & length);
- unsigned short PacketLength() const { return packetLength; }
+ cPESPacket(unsigned char * data, int length);
+ void Dump(FILE * fp = stdout);
+ unsigned char StreamId() const { return streamId; }
+ unsigned char * Payload(int & length);
+ unsigned short PacketLength() const { return packetLength; }
};
#endif // VDR_OSDPIP_PES_H
diff --git a/po/ca_ES.po b/po/ca_ES.po
new file mode 100644
index 0000000..ecb85af
--- /dev/null
+++ b/po/ca_ES.po
@@ -0,0 +1,120 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Marc Rovira Vall <tm05462@salleURL.edu>, 2003
+# Ramon Roca <ramon.roca@xcombo.com>, 2003
+# Jordi Vilà <jvila@tinet.org>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Jordi Vilà <jvila@tinet.org>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
new file mode 100644
index 0000000..0853a4f
--- /dev/null
+++ b/po/cs_CZ.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Vladimír Bárta <vladimir.barta@k2atmitec.cz>, 2006
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Vladimír Bárta <vladimir.barta@k2atmitec.cz>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/da_DK.po b/po/da_DK.po
new file mode 100644
index 0000000..47110d7
--- /dev/null
+++ b/po/da_DK.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Mogens Elneff <mogens@elneff.dk>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Mogens Elneff <mogens@elneff.dk>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
new file mode 100644
index 0000000..5b062ca
--- /dev/null
+++ b/po/de_DE.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Klaus Schmidinger <kls@cadsoft.de>, 2000
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr "Normaler Modus"
+
+msgid "Move mode"
+msgstr "Bewegungsmodus"
+
+msgid "OSD Picture-in-Picture"
+msgstr "OSD Bild-in-Bild"
+
+msgid "Picture-in-Picture"
+msgstr "Bild-in-Bild"
+
+msgid "Greyscale (16)"
+msgstr "16 Graustufen"
+
+msgid "Greyscale (256)"
+msgstr "256 Graustufen"
+
+msgid "Color (256, fixed)"
+msgstr "256 Farben (fest)"
+
+msgid "Color (128, variable)"
+msgstr "128 Farben (variabel)"
+
+msgid "Color (256, dithered)"
+msgstr "256 Farben (dithered)"
+
+msgid "channel only"
+msgstr "nur Kanal"
+
+msgid "simple"
+msgstr "einfach"
+
+msgid "complete"
+msgstr "komplett"
+
+msgid "top left"
+msgstr "oben links"
+
+msgid "top right"
+msgstr "oben rechts"
+
+msgid "bottom left"
+msgstr "unten links"
+
+msgid "bottom right"
+msgstr "unten rechts"
+
+msgid "automatic"
+msgstr "automatisch"
+
+msgid "none"
+msgstr "keine"
+
+msgid "1 frame"
+msgstr "1 Frame"
+
+msgid "2 frames"
+msgstr "2 Frames"
+
+msgid "X Position"
+msgstr "X-Position"
+
+msgid "Y Position"
+msgstr "Y-Position"
+
+msgid "Crop left"
+msgstr "Links abschneiden"
+
+msgid "Crop right"
+msgstr "Rechts abschneiden"
+
+msgid "Crop at top"
+msgstr "Oben abschneiden"
+
+msgid "Crop at bottom"
+msgstr "Unten abschneiden"
+
+msgid "Color depth"
+msgstr "Farbtiefe"
+
+msgid "Size"
+msgstr "Größe"
+
+msgid "Frames to display"
+msgstr "Darzustellende Bilder"
+
+msgid "Drop frames"
+msgstr "Einzelbilder auslassen"
+
+msgid "Swap FFMPEG output"
+msgstr "FFMPEG Ausgabe umdrehen"
+
+msgid "Show info window"
+msgstr "Info-Fenster anzeigen"
+
+msgid "Info window width"
+msgstr "Breite Info-Fenster"
+
+msgid "Info window position"
+msgstr "Position Info-Fenster"
diff --git a/po/el_GR.po b/po/el_GR.po
new file mode 100644
index 0000000..3ce492b
--- /dev/null
+++ b/po/el_GR.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Dimitrios Dimitrakos <mail@dimitrios.de>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Dimitrios Dimitrakos <mail@dimitrios.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-7\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100644
index 0000000..1f07eb3
--- /dev/null
+++ b/po/es_ES.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Ruben Nunez Francisco <ruben.nunez@tang-it.com>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Ruben Nunez Francisco <ruben.nunez@tang-it.com>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/et_EE.po b/po/et_EE.po
new file mode 100644
index 0000000..6436419
--- /dev/null
+++ b/po/et_EE.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Arthur Konovalov <kasjas@hot.ee>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Arthur Konovalov <kasjas@hot.ee>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-13\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/fi_FI.po b/po/fi_FI.po
new file mode 100644
index 0000000..d28a9e8
--- /dev/null
+++ b/po/fi_FI.po
@@ -0,0 +1,121 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Hannu Savolainen <hannu@opensound.com>, 2002
+# Jaakko Hyvätti <jaakko@hyvatti.iki.fi>, 2002
+# Niko Tarnanen <niko.tarnanen@hut.fi>, 2003
+# Rolf Ahrenberg <rahrenbe@cc.hut.fi>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr "Normaalitoiminto"
+
+msgid "Move mode"
+msgstr "Siirtotoiminto"
+
+msgid "OSD Picture-in-Picture"
+msgstr "Kuva kuvassa -toiminto (OSD)"
+
+msgid "Picture-in-Picture"
+msgstr "Kuva kuvassa"
+
+msgid "Greyscale (16)"
+msgstr "harmaasävy (16)"
+
+msgid "Greyscale (256)"
+msgstr "harmaasävy (256)"
+
+msgid "Color (256, fixed)"
+msgstr "väri (256)"
+
+msgid "Color (128, variable)"
+msgstr "väri (128, vaihtuva)"
+
+msgid "Color (256, dithered)"
+msgstr "väri (256)"
+
+msgid "channel only"
+msgstr "kanava"
+
+msgid "simple"
+msgstr "lyhyt"
+
+msgid "complete"
+msgstr "pitkä"
+
+msgid "top left"
+msgstr "vasen yläreuna"
+
+msgid "top right"
+msgstr "oikea yläreuna"
+
+msgid "bottom left"
+msgstr "vasen alareuna"
+
+msgid "bottom right"
+msgstr "oikea alareuna"
+
+msgid "automatic"
+msgstr "automaattisesti"
+
+msgid "none"
+msgstr "ei"
+
+msgid "1 frame"
+msgstr "1 kehys"
+
+msgid "2 frames"
+msgstr "2 kehystä"
+
+msgid "X Position"
+msgstr "Vaakasijainti"
+
+msgid "Y Position"
+msgstr "Pystysijainti"
+
+msgid "Crop left"
+msgstr "Leikkaa vasemmalta"
+
+msgid "Crop right"
+msgstr "Leikkaa oikealta"
+
+msgid "Crop at top"
+msgstr "Leikkaa ylhäältä"
+
+msgid "Crop at bottom"
+msgstr "Leikkaa alhaalta"
+
+msgid "Color depth"
+msgstr "Värisyvyys"
+
+msgid "Size"
+msgstr "Koko"
+
+msgid "Frames to display"
+msgstr "Näytä kehykset"
+
+msgid "Drop frames"
+msgstr "Hylkää kehyksiä"
+
+msgid "Swap FFMPEG output"
+msgstr "Invertoi FFMPEG-kuva"
+
+msgid "Show info window"
+msgstr "Näytä kanavatieto"
+
+msgid "Info window width"
+msgstr "Kanavatiedon leveys"
+
+msgid "Info window position"
+msgstr "Kanavatiedon sijainti"
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100644
index 0000000..e701b71
--- /dev/null
+++ b/po/fr_FR.po
@@ -0,0 +1,121 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Jean-Claude Repetto <jc@repetto.org>, 2001
+# Olivier Jacques <jacquesolivier@hotmail.com>, 2003
+# Gregoire Favre <greg@magma.unil.ch>, 2003
+# Nicolas Huillard <nhuillard@e-dition.fr>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Nicolas Huillard <nhuillard@e-dition.fr>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr "Mode normale"
+
+msgid "Move mode"
+msgstr "Mode mouvement"
+
+msgid "OSD Picture-in-Picture"
+msgstr "OSD-PIP Incrustation d'image dans l'image"
+
+msgid "Picture-in-Picture"
+msgstr "Incrustation d'image"
+
+msgid "Greyscale (16)"
+msgstr "Niveau de gris (16)"
+
+msgid "Greyscale (256)"
+msgstr "Niveau de gris (256)"
+
+msgid "Color (256, fixed)"
+msgstr "Couleur (256 fixe)"
+
+msgid "Color (128, variable)"
+msgstr "Couleur (128 variable)"
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr "Seulement la chaine"
+
+msgid "simple"
+msgstr "Simple"
+
+msgid "complete"
+msgstr "Complet"
+
+msgid "top left"
+msgstr "En haut a gauche"
+
+msgid "top right"
+msgstr "En haut a droite"
+
+msgid "bottom left"
+msgstr "En bas a gauche"
+
+msgid "bottom right"
+msgstr "En bas a droite"
+
+msgid "automatic"
+msgstr "Automatique"
+
+msgid "none"
+msgstr "Aucun"
+
+msgid "1 frame"
+msgstr "Sequence 1"
+
+msgid "2 frames"
+msgstr "Sequence 2"
+
+msgid "X Position"
+msgstr "X Position"
+
+msgid "Y Position"
+msgstr "Y Position"
+
+msgid "Crop left"
+msgstr "Couper a gauche"
+
+msgid "Crop right"
+msgstr "Couper a droite"
+
+msgid "Crop at top"
+msgstr "Couper la partie haute"
+
+msgid "Crop at bottom"
+msgstr "Couper la partie basse"
+
+msgid "Color depth"
+msgstr "Nobre de couleur pour l'image"
+
+msgid "Size"
+msgstr "Taille"
+
+msgid "Frames to display"
+msgstr "Sequence a afficher"
+
+msgid "Drop frames"
+msgstr "Sauter des sequences"
+
+msgid "Swap FFMPEG output"
+msgstr "Changer la sortie de FFMPEG"
+
+msgid "Show info window"
+msgstr "Montrer les informations de la fenetre"
+
+msgid "Info window width"
+msgstr "Information sur la taille de la fenetre"
+
+msgid "Info window position"
+msgstr "Information sur la position de la fenetre"
diff --git a/po/hr_HR.po b/po/hr_HR.po
new file mode 100644
index 0000000..f3bea62
--- /dev/null
+++ b/po/hr_HR.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Drazen Dupor <drazen.dupor@dupor.com>, 2004
+# Dino Ravnic <dino.ravnic@fer.hr>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Drazen Dupor <drazen.dupor@dupor.com>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/hu_HU.po b/po/hu_HU.po
new file mode 100644
index 0000000..34486c6
--- /dev/null
+++ b/po/hu_HU.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Istvan Koenigsberger <istvnko@hotmail.com>, 2002
+# Guido Josten <guido.josten@t-online.de>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Istvan Koenigsberger <istvnko@hotmail.com>, Guido Josten <guido.josten@t-online.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100644
index 0000000..1becc5b
--- /dev/null
+++ b/po/it_IT.po
@@ -0,0 +1,120 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Alberto Carraro <bertocar@tin.it>, 2001
+# Antonio Ospite <ospite@studenti.unina.it>, 2003
+# Sean Carlos <seanc@libero.it>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Sean Carlos <seanc@libero.it>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644
index 0000000..1f3bd2a
--- /dev/null
+++ b/po/nl_NL.po
@@ -0,0 +1,120 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Arnold Niessen <niessen@iae.nl> <arnold.niessen@philips.com>, 2001
+# Hans Dingemans <hans.dingemans@tacticalops.nl>, 2003
+# Maarten Wisse <Maarten.Wisse@urz.uni-hd.de>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Maarten Wisse <Maarten.Wisse@urz.uni-hd.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/nn_NO.po b/po/nn_NO.po
new file mode 100644
index 0000000..677d260
--- /dev/null
+++ b/po/nn_NO.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Jørgen Tvedt <pjtvedt@online.no>, 2001
+# Truls Slevigen <truls@slevigen.no>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Truls Slevigen <truls@slevigen.no>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
new file mode 100644
index 0000000..4ffbd14
--- /dev/null
+++ b/po/pl_PL.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Michael Rakowski <mrak@gmx.de>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Michael Rakowski <mrak@gmx.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100644
index 0000000..c09dd2b
--- /dev/null
+++ b/po/pt_PT.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Paulo Lopes <pmml@netvita.pt>, 2001
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Paulo Lopes <pmml@netvita.pt>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/ro_RO.po b/po/ro_RO.po
new file mode 100644
index 0000000..ffbccfc
--- /dev/null
+++ b/po/ro_RO.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Paul Lacatus <paul@campina.iiruc.ro>, 2002
+# Lucian Muresan <lucianm@users.sourceforge.net>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Lucian Muresan <lucianm@users.sourceforge.net>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
new file mode 100644
index 0000000..0749eca
--- /dev/null
+++ b/po/ru_RU.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Vyacheslav Dikonov <sdiconov@mail.ru>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Vyacheslav Dikonov <sdiconov@mail.ru>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-5\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/sl_SI.po b/po/sl_SI.po
new file mode 100644
index 0000000..f2ed125
--- /dev/null
+++ b/po/sl_SI.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Miha Setina <mihasetina@softhome.net>, 2000
+# Matjaz Thaler <matjaz.thaler@guest.arnes.si>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Matjaz Thaler <matjaz.thaler@guest.arnes.si>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/sv_SE.po b/po/sv_SE.po
new file mode 100644
index 0000000..73bd2dc
--- /dev/null
+++ b/po/sv_SE.po
@@ -0,0 +1,119 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Tomas Prybil <tomas@prybil.se>, 2002
+# Jan Ekholm <chakie@infa.abo.fi>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Tomas Prybil <tomas@prybil.se>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100644
index 0000000..3fd0acb
--- /dev/null
+++ b/po/tr_TR.po
@@ -0,0 +1,118 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Oktay Yolgeçen <oktay_73@yahoo.de>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <andreas.regel@powarman.de>\n"
+"POT-Creation-Date: 2008-04-27 18:04+0200\n"
+"PO-Revision-Date: 2008-04-27 18:00+0200\n"
+"Last-Translator: Oktay Yolgeçen <oktay_73@yahoo.de>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-9\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Normal mode"
+msgstr ""
+
+msgid "Move mode"
+msgstr ""
+
+msgid "OSD Picture-in-Picture"
+msgstr ""
+
+msgid "Picture-in-Picture"
+msgstr ""
+
+msgid "Greyscale (16)"
+msgstr ""
+
+msgid "Greyscale (256)"
+msgstr ""
+
+msgid "Color (256, fixed)"
+msgstr ""
+
+msgid "Color (128, variable)"
+msgstr ""
+
+msgid "Color (256, dithered)"
+msgstr ""
+
+msgid "channel only"
+msgstr ""
+
+msgid "simple"
+msgstr ""
+
+msgid "complete"
+msgstr ""
+
+msgid "top left"
+msgstr ""
+
+msgid "top right"
+msgstr ""
+
+msgid "bottom left"
+msgstr ""
+
+msgid "bottom right"
+msgstr ""
+
+msgid "automatic"
+msgstr ""
+
+msgid "none"
+msgstr ""
+
+msgid "1 frame"
+msgstr ""
+
+msgid "2 frames"
+msgstr ""
+
+msgid "X Position"
+msgstr ""
+
+msgid "Y Position"
+msgstr ""
+
+msgid "Crop left"
+msgstr ""
+
+msgid "Crop right"
+msgstr ""
+
+msgid "Crop at top"
+msgstr ""
+
+msgid "Crop at bottom"
+msgstr ""
+
+msgid "Color depth"
+msgstr ""
+
+msgid "Size"
+msgstr ""
+
+msgid "Frames to display"
+msgstr ""
+
+msgid "Drop frames"
+msgstr ""
+
+msgid "Swap FFMPEG output"
+msgstr ""
+
+msgid "Show info window"
+msgstr ""
+
+msgid "Info window width"
+msgstr ""
+
+msgid "Info window position"
+msgstr ""
diff --git a/quantize.c b/quantize.c
index 3f7418b..e0f307d 100644
--- a/quantize.c
+++ b/quantize.c
@@ -21,85 +21,85 @@ cQuantize::~cQuantize() {
}
cQuantizeFixed::cQuantizeFixed() {
- redLevelCount = 7;
- greenLevelCount = 9;
- blueLevelCount = 4;
-
- redLevels[0] = 0;
- redLevels[redLevelCount - 1] = 255;
- for (int i = 1; i < redLevelCount - 1; i++) {
- redLevels[i] = (256 * i) / (redLevelCount - 1);
- }
-
- greenLevels[0] = 0;
- greenLevels[greenLevelCount - 1] = 255;
- for (int i = 1; i < greenLevelCount - 1; i++) {
- greenLevels[i] = (256 * i) / (greenLevelCount - 1);
- }
-
- blueLevels[0] = 0;
- blueLevels[blueLevelCount - 1] = 255;
- for (int i = 1; i < blueLevelCount - 1; i++) {
- blueLevels[i] = (256 * i) / (blueLevelCount - 1);
- }
-
- for (int r = 0; r < redLevelCount; r++) {
- for (int g = 0; g < greenLevelCount; g++) {
- for (int b = 0; b < blueLevelCount; b++) {
- paletteOutput[r * greenLevelCount * blueLevelCount + g * blueLevelCount + b] =
- (redLevels[r] << 16) | (greenLevels[g] << 8) | blueLevels[b];
- }
- }
- }
+ redLevelCount = 7;
+ greenLevelCount = 9;
+ blueLevelCount = 4;
+
+ redLevels[0] = 0;
+ redLevels[redLevelCount - 1] = 255;
+ for (int i = 1; i < redLevelCount - 1; i++) {
+ redLevels[i] = (256 * i) / (redLevelCount - 1);
+ }
+
+ greenLevels[0] = 0;
+ greenLevels[greenLevelCount - 1] = 255;
+ for (int i = 1; i < greenLevelCount - 1; i++) {
+ greenLevels[i] = (256 * i) / (greenLevelCount - 1);
+ }
+
+ blueLevels[0] = 0;
+ blueLevels[blueLevelCount - 1] = 255;
+ for (int i = 1; i < blueLevelCount - 1; i++) {
+ blueLevels[i] = (256 * i) / (blueLevelCount - 1);
+ }
+
+ for (int r = 0; r < redLevelCount; r++) {
+ for (int g = 0; g < greenLevelCount; g++) {
+ for (int b = 0; b < blueLevelCount; b++) {
+ paletteOutput[r * greenLevelCount * blueLevelCount + g * blueLevelCount + b] =
+ (redLevels[r] << 16) | (greenLevels[g] << 8) | blueLevels[b];
+ }
+ }
+ }
}
cQuantizeFixed::~cQuantizeFixed() {
}
int cQuantizeFixed::Quantize(unsigned char * input, int size, int colors) {
- imageInput = input;
- imageSize = size;
-
- unsigned int * imagePtr = (unsigned int *) imageInput;
- int diff, diffOld;
- unsigned int value;
- unsigned char redValue;
- unsigned char greenValue;
- unsigned char blueValue;
- int r, g, b;
- for (int i = 0; i < imageSize; i++) {
- value = *imagePtr;
- redValue = value;
- greenValue = value >> 8;
- blueValue = value >> 16;
- diffOld = 256;
- for (r = 0; r < redLevelCount; r++) {
- diff = abs(redLevels[r] - redValue);
- if (diff > diffOld)
- break;
- diffOld = diff;
- }
- diffOld = 256;
- for (g = 0; g < greenLevelCount; g++) {
- diff = abs(greenLevels[g] - greenValue);
- if (diff > diffOld)
- break;
- diffOld = diff;
- }
- diffOld = 256;
- for (b = 0; b < blueLevelCount; b++) {
- diff = abs(blueLevels[b] - blueValue);
- if (diff > diffOld)
- break;
- diffOld = diff;
- }
- r--;
- g--;
- b--;
- imageOutput[i] = r * greenLevelCount * blueLevelCount + g * blueLevelCount + b;
- imagePtr++;
- }
- return 0;
+ imageInput = input;
+ imageSize = size;
+
+ unsigned int * imagePtr = (unsigned int *) imageInput;
+ int diff, diffOld;
+ unsigned int value;
+ unsigned char redValue;
+ unsigned char greenValue;
+ unsigned char blueValue;
+ int r, g, b;
+ for (int i = 0; i < imageSize; i++) {
+ value = *imagePtr;
+ redValue = value;
+ greenValue = value >> 8;
+ blueValue = value >> 16;
+ diffOld = 256;
+ for (r = 0; r < redLevelCount; r++) {
+ diff = abs(redLevels[r] - redValue);
+ if (diff > diffOld)
+ break;
+ diffOld = diff;
+ }
+ diffOld = 256;
+ for (g = 0; g < greenLevelCount; g++) {
+ diff = abs(greenLevels[g] - greenValue);
+ if (diff > diffOld)
+ break;
+ diffOld = diff;
+ }
+ diffOld = 256;
+ for (b = 0; b < blueLevelCount; b++) {
+ diff = abs(blueLevels[b] - blueValue);
+ if (diff > diffOld)
+ break;
+ diffOld = diff;
+ }
+ r--;
+ g--;
+ b--;
+ imageOutput[i] = r * greenLevelCount * blueLevelCount + g * blueLevelCount + b;
+ imagePtr++;
+ }
+ return 0;
}
cQuantizeWu::cQuantizeWu()
@@ -110,139 +110,139 @@ cQuantizeWu::~cQuantizeWu()
{
}
-#define WEIG //>>2
+#define WEIG //>>2
int cQuantizeWu::Quantize(unsigned char * input, int size, int colors)
{
- struct box cube[MAXCOLOR];
+ struct box cube[MAXCOLOR];
int next;
- int i;
- int j;
- int k;
- int l;
- float vv[MAXCOLOR];
- float temp;
- unsigned char * tag;
- long weight;
-
- imageInput = input;
- imageSize = size;
- palSize = colors;
-
- for (j = 0; j < BOX; j++)
- for (k = 0; k < BOX; k++)
- for (l = 0; l < BOX; l++)
- {
- wt[j][k][l] = 0;
- mr[j][k][l] = 0;
- mg[j][k][l] = 0;
- mb[j][k][l] = 0;
- m2[j][k][l] = 0.0;
- }
-
- Qadd = new unsigned short[imageSize * sizeof(unsigned short)];
+ int i;
+ int j;
+ int k;
+ int l;
+ float vv[MAXCOLOR];
+ float temp;
+ unsigned char * tag;
+ long weight;
+
+ imageInput = input;
+ imageSize = size;
+ palSize = colors;
+
+ for (j = 0; j < BOX; j++)
+ for (k = 0; k < BOX; k++)
+ for (l = 0; l < BOX; l++)
+ {
+ wt[j][k][l] = 0;
+ mr[j][k][l] = 0;
+ mg[j][k][l] = 0;
+ mb[j][k][l] = 0;
+ m2[j][k][l] = 0.0;
+ }
+
+ Qadd = new unsigned short[imageSize * sizeof(unsigned short)];
Hist3d((long *)&wt, (long *)&mr, (long *)&mg, (long *)&mb, (float *)&m2);
Momt3d((long *)&wt, (long *)&mr, (long *)&mg, (long *)&mb, (float *)&m2);
cube[0].r0 = cube[0].g0 = cube[0].b0 = 0;
cube[0].r1 = cube[0].g1 = cube[0].b1 = 32;
- next = 0;
- for (i = 1; i < palSize; i++)
- {
- if (Cut(&cube[next], &cube[i]))
- {
- vv[next] = (cube[next].vol > 1) ? Var(&cube[next]) : 0.0;
- vv[i] = (cube[i].vol > 1) ? Var(&cube[i]) : 0.0;
- }
- else
- {
- vv[next] = 0.0;
- i--;
- }
- next = 0;
- temp = vv[0];
- for (k = 1; k <= i; k++)
- if (vv[k] > temp)
- {
- temp = vv[k];
- next = k;
- }
- if (temp <= 0.0)
- {
- palSize = i + 1;
- break;
- }
- }
+ next = 0;
+ for (i = 1; i < palSize; i++)
+ {
+ if (Cut(&cube[next], &cube[i]))
+ {
+ vv[next] = (cube[next].vol > 1) ? Var(&cube[next]) : 0.0;
+ vv[i] = (cube[i].vol > 1) ? Var(&cube[i]) : 0.0;
+ }
+ else
+ {
+ vv[next] = 0.0;
+ i--;
+ }
+ next = 0;
+ temp = vv[0];
+ for (k = 1; k <= i; k++)
+ if (vv[k] > temp)
+ {
+ temp = vv[k];
+ next = k;
+ }
+ if (temp <= 0.0)
+ {
+ palSize = i + 1;
+ break;
+ }
+ }
tag = new unsigned char[BOX * BOX * BOX];
- unsigned char * palette = (unsigned char *) paletteOutput;
- for (k = 0; k < palSize; ++k)
- {
- Mark(&cube[k], k, tag);
- weight = Vol(&cube[k], wt);
- if (weight)
- {
+ unsigned char * palette = (unsigned char *) paletteOutput;
+ for (k = 0; k < palSize; ++k)
+ {
+ Mark(&cube[k], k, tag);
+ weight = Vol(&cube[k], wt);
+ if (weight)
+ {
#ifdef NOINVERT
- palette[k * 4 + 2] = (Vol(&cube[k], mb) / weight) WEIG;
- palette[k * 4 + 0] = (Vol(&cube[k], mr) / weight) WEIG;
+ palette[k * 4 + 2] = (Vol(&cube[k], mb) / weight) WEIG;
+ palette[k * 4 + 0] = (Vol(&cube[k], mr) / weight) WEIG;
#else
- palette[k * 4 + 0] = (Vol(&cube[k], mb) / weight) WEIG;
- palette[k * 4 + 2] = (Vol(&cube[k], mr) / weight) WEIG;
+ palette[k * 4 + 0] = (Vol(&cube[k], mb) / weight) WEIG;
+ palette[k * 4 + 2] = (Vol(&cube[k], mr) / weight) WEIG;
#endif
- palette[k * 4 + 1] = (Vol(&cube[k], mg) / weight) WEIG;
- }
- else
- {
- palette[k * 4 + 0] = 0;
- palette[k * 4 + 1] = 0;
- palette[k * 4 + 2] = 0;
- }
- }
-
- for (i = 0; i < imageSize; i++)
- {
- imageOutput[i] = tag[Qadd[i]];
- }
-
- delete[] tag;
- delete[] Qadd;
-
- return 0;
+ palette[k * 4 + 1] = (Vol(&cube[k], mg) / weight) WEIG;
+ }
+ else
+ {
+ palette[k * 4 + 0] = 0;
+ palette[k * 4 + 1] = 0;
+ palette[k * 4 + 2] = 0;
+ }
+ }
+
+ for (i = 0; i < imageSize; i++)
+ {
+ imageOutput[i] = tag[Qadd[i]];
+ }
+
+ delete[] tag;
+ delete[] Qadd;
+
+ return 0;
}
// build 3-D color histogram of counts, r/g/b, c^2
void cQuantizeWu::Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2)
{
- int ind;
- int r;
- int g;
- int b;
+ int ind;
+ int r;
+ int g;
+ int b;
int inr;
- int ing;
- int inb;
- int table[256];
- int i;
-
- for (i = 0; i < 256; i++)
- table[i] = i * i;
-
- for (i = 0; i < imageSize; i++)
- {
- r = imageInput[i*4];
- g = imageInput[i*4+1];
- b = imageInput[i*4+2];
-
- inr = (r >> 3) + 1;
- ing = (g >> 3) + 1;
- inb = (b >> 3) + 1;
- Qadd[i] = ind = (inr << 10) + (inr << 6) + inr + (ing << 5) + ing + inb;
-
- vwt[ind]++;
- vmr[ind] += r;
- vmg[ind] += g;
- vmb[ind] += b;
- m_2[ind] += (float) (table[r] + table[g] + table[b]);
+ int ing;
+ int inb;
+ int table[256];
+ int i;
+
+ for (i = 0; i < 256; i++)
+ table[i] = i * i;
+
+ for (i = 0; i < imageSize; i++)
+ {
+ r = imageInput[i*4];
+ g = imageInput[i*4+1];
+ b = imageInput[i*4+2];
+
+ inr = (r >> 3) + 1;
+ ing = (g >> 3) + 1;
+ inb = (b >> 3) + 1;
+ Qadd[i] = ind = (inr << 10) + (inr << 6) + inr + (ing << 5) + ing + inb;
+
+ vwt[ind]++;
+ vmr[ind] += r;
+ vmg[ind] += g;
+ vmb[ind] += b;
+ m_2[ind] += (float) (table[r] + table[g] + table[b]);
}
}
@@ -250,265 +250,265 @@ void cQuantizeWu::Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2)
// the sums of the above quantities over any desired box.
void cQuantizeWu::Momt3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2)
{
- unsigned short ind1;
- unsigned short ind2;
- unsigned char i;
- unsigned char r;
- unsigned char g;
- unsigned char b;
- long line;
- long line_r;
- long line_g;
- long line_b;
- long area[BOX];
- long area_r[BOX];
- long area_g[BOX];
- long area_b[BOX];
+ unsigned short ind1;
+ unsigned short ind2;
+ unsigned char i;
+ unsigned char r;
+ unsigned char g;
+ unsigned char b;
+ long line;
+ long line_r;
+ long line_g;
+ long line_b;
+ long area[BOX];
+ long area_r[BOX];
+ long area_g[BOX];
+ long area_b[BOX];
float line2;
- float area2[BOX];
-
- for (r = 1; r <= 32; ++r)
- {
- for (i = 0; i <= 32; ++i)
- area2[i] = area[i] = area_r[i] = area_g[i] = area_b[i] = 0;
- for (g = 1; g <= 32; ++g)
- {
- line2 = line = line_r = line_g = line_b = 0;
- for (b = 1; b <= 32; ++b)
- {
- ind1 = (r << 10) + (r << 6) + r + (g << 5) + g + b;
- line += vwt[ind1];
- line_r += vmr[ind1];
- line_g += vmg[ind1];
- line_b += vmb[ind1];
- line2 += m_2[ind1];
- area[b] += line;
- area_r[b] += line_r;
- area_g[b] += line_g;
- area_b[b] += line_b;
- area2[b] += line2;
- ind2 = ind1 - 1089; /* [r-1][g][b] */
- vwt[ind1] = vwt[ind2] + area[b];
- vmr[ind1] = vmr[ind2] + area_r[b];
- vmg[ind1] = vmg[ind2] + area_g[b];
- vmb[ind1] = vmb[ind2] + area_b[b];
- m_2[ind1] = m_2[ind2] + area2[b];
- }
- }
- }
+ float area2[BOX];
+
+ for (r = 1; r <= 32; ++r)
+ {
+ for (i = 0; i <= 32; ++i)
+ area2[i] = area[i] = area_r[i] = area_g[i] = area_b[i] = 0;
+ for (g = 1; g <= 32; ++g)
+ {
+ line2 = line = line_r = line_g = line_b = 0;
+ for (b = 1; b <= 32; ++b)
+ {
+ ind1 = (r << 10) + (r << 6) + r + (g << 5) + g + b;
+ line += vwt[ind1];
+ line_r += vmr[ind1];
+ line_g += vmg[ind1];
+ line_b += vmb[ind1];
+ line2 += m_2[ind1];
+ area[b] += line;
+ area_r[b] += line_r;
+ area_g[b] += line_g;
+ area_b[b] += line_b;
+ area2[b] += line2;
+ ind2 = ind1 - 1089; /* [r-1][g][b] */
+ vwt[ind1] = vwt[ind2] + area[b];
+ vmr[ind1] = vmr[ind2] + area_r[b];
+ vmg[ind1] = vmg[ind2] + area_g[b];
+ vmb[ind1] = vmb[ind2] + area_b[b];
+ m_2[ind1] = m_2[ind2] + area2[b];
+ }
+ }
+ }
}
int cQuantizeWu::Cut(struct box * set1, struct box * set2)
{
- unsigned char dir;
- int cutr;
- int cutg;
- int cutb;
- float maxr;
- float maxg;
- float maxb;
- long whole_r;
- long whole_g;
- long whole_b;
- long whole_w;
-
- whole_r = Vol(set1, mr);
- whole_g = Vol(set1, mg);
- whole_b = Vol(set1, mb);
- whole_w = Vol(set1, wt);
-
- maxr = Maximize(set1, RED, set1->r0 + 1, set1->r1, &cutr,
- whole_r, whole_g, whole_b, whole_w);
+ unsigned char dir;
+ int cutr;
+ int cutg;
+ int cutb;
+ float maxr;
+ float maxg;
+ float maxb;
+ long whole_r;
+ long whole_g;
+ long whole_b;
+ long whole_w;
+
+ whole_r = Vol(set1, mr);
+ whole_g = Vol(set1, mg);
+ whole_b = Vol(set1, mb);
+ whole_w = Vol(set1, wt);
+
+ maxr = Maximize(set1, RED, set1->r0 + 1, set1->r1, &cutr,
+ whole_r, whole_g, whole_b, whole_w);
maxg = Maximize(set1, GREEN, set1->g0 + 1, set1->g1, &cutg,
- whole_r, whole_g, whole_b, whole_w);
+ whole_r, whole_g, whole_b, whole_w);
maxb = Maximize(set1, BLUE, set1->b0 + 1, set1->b1, &cutb,
- whole_r, whole_g, whole_b, whole_w);
+ whole_r, whole_g, whole_b, whole_w);
- if ((maxr >= maxg) && (maxr >= maxb))
- {
- dir = RED;
- if (cutr < 0)
- return 0; /* can't split the box */
+ if ((maxr >= maxg) && (maxr >= maxb))
+ {
+ dir = RED;
+ if (cutr < 0)
+ return 0; /* can't split the box */
}
- else if ((maxg >= maxr) && (maxg >= maxb))
- dir = GREEN;
- else
- dir = BLUE;
+ else if ((maxg >= maxr) && (maxg >= maxb))
+ dir = GREEN;
+ else
+ dir = BLUE;
- set2->r1 = set1->r1;
- set2->g1 = set1->g1;
- set2->b1 = set1->b1;
+ set2->r1 = set1->r1;
+ set2->g1 = set1->g1;
+ set2->b1 = set1->b1;
- switch (dir)
- {
+ switch (dir)
+ {
case RED:
- set2->r0 = set1->r1 = cutr;
- set2->g0 = set1->g0;
- set2->b0 = set1->b0;
- break;
- case GREEN:
- set2->g0 = set1->g1 = cutg;
- set2->r0 = set1->r0;
- set2->b0 = set1->b0;
- break;
+ set2->r0 = set1->r1 = cutr;
+ set2->g0 = set1->g0;
+ set2->b0 = set1->b0;
+ break;
+ case GREEN:
+ set2->g0 = set1->g1 = cutg;
+ set2->r0 = set1->r0;
+ set2->b0 = set1->b0;
+ break;
case BLUE:
- set2->b0 = set1->b1 = cutb;
- set2->r0 = set1->r0;
- set2->g0 = set1->g0;
- break;
+ set2->b0 = set1->b1 = cutb;
+ set2->r0 = set1->r0;
+ set2->g0 = set1->g0;
+ break;
}
- set1->vol = (set1->r1 - set1->r0) * (set1->g1 - set1->g0) * (set1->b1 - set1->b0);
- set2->vol = (set2->r1 - set2->r0) * (set2->g1 - set2->g0) * (set2->b1 - set2->b0);
+ set1->vol = (set1->r1 - set1->r0) * (set1->g1 - set1->g0) * (set1->b1 - set1->b0);
+ set2->vol = (set2->r1 - set2->r0) * (set2->g1 - set2->g0) * (set2->b1 - set2->b0);
return 1;
}
long cQuantizeWu::Vol(struct box * cube, long mmt[BOX][BOX][BOX])
{
- return (mmt[cube->r1][cube->g1][cube->b1]
- - mmt[cube->r1][cube->g1][cube->b0]
- - mmt[cube->r1][cube->g0][cube->b1]
- + mmt[cube->r1][cube->g0][cube->b0]
- - mmt[cube->r0][cube->g1][cube->b1]
- + mmt[cube->r0][cube->g1][cube->b0]
- + mmt[cube->r0][cube->g0][cube->b1]
- - mmt[cube->r0][cube->g0][cube->b0]);
+ return (mmt[cube->r1][cube->g1][cube->b1]
+ - mmt[cube->r1][cube->g1][cube->b0]
+ - mmt[cube->r1][cube->g0][cube->b1]
+ + mmt[cube->r1][cube->g0][cube->b0]
+ - mmt[cube->r0][cube->g1][cube->b1]
+ + mmt[cube->r0][cube->g1][cube->b0]
+ + mmt[cube->r0][cube->g0][cube->b1]
+ - mmt[cube->r0][cube->g0][cube->b0]);
}
float cQuantizeWu::Maximize(struct box * cube, unsigned char dir, int first, int last, int * cut, long whole_r, long whole_g, long whole_b, long whole_w)
{
- long half_r;
- long half_g;
- long half_b;
- long half_w;
- long base_r;
- long base_g;
- long base_b;
- long base_w;
- int i;
- float temp;
- float max;
-
- base_r = Bottom(cube, dir, mr);
- base_g = Bottom(cube, dir, mg);
- base_b = Bottom(cube, dir, mb);
- base_w = Bottom(cube, dir, wt);
- max = 0.0;
- *cut = -1;
- for (i = first; i < last; i++)
- {
- half_r = base_r + Top(cube, dir, i, mr);
- half_g = base_g + Top(cube, dir, i, mg);
- half_b = base_b + Top(cube, dir, i, mb);
- half_w = base_w + Top(cube, dir, i, wt);
- // now half_x is sum over lower half of box, if split at i
- if (half_w == 0)
- {
- // subbox could be empty of pixels!
- continue; // never split into an empty box
- }
- else
- temp = ((float) half_r * half_r + (float) half_g * half_g + (float) half_b * half_b) / half_w;
-
- half_r = whole_r - half_r;
- half_g = whole_g - half_g;
- half_b = whole_b - half_b;
- half_w = whole_w - half_w;
- if (half_w == 0)
- {
- // subbox could be empty of pixels!
- continue; // never split into an empty box
- }
- else
- temp += ((float) half_r * half_r + (float) half_g * half_g + (float) half_b * half_b) / half_w;
-
- if (temp > max)
- {
- max = temp;
- *cut = i;
- }
- }
- return (max);
+ long half_r;
+ long half_g;
+ long half_b;
+ long half_w;
+ long base_r;
+ long base_g;
+ long base_b;
+ long base_w;
+ int i;
+ float temp;
+ float max;
+
+ base_r = Bottom(cube, dir, mr);
+ base_g = Bottom(cube, dir, mg);
+ base_b = Bottom(cube, dir, mb);
+ base_w = Bottom(cube, dir, wt);
+ max = 0.0;
+ *cut = -1;
+ for (i = first; i < last; i++)
+ {
+ half_r = base_r + Top(cube, dir, i, mr);
+ half_g = base_g + Top(cube, dir, i, mg);
+ half_b = base_b + Top(cube, dir, i, mb);
+ half_w = base_w + Top(cube, dir, i, wt);
+ // now half_x is sum over lower half of box, if split at i
+ if (half_w == 0)
+ {
+ // subbox could be empty of pixels!
+ continue; // never split into an empty box
+ }
+ else
+ temp = ((float) half_r * half_r + (float) half_g * half_g + (float) half_b * half_b) / half_w;
+
+ half_r = whole_r - half_r;
+ half_g = whole_g - half_g;
+ half_b = whole_b - half_b;
+ half_w = whole_w - half_w;
+ if (half_w == 0)
+ {
+ // subbox could be empty of pixels!
+ continue; // never split into an empty box
+ }
+ else
+ temp += ((float) half_r * half_r + (float) half_g * half_g + (float) half_b * half_b) / half_w;
+
+ if (temp > max)
+ {
+ max = temp;
+ *cut = i;
+ }
+ }
+ return (max);
}
float cQuantizeWu::Var(struct box * cube)
{
- float dr;
- float dg;
- float db;
- float xx;
-
- dr = Vol(cube, mr);
- dg = Vol(cube, mg);
- db = Vol(cube, mb);
- xx = m2[cube->r1][cube->g1][cube->b1]
- - m2[cube->r1][cube->g1][cube->b0]
- - m2[cube->r1][cube->g0][cube->b1]
- + m2[cube->r1][cube->g0][cube->b0]
- - m2[cube->r0][cube->g1][cube->b1]
- + m2[cube->r0][cube->g1][cube->b0]
- + m2[cube->r0][cube->g0][cube->b1]
- - m2[cube->r0][cube->g0][cube->b0];
-
- return (xx - (dr * dr + dg * dg + db * db) / (float) Vol(cube, wt));
+ float dr;
+ float dg;
+ float db;
+ float xx;
+
+ dr = Vol(cube, mr);
+ dg = Vol(cube, mg);
+ db = Vol(cube, mb);
+ xx = m2[cube->r1][cube->g1][cube->b1]
+ - m2[cube->r1][cube->g1][cube->b0]
+ - m2[cube->r1][cube->g0][cube->b1]
+ + m2[cube->r1][cube->g0][cube->b0]
+ - m2[cube->r0][cube->g1][cube->b1]
+ + m2[cube->r0][cube->g1][cube->b0]
+ + m2[cube->r0][cube->g0][cube->b1]
+ - m2[cube->r0][cube->g0][cube->b0];
+
+ return (xx - (dr * dr + dg * dg + db * db) / (float) Vol(cube, wt));
}
long cQuantizeWu::Bottom(struct box * cube, unsigned char dir, long mmt[BOX][BOX][BOX])
{
- switch (dir)
- {
- case RED:
- return (-mmt[cube->r0][cube->g1][cube->b1]
- + mmt[cube->r0][cube->g1][cube->b0]
- + mmt[cube->r0][cube->g0][cube->b1]
- - mmt[cube->r0][cube->g0][cube->b0]);
- case GREEN:
- return (-mmt[cube->r1][cube->g0][cube->b1]
- + mmt[cube->r1][cube->g0][cube->b0]
- + mmt[cube->r0][cube->g0][cube->b1]
- - mmt[cube->r0][cube->g0][cube->b0]);
- case BLUE:
- return (-mmt[cube->r1][cube->g1][cube->b0]
- + mmt[cube->r1][cube->g0][cube->b0]
- + mmt[cube->r0][cube->g1][cube->b0]
- - mmt[cube->r0][cube->g0][cube->b0]);
- }
- printf("error in Bottom()");
- return 0;
+ switch (dir)
+ {
+ case RED:
+ return (-mmt[cube->r0][cube->g1][cube->b1]
+ + mmt[cube->r0][cube->g1][cube->b0]
+ + mmt[cube->r0][cube->g0][cube->b1]
+ - mmt[cube->r0][cube->g0][cube->b0]);
+ case GREEN:
+ return (-mmt[cube->r1][cube->g0][cube->b1]
+ + mmt[cube->r1][cube->g0][cube->b0]
+ + mmt[cube->r0][cube->g0][cube->b1]
+ - mmt[cube->r0][cube->g0][cube->b0]);
+ case BLUE:
+ return (-mmt[cube->r1][cube->g1][cube->b0]
+ + mmt[cube->r1][cube->g0][cube->b0]
+ + mmt[cube->r0][cube->g1][cube->b0]
+ - mmt[cube->r0][cube->g0][cube->b0]);
+ }
+ printf("error in Bottom()");
+ return 0;
}
long cQuantizeWu::Top(struct box * cube, unsigned char dir, int pos, long mmt[BOX][BOX][BOX])
{
- switch (dir)
- {
- case RED:
- return (mmt[pos][cube->g1][cube->b1]
- - mmt[pos][cube->g1][cube->b0]
- - mmt[pos][cube->g0][cube->b1]
- + mmt[pos][cube->g0][cube->b0]);
- case GREEN:
- return (mmt[cube->r1][pos][cube->b1]
- - mmt[cube->r1][pos][cube->b0]
- - mmt[cube->r0][pos][cube->b1]
- + mmt[cube->r0][pos][cube->b0]);
- case BLUE:
- return (mmt[cube->r1][cube->g1][pos]
- - mmt[cube->r1][cube->g0][pos]
- - mmt[cube->r0][cube->g1][pos]
- + mmt[cube->r0][cube->g0][pos]);
- }
+ switch (dir)
+ {
+ case RED:
+ return (mmt[pos][cube->g1][cube->b1]
+ - mmt[pos][cube->g1][cube->b0]
+ - mmt[pos][cube->g0][cube->b1]
+ + mmt[pos][cube->g0][cube->b0]);
+ case GREEN:
+ return (mmt[cube->r1][pos][cube->b1]
+ - mmt[cube->r1][pos][cube->b0]
+ - mmt[cube->r0][pos][cube->b1]
+ + mmt[cube->r0][pos][cube->b0]);
+ case BLUE:
+ return (mmt[cube->r1][cube->g1][pos]
+ - mmt[cube->r1][cube->g0][pos]
+ - mmt[cube->r0][cube->g1][pos]
+ + mmt[cube->r0][cube->g0][pos]);
+ }
printf("error in Top()");
- return 0;
+ return 0;
}
void cQuantizeWu::Mark(struct box * cube, int label, unsigned char * tag)
{
- int r;
- int g;
- int b;
-
- for (r = cube->r0 + 1; r <= cube->r1; r++)
- for (g = cube->g0 + 1; g <= cube->g1; g++)
- for (b = cube->b0 + 1; b <= cube->b1; b++)
- tag[(r << 10) + (r << 6) + r + (g << 5) + g + b] = label;
+ int r;
+ int g;
+ int b;
+
+ for (r = cube->r0 + 1; r <= cube->r1; r++)
+ for (g = cube->g0 + 1; g <= cube->g1; g++)
+ for (b = cube->b0 + 1; b <= cube->b1; b++)
+ tag[(r << 10) + (r << 6) + r + (g << 5) + g + b] = label;
}
diff --git a/quantize.h b/quantize.h
index 389090b..11dd527 100644
--- a/quantize.h
+++ b/quantize.h
@@ -12,49 +12,49 @@
class cQuantize
{
protected:
- unsigned int paletteOutput[MAXCOLOR];
- unsigned char imageOutput[1024*1024];
+ unsigned int paletteOutput[MAXCOLOR];
+ unsigned char imageOutput[1024*1024];
public:
- cQuantize();
- virtual ~cQuantize();
- virtual int Quantize(unsigned char * input, int size, int colors) = 0;
- unsigned int * OutputPalette() { return paletteOutput; }
- unsigned char * OutputImage() { return imageOutput; }
+ cQuantize();
+ virtual ~cQuantize();
+ virtual int Quantize(unsigned char * input, int size, int colors) = 0;
+ unsigned int * OutputPalette() { return paletteOutput; }
+ unsigned char * OutputImage() { return imageOutput; }
};
class cQuantizeFixed : public cQuantize
{
private:
- unsigned char * imageInput;
- int imageSize;
+ unsigned char * imageInput;
+ int imageSize;
- unsigned char redLevels[32];
- unsigned char greenLevels[32];
- unsigned char blueLevels[32];
- int redLevelCount;
- int greenLevelCount;
- int blueLevelCount;
+ unsigned char redLevels[32];
+ unsigned char greenLevels[32];
+ unsigned char blueLevels[32];
+ int redLevelCount;
+ int greenLevelCount;
+ int blueLevelCount;
public:
- cQuantizeFixed();
- virtual ~cQuantizeFixed();
- virtual int Quantize(unsigned char * input, int size, int colors);
+ cQuantizeFixed();
+ virtual ~cQuantizeFixed();
+ virtual int Quantize(unsigned char * input, int size, int colors);
};
#define RED 2
-#define GREEN 1
+#define GREEN 1
#define BLUE 0
//#define NOINVERT // RGB or BGR
struct box
{
- int r0;
- int r1;
- int g0;
- int g1;
- int b0;
- int b1;
- int vol;
+ int r0;
+ int r1;
+ int g0;
+ int g1;
+ int b0;
+ int b1;
+ int vol;
};
// Histogram is in elements 1..HISTSIZE along each axis,
@@ -65,31 +65,31 @@ struct box
class cQuantizeWu : public cQuantize
{
private:
- long wt[BOX][BOX][BOX];
- long mr[BOX][BOX][BOX];
- long mg[BOX][BOX][BOX];
- long mb[BOX][BOX][BOX];
- float m2[BOX][BOX][BOX];
+ long wt[BOX][BOX][BOX];
+ long mr[BOX][BOX][BOX];
+ long mg[BOX][BOX][BOX];
+ long mb[BOX][BOX][BOX];
+ float m2[BOX][BOX][BOX];
- unsigned short * Qadd;
+ unsigned short * Qadd;
- unsigned char * imageInput;
- int imageSize;
- int palSize;
+ unsigned char * imageInput;
+ int imageSize;
+ int palSize;
- void Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2);
- void Momt3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2);
- int Cut(struct box * set1, struct box * set2);
- long Vol(struct box * cube, long mmt[BOX][BOX][BOX]);
- float Maximize(struct box * cube, unsigned char dir, int first, int last, int * cut, long whole_r, long whole_g, long whole_b, long whole_w);
- float Var(struct box * cube);
- long Top(struct box * cube, unsigned char dir, int pos, long mmt[BOX][BOX][BOX]);
- long Bottom(struct box * cube, unsigned char dir, long mmt[BOX][BOX][BOX]);
- void Mark(struct box * cube, int label, unsigned char * tag);
+ void Hist3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2);
+ void Momt3d(long *vwt, long *vmr, long *vmg, long *vmb, float *m_2);
+ int Cut(struct box * set1, struct box * set2);
+ long Vol(struct box * cube, long mmt[BOX][BOX][BOX]);
+ float Maximize(struct box * cube, unsigned char dir, int first, int last, int * cut, long whole_r, long whole_g, long whole_b, long whole_w);
+ float Var(struct box * cube);
+ long Top(struct box * cube, unsigned char dir, int pos, long mmt[BOX][BOX][BOX]);
+ long Bottom(struct box * cube, unsigned char dir, long mmt[BOX][BOX][BOX]);
+ void Mark(struct box * cube, int label, unsigned char * tag);
public:
- cQuantizeWu();
- virtual ~cQuantizeWu();
- virtual int Quantize(unsigned char * input, int size, int colors);
+ cQuantizeWu();
+ virtual ~cQuantizeWu();
+ virtual int Quantize(unsigned char * input, int size, int colors);
};
#endif // VDR_OSDPIP_QUANTIZE_H
diff --git a/receiver.c b/receiver.c
index c12d7c6..565f13b 100644
--- a/receiver.c
+++ b/receiver.c
@@ -13,145 +13,101 @@
#include <vdr/ringbuffer.h>
cOsdPipReceiver::cOsdPipReceiver(const cChannel *Channel,
- cRingBufferFrame *ESBuffer):
-#if VDRVERSNUM >= 10319
- cReceiver(Channel->Ca(), 0, Channel->Vpid())
+ cRingBufferFrame *ESBuffer):
+#if (APIVERSNUM < 10500)
+ cReceiver(Channel->Ca(), 0, Channel->Vpid()),
#else
- cReceiver(Channel->Ca(), 0, 1, Channel->Vpid())
+ cReceiver(Channel->GetChannelID(), 0, Channel->Vpid()),
#endif
+ cThread("osdpip_receiver")
{
- m_TSBuffer = new cRingBufferLinear(MEGABYTE(3), TS_SIZE * 2, true);
-#if VDRVERSNUM >= 10313
- m_TSBuffer->SetTimeouts(0, 100);
-#endif
- m_ESBuffer = ESBuffer;
-#if VDRVERSNUM >= 10319
- m_Remux = new cRemux(Channel->Vpid(), NULL, NULL, NULL, true);
-#else
- m_Remux = new cRemux(Channel->Vpid(), 0, 0, 0, 0, true);
-#endif
- m_Active = false;
+ m_TSBuffer = new cRingBufferLinear(MEGABYTE(3), TS_SIZE * 2, true);
+ m_TSBuffer->SetTimeouts(0, 100);
+ m_ESBuffer = ESBuffer;
+ m_Remux = new cRemux(Channel->Vpid(), NULL, NULL, NULL, true);
+ m_Active = false;
}
cOsdPipReceiver::~cOsdPipReceiver()
{
- Detach();
- delete m_Remux;
- delete m_TSBuffer;
+ Detach();
+ delete m_Remux;
+ delete m_TSBuffer;
}
void cOsdPipReceiver::Activate(bool On)
{
- if (On)
- Start();
- else if (m_Active) {
- m_Active = false;
- Cancel(3);
- }
+ if (On)
+ Start();
+ else if (m_Active) {
+ m_Active = false;
+ Cancel(3);
+ }
}
void cOsdPipReceiver::Receive(uchar *Data, int Length)
{
- int put = m_TSBuffer->Put(Data, Length);
- if (put != Length)
-#if VDRVERSNUM < 10313
- esyslog("osdpip: ringbuffer overflow (%d bytes dropped)", Length - put);
-#else
- m_TSBuffer->ReportOverflow(Length - put);
-#endif
+ int put = m_TSBuffer->Put(Data, Length);
+ if (put != Length)
+ m_TSBuffer->ReportOverflow(Length - put);
}
void cOsdPipReceiver::Action(void)
{
- dsyslog("osdpip: receiver thread started (pid=%d)", getpid());
-
- m_Active = true;
+ dsyslog("osdpip: receiver thread started (pid=%d)", getpid());
- unsigned char NewPictureType = NO_PICTURE;
- unsigned char CurPictureType = NO_PICTURE;
- unsigned char VideoBuffer[200000];
- int VideoBufferPos = 0;
+ m_Active = true;
- while (m_Active) {
-#if VDRVERSNUM < 10313
- int r;
- const uchar *b = m_TSBuffer->Get(r);
- if (b) {
- int Count = r, Result;
- uchar *p = m_Remux->Process(b, Count, Result, &NewPictureType);
- m_TSBuffer->Del(Count);
+ unsigned char NewPictureType = NO_PICTURE;
+ unsigned char CurPictureType = NO_PICTURE;
+ unsigned char VideoBuffer[200000];
+ int VideoBufferPos = 0;
- if (p) {
- if (NewPictureType != NO_PICTURE) {
- if ((OsdPipSetup.FrameMode == kFrameModeI && CurPictureType == I_FRAME) ||
- (OsdPipSetup.FrameMode == kFrameModeIP && (CurPictureType == I_FRAME || CurPictureType == P_FRAME)) ||
- (OsdPipSetup.FrameMode == kFrameModeIPB))
- {
- cFrame * frame = new cFrame(VideoBuffer, VideoBufferPos, ftVideo, CurPictureType);
- if (!m_ESBuffer->Put(frame))
- {
- delete frame;
- }
- }
- CurPictureType = NewPictureType;
- VideoBufferPos = 0;
- }
- cPESPacket Packet(p, Result);
- int PayloadLength = 0;
- unsigned char * PayloadData = Packet.Payload(PayloadLength);
- if ((Packet.StreamId() & 0xF0) == 0xE0) { // video packet
- memcpy(&VideoBuffer[VideoBufferPos], PayloadData, PayloadLength);
- VideoBufferPos += PayloadLength;
- }
- }
- } else
- usleep(1); // this keeps the CPU load low
-#else
- int r;
- const uchar *b = m_TSBuffer->Get(r);
- if (b) {
- int Count = m_Remux->Put(b, r);
- if (Count)
- m_TSBuffer->Del(Count);
- }
+ while (m_Active) {
+ int r;
+ const uchar *b = m_TSBuffer->Get(r);
+ if (b) {
+ int Count = m_Remux->Put(b, r);
+ if (Count)
+ m_TSBuffer->Del(Count);
+ }
- int Result;
- uchar *p = m_Remux->Get(Result, &NewPictureType);
- if (p) {
- if (NewPictureType != NO_PICTURE) {
- if ((OsdPipSetup.FrameMode == kFrameModeI && CurPictureType == I_FRAME) ||
- (OsdPipSetup.FrameMode == kFrameModeIP && (CurPictureType == I_FRAME || CurPictureType == P_FRAME)) ||
- (OsdPipSetup.FrameMode == kFrameModeIPB))
- {
- cFrame * frame = new cFrame(VideoBuffer, VideoBufferPos, ftVideo, CurPictureType);
- if (!m_ESBuffer->Put(frame))
- {
- delete frame;
- }
- }
- CurPictureType = NewPictureType;
- VideoBufferPos = 0;
- }
+ int Result;
+ uchar *p = m_Remux->Get(Result, &NewPictureType);
+ if (p) {
+ if (NewPictureType != NO_PICTURE) {
+ if ((OsdPipSetup.FrameMode == kFrameModeI && CurPictureType == I_FRAME) ||
+ (OsdPipSetup.FrameMode == kFrameModeIP && (CurPictureType == I_FRAME || CurPictureType == P_FRAME)) ||
+ (OsdPipSetup.FrameMode == kFrameModeIPB))
+ {
+ cFrame * frame = new cFrame(VideoBuffer, VideoBufferPos, ftVideo, CurPictureType);
+ if (!m_ESBuffer->Put(frame))
+ {
+ delete frame;
+ }
+ }
+ CurPictureType = NewPictureType;
+ VideoBufferPos = 0;
+ }
- int pos = 0;
- while (pos + 6 < Result)
- {
- cPESPacket Packet(p + pos, Result - pos);
- if (pos + 6 + Packet.PacketLength() > Result)
- break;
- int PayloadLength = 0;
- unsigned char * PayloadData = Packet.Payload(PayloadLength);
- if ((Packet.StreamId() & 0xF0) == 0xE0) { // video packet
- memcpy(&VideoBuffer[VideoBufferPos], PayloadData, PayloadLength);
- VideoBufferPos += PayloadLength;
- }
- pos += Packet.PacketLength() + 6;
- }
- m_Remux->Del(pos);
- }
-#endif
- }
+ int pos = 0;
+ while (pos + 6 < Result)
+ {
+ cPESPacket Packet(p + pos, Result - pos);
+ if (pos + 6 + Packet.PacketLength() > Result)
+ break;
+ int PayloadLength = 0;
+ unsigned char * PayloadData = Packet.Payload(PayloadLength);
+ if ((Packet.StreamId() & 0xF0) == 0xE0) { // video packet
+ memcpy(&VideoBuffer[VideoBufferPos], PayloadData, PayloadLength);
+ VideoBufferPos += PayloadLength;
+ }
+ pos += Packet.PacketLength() + 6;
+ }
+ m_Remux->Del(pos);
+ }
+ }
- dsyslog("osdpip: receiver thread ended (pid=%d)", getpid());
+ dsyslog("osdpip: receiver thread ended (pid=%d)", getpid());
}
diff --git a/receiver.h b/receiver.h
index d05b2f0..13c3ddf 100644
--- a/receiver.h
+++ b/receiver.h
@@ -16,21 +16,20 @@ class cRemux;
class cOsdPipReceiver: public cReceiver, public cThread {
private:
- cRingBufferLinear *m_TSBuffer;
- cRingBufferFrame *m_ESBuffer;
- cRemux *m_Remux;
+ cRingBufferLinear *m_TSBuffer;
+ cRingBufferFrame *m_ESBuffer;
+ cRemux *m_Remux;
- bool m_Active;
+ bool m_Active;
protected:
- virtual void Activate(bool On);
- virtual void Receive(uchar *Data, int Length);
- virtual void Action(void);
+ virtual void Activate(bool On);
+ virtual void Receive(uchar *Data, int Length);
+ virtual void Action(void);
public:
- cOsdPipReceiver::cOsdPipReceiver(const cChannel *Channel,
- cRingBufferFrame *ESBuffer);
- virtual ~cOsdPipReceiver();
+ cOsdPipReceiver(const cChannel *Channel, cRingBufferFrame *ESBuffer);
+ virtual ~cOsdPipReceiver();
};
#endif // VDR_OSDPIP_RECEIVER_H
diff --git a/setup.c b/setup.c
index 03663c6..941fa73 100644
--- a/setup.c
+++ b/setup.c
@@ -7,119 +7,121 @@
#include <vdr/config.h>
#include "setup.h"
+#include "i18n.h"
-const int kColorDepths = 4;
+const int kColorDepths = 5;
const int kSizes = 11;
const int kFrameModes = 3;
const int kFrameDrops = 4;
const int kShowInfoTypes = 4;
const int kInfoPositions = 4;
-const char * ColorDepthItems[] = {NULL, NULL, NULL, NULL, NULL}; // initialized later
+const char * ColorDepthItems[] = {NULL, NULL, NULL, NULL, NULL, NULL}; // initialized later
const char * ShowInfoItems[] = {NULL, NULL, NULL, NULL, NULL}; // initialized later
const char * InfoPositionItems[] = {NULL, NULL, NULL, NULL, NULL}; // initialized later
const char * FrameDropItems[] = {NULL, NULL, NULL, NULL, NULL}; // initialized later
const char * SizeItems[] = {
- "100x80",
- "120x96",
- "140x112",
- "160x128",
- "180x144",
- "200x160",
- "220x176",
- "240x192",
- "260x208",
- "280x224",
- "300x240",
- NULL
+ "100x80",
+ "120x96",
+ "140x112",
+ "160x128",
+ "180x144",
+ "200x160",
+ "220x176",
+ "240x192",
+ "260x208",
+ "280x224",
+ "300x240",
+ NULL
};
const char * FrameModeItems[] = {
- "I",
- "I, P",
- "I, P, B"
+ "I",
+ "I, P",
+ "I, P, B"
};
cOsdPipSetup OsdPipSetup;
cOsdPipSetup::cOsdPipSetup(void)
{
- XPosition = 50;
- YPosition = 50;
- CropLeft = 5;
- CropRight = 5;
- CropTop = 5;
- CropBottom = 5;
- ColorDepth = kDepthGrey16;
- Size = 5;
- FrameMode = kFrameModeI;
- FrameDrop = -1;
- SwapFfmpeg = 1;
- ShowInfo = 1;
- InfoWidth = 400;
- InfoPosition = kInfoBottomLeft;
+ XPosition = 50;
+ YPosition = 50;
+ CropLeft = 5;
+ CropRight = 5;
+ CropTop = 5;
+ CropBottom = 5;
+ ColorDepth = kDepthGrey16;
+ Size = 5;
+ FrameMode = kFrameModeI;
+ FrameDrop = -1;
+ SwapFfmpeg = 1;
+ ShowInfo = 1;
+ InfoWidth = 400;
+ InfoPosition = kInfoBottomLeft;
}
bool cOsdPipSetup::SetupParse(const char *Name, const char *Value)
{
- if (strcmp(Name, "XPosition") == 0) XPosition = atoi(Value);
- else if (strcmp(Name, "YPosition") == 0) YPosition = atoi(Value);
- else if (strcmp(Name, "CropLeft") == 0) CropLeft = atoi(Value);
- else if (strcmp(Name, "CropRight") == 0) CropRight = atoi(Value);
- else if (strcmp(Name, "CropTop") == 0) CropTop = atoi(Value);
- else if (strcmp(Name, "CropBottom") == 0) CropBottom = atoi(Value);
- else if (strcmp(Name, "ColorDepth") == 0) ColorDepth = atoi(Value);
- else if (strcmp(Name, "Size") == 0) Size = atoi(Value);
- else if (strcmp(Name, "FrameMode") == 0) FrameMode = atoi(Value);
- else if (strcmp(Name, "FrameDrop") == 0) FrameDrop = atoi(Value);
- else if (strcmp(Name, "SwapFfmpeg") == 0) SwapFfmpeg = atoi(Value);
- else if (strcmp(Name, "ShowInfo") == 0) ShowInfo = atoi(Value);
- else if (strcmp(Name, "InfoWidth") == 0) InfoWidth = atoi(Value);
- else if (strcmp(Name, "InfoPosition") == 0) InfoPosition = atoi(Value);
- else return false;
- return true;
+ if (strcmp(Name, "XPosition") == 0) XPosition = atoi(Value);
+ else if (strcmp(Name, "YPosition") == 0) YPosition = atoi(Value);
+ else if (strcmp(Name, "CropLeft") == 0) CropLeft = atoi(Value);
+ else if (strcmp(Name, "CropRight") == 0) CropRight = atoi(Value);
+ else if (strcmp(Name, "CropTop") == 0) CropTop = atoi(Value);
+ else if (strcmp(Name, "CropBottom") == 0) CropBottom = atoi(Value);
+ else if (strcmp(Name, "ColorDepth") == 0) ColorDepth = atoi(Value);
+ else if (strcmp(Name, "Size") == 0) Size = atoi(Value);
+ else if (strcmp(Name, "FrameMode") == 0) FrameMode = atoi(Value);
+ else if (strcmp(Name, "FrameDrop") == 0) FrameDrop = atoi(Value);
+ else if (strcmp(Name, "SwapFfmpeg") == 0) SwapFfmpeg = atoi(Value);
+ else if (strcmp(Name, "ShowInfo") == 0) ShowInfo = atoi(Value);
+ else if (strcmp(Name, "InfoWidth") == 0) InfoWidth = atoi(Value);
+ else if (strcmp(Name, "InfoPosition") == 0) InfoPosition = atoi(Value);
+ else return false;
+ return true;
}
cOsdPipSetupPage::cOsdPipSetupPage(void)
{
- m_NewOsdPipSetup = OsdPipSetup;
- m_NewOsdPipSetup.FrameDrop += 1;
-
- ColorDepthItems[0] = tr("Greyscale (16)");
- ColorDepthItems[1] = tr("Greyscale (256)");
- ColorDepthItems[2] = tr("Color (256, fixed)");
- ColorDepthItems[3] = tr("Color (128, variable)");
-
- ShowInfoItems[0] = tr("no");
- ShowInfoItems[1] = tr("channel only");
- ShowInfoItems[2] = tr("simple");
- ShowInfoItems[3] = tr("complete");
-
- InfoPositionItems[0] = tr("top left");
- InfoPositionItems[1] = tr("top right");
- InfoPositionItems[2] = tr("bottom left");
- InfoPositionItems[3] = tr("bottom right");
-
- FrameDropItems[0] = tr("automatic");
- FrameDropItems[1] = tr("none");
- FrameDropItems[2] = tr("1 frame");
- FrameDropItems[3] = tr("2 frames");
-
- Add(new cMenuEditIntItem(tr("X Position"), &m_NewOsdPipSetup.XPosition, 0, 600));
- Add(new cMenuEditIntItem(tr("Y Position"), &m_NewOsdPipSetup.YPosition, 0, 470));
- Add(new cMenuEditIntItem(tr("Crop left"), &m_NewOsdPipSetup.CropLeft, 0, 80));
- Add(new cMenuEditIntItem(tr("Crop right"), &m_NewOsdPipSetup.CropRight, 0, 80));
- Add(new cMenuEditIntItem(tr("Crop at top"), &m_NewOsdPipSetup.CropTop, 0, 80));
- Add(new cMenuEditIntItem(tr("Crop at bottom"), &m_NewOsdPipSetup.CropBottom, 0, 80));
- Add(new cMenuEditStraItem(tr("Color depth"), &m_NewOsdPipSetup.ColorDepth, kColorDepths, ColorDepthItems));
- Add(new cMenuEditStraItem(tr("Size"), &m_NewOsdPipSetup.Size, kSizes, SizeItems));
- Add(new cMenuEditStraItem(tr("Frames to display"), &m_NewOsdPipSetup.FrameMode, kFrameModes, FrameModeItems));
- Add(new cMenuEditStraItem(tr("Drop frames"), &m_NewOsdPipSetup.FrameDrop, kFrameDrops, FrameDropItems));
- Add(new cMenuEditBoolItem(tr("Swap FFMPEG output"), &m_NewOsdPipSetup.SwapFfmpeg));
- Add(new cMenuEditStraItem(tr("Show info window"), &m_NewOsdPipSetup.ShowInfo, kShowInfoTypes, ShowInfoItems));
- Add(new cMenuEditIntItem(tr("Info window width"), &m_NewOsdPipSetup.InfoWidth, 200, 600));
- Add(new cMenuEditStraItem(tr("Info window position"), &m_NewOsdPipSetup.InfoPosition, kInfoPositions, InfoPositionItems));
+ m_NewOsdPipSetup = OsdPipSetup;
+ m_NewOsdPipSetup.FrameDrop += 1;
+
+ ColorDepthItems[0] = tr("Greyscale (16)");
+ ColorDepthItems[1] = tr("Greyscale (256)");
+ ColorDepthItems[2] = tr("Color (256, fixed)");
+ ColorDepthItems[3] = tr("Color (128, variable)");
+ ColorDepthItems[4] = tr("Color (256, dithered)");
+
+ ShowInfoItems[0] = trVDR("no");
+ ShowInfoItems[1] = tr("channel only");
+ ShowInfoItems[2] = tr("simple");
+ ShowInfoItems[3] = tr("complete");
+
+ InfoPositionItems[0] = tr("top left");
+ InfoPositionItems[1] = tr("top right");
+ InfoPositionItems[2] = tr("bottom left");
+ InfoPositionItems[3] = tr("bottom right");
+
+ FrameDropItems[0] = tr("automatic");
+ FrameDropItems[1] = tr("none");
+ FrameDropItems[2] = tr("1 frame");
+ FrameDropItems[3] = tr("2 frames");
+
+ Add(new cMenuEditIntItem(tr("X Position"), &m_NewOsdPipSetup.XPosition, 0, 600));
+ Add(new cMenuEditIntItem(tr("Y Position"), &m_NewOsdPipSetup.YPosition, 0, 470));
+ Add(new cMenuEditIntItem(tr("Crop left"), &m_NewOsdPipSetup.CropLeft, 0, 80));
+ Add(new cMenuEditIntItem(tr("Crop right"), &m_NewOsdPipSetup.CropRight, 0, 80));
+ Add(new cMenuEditIntItem(tr("Crop at top"), &m_NewOsdPipSetup.CropTop, 0, 80));
+ Add(new cMenuEditIntItem(tr("Crop at bottom"), &m_NewOsdPipSetup.CropBottom, 0, 80));
+ Add(new cMenuEditStraItem(tr("Color depth"), &m_NewOsdPipSetup.ColorDepth, kColorDepths, ColorDepthItems));
+ Add(new cMenuEditStraItem(tr("Size"), &m_NewOsdPipSetup.Size, kSizes, SizeItems));
+ Add(new cMenuEditStraItem(tr("Frames to display"), &m_NewOsdPipSetup.FrameMode, kFrameModes, FrameModeItems));
+ Add(new cMenuEditStraItem(tr("Drop frames"), &m_NewOsdPipSetup.FrameDrop, kFrameDrops, FrameDropItems));
+ Add(new cMenuEditBoolItem(tr("Swap FFMPEG output"), &m_NewOsdPipSetup.SwapFfmpeg));
+ Add(new cMenuEditStraItem(tr("Show info window"), &m_NewOsdPipSetup.ShowInfo, kShowInfoTypes, ShowInfoItems));
+ Add(new cMenuEditIntItem(tr("Info window width"), &m_NewOsdPipSetup.InfoWidth, 200, 600));
+ Add(new cMenuEditStraItem(tr("Info window position"), &m_NewOsdPipSetup.InfoPosition, kInfoPositions, InfoPositionItems));
}
cOsdPipSetupPage::~cOsdPipSetupPage()
@@ -128,22 +130,22 @@ cOsdPipSetupPage::~cOsdPipSetupPage()
void cOsdPipSetupPage::Store(void)
{
- OsdPipSetup = m_NewOsdPipSetup;
- OsdPipSetup.FrameDrop -= 1;
-
- SetupStore("XPosition", OsdPipSetup.XPosition);
- SetupStore("YPosition", OsdPipSetup.YPosition);
- SetupStore("CropLeft", OsdPipSetup.CropLeft);
- SetupStore("CropRight", OsdPipSetup.CropRight);
- SetupStore("CropTop", OsdPipSetup.CropTop);
- SetupStore("CropBottom", OsdPipSetup.CropBottom);
- SetupStore("ColorDepth", OsdPipSetup.ColorDepth);
- SetupStore("Size", OsdPipSetup.Size);
- SetupStore("FrameMode", OsdPipSetup.FrameMode);
- SetupStore("FrameDrop", OsdPipSetup.FrameDrop);
- SetupStore("SwapFfmpeg", OsdPipSetup.SwapFfmpeg);
- SetupStore("ShowInfo", OsdPipSetup.ShowInfo);
- SetupStore("InfoWidth", OsdPipSetup.InfoWidth);
- SetupStore("InfoPosition", OsdPipSetup.InfoPosition);
+ OsdPipSetup = m_NewOsdPipSetup;
+ OsdPipSetup.FrameDrop -= 1;
+
+ SetupStore("XPosition", OsdPipSetup.XPosition);
+ SetupStore("YPosition", OsdPipSetup.YPosition);
+ SetupStore("CropLeft", OsdPipSetup.CropLeft);
+ SetupStore("CropRight", OsdPipSetup.CropRight);
+ SetupStore("CropTop", OsdPipSetup.CropTop);
+ SetupStore("CropBottom", OsdPipSetup.CropBottom);
+ SetupStore("ColorDepth", OsdPipSetup.ColorDepth);
+ SetupStore("Size", OsdPipSetup.Size);
+ SetupStore("FrameMode", OsdPipSetup.FrameMode);
+ SetupStore("FrameDrop", OsdPipSetup.FrameDrop);
+ SetupStore("SwapFfmpeg", OsdPipSetup.SwapFfmpeg);
+ SetupStore("ShowInfo", OsdPipSetup.ShowInfo);
+ SetupStore("InfoWidth", OsdPipSetup.InfoWidth);
+ SetupStore("InfoPosition", OsdPipSetup.InfoPosition);
}
diff --git a/setup.h b/setup.h
index 0a3dab0..af2c0fe 100644
--- a/setup.h
+++ b/setup.h
@@ -13,6 +13,7 @@ const int kDepthGrey16 = 0;
const int kDepthGrey256 = 1;
const int kDepthColor256fix = 2;
const int kDepthColor128var = 3;
+const int kDepthColor256dither = 4;
const int kFrameModeI = 0;
const int kFrameModeIP = 1;
@@ -24,24 +25,24 @@ const int kInfoBottomLeft = 2;
const int kInfoBottomRight = 3;
struct cOsdPipSetup {
- cOsdPipSetup(void);
-
- bool SetupParse(const char *Name, const char *Value);
-
- int XPosition;
- int YPosition;
- int CropLeft;
- int CropRight;
- int CropTop;
- int CropBottom;
- int ColorDepth;
- int Size;
- int FrameMode;
- int FrameDrop;
- int SwapFfmpeg;
- int ShowInfo;
- int InfoWidth;
- int InfoPosition;
+ cOsdPipSetup(void);
+
+ bool SetupParse(const char *Name, const char *Value);
+
+ int XPosition;
+ int YPosition;
+ int CropLeft;
+ int CropRight;
+ int CropTop;
+ int CropBottom;
+ int ColorDepth;
+ int Size;
+ int FrameMode;
+ int FrameDrop;
+ int SwapFfmpeg;
+ int ShowInfo;
+ int InfoWidth;
+ int InfoPosition;
};
extern cOsdPipSetup OsdPipSetup;
@@ -51,11 +52,11 @@ private:
cOsdPipSetup m_NewOsdPipSetup;
protected:
- virtual void Store(void);
+ virtual void Store(void);
public:
- cOsdPipSetupPage(void);
- virtual ~cOsdPipSetupPage();
+ cOsdPipSetupPage(void);
+ virtual ~cOsdPipSetupPage();
};
#endif // VDR_OSDPIP_SETUP_H