diff options
Diffstat (limited to 'PLUGINS/src/dvbhddevice')
-rw-r--r-- | PLUGINS/src/dvbhddevice/HISTORY | 31 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/Makefile | 4 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/dvbhddevice.c | 4 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/dvbhdffdevice.c | 28 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/hdffcmd.c | 21 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/hdffosd.c | 26 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/po/de_DE.po | 89 | ||||
-rw-r--r-- | PLUGINS/src/dvbhddevice/setup.c | 165 |
8 files changed, 251 insertions, 117 deletions
diff --git a/PLUGINS/src/dvbhddevice/HISTORY b/PLUGINS/src/dvbhddevice/HISTORY index aa788fd..280e0ad 100644 --- a/PLUGINS/src/dvbhddevice/HISTORY +++ b/PLUGINS/src/dvbhddevice/HISTORY @@ -13,4 +13,33 @@ VDR Plugin 'dvbhddevice' Revision History 2011-04-17: Version 0.0.3 -- Added support for TrueColor OSD. +- Improved trickmodes +- No transfer mode needed for dolby digital +- Clear audio and video PID when Clear() ist called to stop audio decoding when jumping to cutting marks +- Support still frames in H264 format +- Remote control setup +- Added analogue video setting, support volume control. +- Support setting of audio delay. +- Support setting of audio channel (Stereo, Left, Right) +- Support setting of audio downmix mode. +- Playback of PES data is working now. +- Fall back to MPEG2 stream type when no PMT is available. +- Added support for PES PCM playback +- Support HDMI-CEC. (One-Touch Play) +- Added low level OSD implementation. +- Added option to select between high level and low level OSD. +- high level OSD: Implement SaveRegion and RestoreRegion. +- Fix not working video playback when PCR PID is different from video PID. +- Fix not working pause when playing H.264 video +- Improvements in transfer mode, fix audio dropouts or no audio at all +- Add implementation of CanHandleAreas method to support VDR 1.7.17 +- in cHdffOsdRaw::Flush fix reusing of loop variable i in subloop that lead to OSD update problems +- Specify container format when starting audio decoding to support PES-DVD containers +- Added support for True Color OSD +- Allow to disable true color OSD support via setup option + +2011-04-xx: Version 0.0.4 +- locally define DVB OSD API extensions to support compiling with original DVB headers +- Return correct pixel aspect ratio in GetOsdSize +- Adapt Makefile to changes introduced in recent VDR versions + diff --git a/PLUGINS/src/dvbhddevice/Makefile b/PLUGINS/src/dvbhddevice/Makefile index ea1b9d1..91fdfce 100644 --- a/PLUGINS/src/dvbhddevice/Makefile +++ b/PLUGINS/src/dvbhddevice/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.7 2011/04/17 11:40:55 kls Exp $ +# $Id: Makefile 1.8 2011/05/21 12:25:33 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -83,7 +83,7 @@ I18Npot = $(PODIR)/$(PLUGIN).pot msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.c) - xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=VDR --package-version=$(VDRVERSION) --msgid-bugs-address='<see README>' -o $@ $^ + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=VDR --package-version=$(VDRVERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^` %.po: $(I18Npot) msgmerge -U --no-wrap --no-location --backup=none -q $@ $< diff --git a/PLUGINS/src/dvbhddevice/dvbhddevice.c b/PLUGINS/src/dvbhddevice/dvbhddevice.c index d639922..4745c37 100644 --- a/PLUGINS/src/dvbhddevice/dvbhddevice.c +++ b/PLUGINS/src/dvbhddevice/dvbhddevice.c @@ -3,14 +3,14 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbhddevice.c 1.12 2011/04/17 11:20:22 kls Exp $ + * $Id: dvbhddevice.c 1.13 2011/04/24 09:31:21 kls Exp $ */ #include <vdr/plugin.h> #include "dvbhdffdevice.h" #include "setup.h" -static const char *VERSION = "0.0.3"; +static const char *VERSION = "0.0.4"; static const char *DESCRIPTION = "HD Full Featured DVB device"; class cPluginDvbhddevice : public cPlugin { diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c index 9263009..714769e 100644 --- a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c +++ b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbhdffdevice.c 1.29 2011/04/17 11:20:22 kls Exp $ + * $Id: dvbhdffdevice.c 1.32 2011/05/22 15:19:59 kls Exp $ */ #include "dvbhdffdevice.h" @@ -110,7 +110,7 @@ void cDvbHdFfDevice::SetVideoFormat(bool VideoFormat16_9) { HDFF::tVideoFormat videoFormat; videoFormat.AutomaticEnabled = true; - videoFormat.AfdEnabled = true; + videoFormat.AfdEnabled = false; videoFormat.TvFormat = (HDFF::eTvFormat) gHdffSetup.TvFormat; videoFormat.VideoConversion = (HDFF::eVideoConversion) gHdffSetup.VideoConversion; mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat); @@ -364,7 +364,7 @@ bool cDvbHdFfDevice::SetPlayMode(ePlayMode PlayMode) if (playMode == pmNone) TurnOffLiveMode(true); - mHdffCmdIf->CmdAvSetPlayMode(1, Transferring()); + mHdffCmdIf->CmdAvSetPlayMode(1, Transferring() || (cTransferControl::ReceiverDevice() == this)); mHdffCmdIf->CmdAvSetStc(0, 100000); mHdffCmdIf->CmdAvEnableSync(0, true); mHdffCmdIf->CmdAvEnableVideoAfterStop(0, true); @@ -725,28 +725,14 @@ HDFF::cHdffCmdIf *cDvbHdFfDevice::GetHdffCmdHandler(void) bool cDvbHdFfDeviceProbe::Probe(int Adapter, int Frontend) { static uint32_t SubsystemIds[] = { - 0x13C23009, // Technotrend S2-6400 HDFF + 0x13C23009, // Technotrend S2-6400 HDFF development samples + 0x13C2300A, // Technotrend S2-6400 HDFF production version 0x00000000 }; - cString FileName; - cReadLine ReadLine; - FILE *f = NULL; - uint32_t SubsystemId = 0; - FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend%d/device/subsystem_vendor", Adapter, Frontend); - if ((f = fopen(FileName, "r")) != NULL) { - if (char *s = ReadLine.Read(f)) - SubsystemId = strtoul(s, NULL, 0) << 16; - fclose(f); - } - FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend%d/device/subsystem_device", Adapter, Frontend); - if ((f = fopen(FileName, "r")) != NULL) { - if (char *s = ReadLine.Read(f)) - SubsystemId |= strtoul(s, NULL, 0); - fclose(f); - } + uint32_t SubsystemId = GetSubsystemId(Adapter, Frontend); for (uint32_t *sid = SubsystemIds; *sid; sid++) { if (*sid == SubsystemId) { - FileName = cString::sprintf("/dev/dvb/adapter%d/osd0", Adapter); + cString FileName = cString::sprintf("/dev/dvb/adapter%d/osd0", Adapter); int fd = open(FileName, O_RDWR); if (fd != -1) { //TODO treat the second path of the S2-6400 as a budget device close(fd); diff --git a/PLUGINS/src/dvbhddevice/hdffcmd.c b/PLUGINS/src/dvbhddevice/hdffcmd.c index ecd26ed..82869df 100644 --- a/PLUGINS/src/dvbhddevice/hdffcmd.c +++ b/PLUGINS/src/dvbhddevice/hdffcmd.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hdffcmd.c 1.19 2011/04/17 11:20:22 kls Exp $ + * $Id: hdffcmd.c 1.20 2011/04/24 09:31:59 kls Exp $ */ #include "hdffcmd.h" @@ -13,6 +13,25 @@ #include <sys/ioctl.h> #include <vdr/tools.h> +#if !defined OSD_RAW_CMD +typedef struct osd_raw_cmd_s { + const void *cmd_data; + int cmd_len; + void *result_data; + int result_len; +} osd_raw_cmd_t; + +typedef struct osd_raw_data_s { + const void *data_buffer; + int data_length; + int data_handle; +} osd_raw_data_t; + +#define OSD_RAW_CMD _IOWR('o', 162, osd_raw_cmd_t) +#define OSD_RAW_DATA _IOWR('o', 163, osd_raw_data_t) +#endif + + namespace HDFF { diff --git a/PLUGINS/src/dvbhddevice/hdffosd.c b/PLUGINS/src/dvbhddevice/hdffosd.c index 254f2af..90d6897 100644 --- a/PLUGINS/src/dvbhddevice/hdffosd.c +++ b/PLUGINS/src/dvbhddevice/hdffosd.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hdffosd.c 1.9 2011/04/17 11:20:22 kls Exp $ + * $Id: hdffosd.c 1.10 2011/05/15 14:47:29 kls Exp $ */ #include "hdffosd.h" @@ -154,8 +154,12 @@ eOsdError cHdffOsd::SetAreas(const tArea *Areas, int NumAreas) { //printf("SetAreas %d: %d %d %d %d %d\n", i, Areas[i].x1, Areas[i].y1, Areas[i].x2, Areas[i].y2, Areas[i].bpp); } - mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); - mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); + if (shown) + { + mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); + mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); + shown = false; + } return cOsd::SetAreas(Areas, NumAreas); } @@ -166,9 +170,13 @@ void cHdffOsd::SetActive(bool On) cOsd::SetActive(On); if (On) { + if (GetBitmap(0)) // only flush here if there are already bitmaps + Flush(); } else if (shown) { + mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); + mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); shown = false; } } @@ -594,9 +602,13 @@ void cHdffOsdRaw::SetActive(bool On) cOsd::SetActive(On); if (On) { + if (GetBitmap(0)) // only flush here if there are already bitmaps + Flush(); } else if (shown) { + mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); + mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); shown = false; } } @@ -623,8 +635,12 @@ eOsdError cHdffOsdRaw::SetAreas(const tArea *Areas, int NumAreas) { //printf("SetAreas %d: %d %d %d %d %d\n", i, Areas[i].x1, Areas[i].y1, Areas[i].x2, Areas[i].y2, Areas[i].bpp); } - mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); - mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); + if (shown) + { + mHdffCmdIf->CmdOsdDrawRectangle(mDisplay, 0, 0, mDispWidth, mDispHeight, 0); + mHdffCmdIf->CmdOsdRenderDisplay(mDisplay); + shown = false; + } return cOsd::SetAreas(Areas, NumAreas); } diff --git a/PLUGINS/src/dvbhddevice/po/de_DE.po b/PLUGINS/src/dvbhddevice/po/de_DE.po new file mode 100644 index 0000000..907f243 --- /dev/null +++ b/PLUGINS/src/dvbhddevice/po/de_DE.po @@ -0,0 +1,89 @@ +# VDR plugin language source file +# Copyright (C) 2011 Andreas Regel +# This file is distributed under the same license as the dvbhddevice package. +# Christoph Haubrich, 2011 +# +msgid "" +msgstr "" +"Project-Id-Version: VDR \n" +"Report-Msgid-Bugs-To: <see README>\n" +"POT-Creation-Date: 2011-05-05 20:34+0200\n" +"PO-Revision-Date: 2011-04-25 21:44+0200\n" +"Last-Translator: Christoph Haubrich\n" +"Language-Team: <see README>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Automatic" +msgstr "automatisch" + +msgid "Letterbox 16/9" +msgstr "Letterbox 16:9" + +msgid "Letterbox 14/9" +msgstr "Letterbox 14:9" + +msgid "Pillarbox" +msgstr "Pillarbox" + +msgid "CentreCutOut" +msgstr "CentreCutOut" + +msgid "Always 16/9" +msgstr "immer 16:9" + +msgid "Disabled" +msgstr "abgeschaltet" + +msgid "Analogue only" +msgstr "nur Analoge Ausgänge" + +msgid "Always" +msgstr "immer" + +msgid "HDMI only" +msgstr "nur HDMI" + +msgid "Follow resolution" +msgstr "folge Auflösung" + +msgid "none" +msgstr "keins" + +msgid "Resolution" +msgstr "Auflösung" + +msgid "TV format" +msgstr "TV-Format" + +msgid "Video Conversion" +msgstr "Videokonvertierung" + +msgid "Analogue Video" +msgstr "Analoges Video" + +msgid "Audio Delay (ms)" +msgstr "Audio Verzögerung (ms)" + +msgid "Audio Downmix" +msgstr "Audio Downmix" + +msgid "OSD Size" +msgstr "OSD Größe" + +msgid "HDMI CEC" +msgstr "HDMI CEC" + +msgid "Remote Control Protocol" +msgstr "Fernbedienungsprotokoll" + +msgid "Remote Control Address" +msgstr "Fernbedienungsadresse" + +msgid "High Level OSD" +msgstr "High Level OSD" + +msgid "Allow True Color OSD" +msgstr "Erlaube True Color OSD" diff --git a/PLUGINS/src/dvbhddevice/setup.c b/PLUGINS/src/dvbhddevice/setup.c index 3cb69b1..30365e0 100644 --- a/PLUGINS/src/dvbhddevice/setup.c +++ b/PLUGINS/src/dvbhddevice/setup.c @@ -3,88 +3,17 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: setup.c 1.11 2011/04/17 11:45:17 kls Exp $ + * $Id: setup.c 1.12 2011/05/15 14:47:45 kls Exp $ */ #include "setup.h" #include "hdffcmd.h" -const int kResolutions = 4; -const int kTvFormats = 2; -const int kVideoConversions = 6; -const int kAnalogueVideos = 4; -const int kAudioDownmixes = 5; -const int kOsdSizes = 5; -const int kRemoteProtocols = 3; - const int kResolution1080i = 0; const int kResolution720p = 1; const int kResolution576p = 2; const int kResolution576i = 3; -static const char * ResolutionItems[] = -{ - "1080i", - "720p", - "576p", - "576i", - NULL -}; - -static const char * TvFormatItems[] = -{ - "4/3", - "16/9", - NULL -}; - -static const char * VideoConversionItems[] = -{ - "Automatic", - "Letterbox 16/9", - "Letterbox 14/9", - "Pillarbox", - "CentreCutOut", - "Always 16/9", - NULL -}; - -static const char * AnalogueVideoItems[] = -{ - "Disabled", - "RGB", - "CVBS + YUV", - "YC (S-Video)", - NULL -}; - -static const char * AudioDownmixItems[] = -{ - "Disabled", - "Analogue only", - "Always", - "Automatic", - "HDMI only", - NULL -}; - -static const char * OsdSizeItems[] = -{ - "Follow resolution", - "1920x1080", - "1280x720", - "1024x576", - "720x576", - NULL -}; - -static const char * RemoteProtocolItems[] = -{ - "none", - "RC5", - "RC6", - NULL -}; cHdffSetup gHdffSetup; @@ -162,7 +91,7 @@ void cHdffSetup::GetOsdSize(int &Width, int &Height, double &PixelAspect) Height = 576; PixelAspect = 4.0 / 3.0; } - PixelAspect /= double(Width) / Height; + PixelAspect /= double(Width) / Height; } HDFF::eHdmiVideoMode cHdffSetup::GetVideoMode(void) @@ -183,21 +112,87 @@ HDFF::eHdmiVideoMode cHdffSetup::GetVideoMode(void) cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf) { + const int kResolutions = 4; + const int kTvFormats = 2; + const int kVideoConversions = 6; + const int kAnalogueVideos = 4; + const int kAudioDownmixes = 5; + const int kOsdSizes = 5; + const int kRemoteProtocols = 3; + + static const char * ResolutionItems[kResolutions] = + { + "1080i", + "720p", + "576p", + "576i", + }; + + static const char * TvFormatItems[kTvFormats] = + { + "4/3", + "16/9", + }; + + static const char * VideoConversionItems[kVideoConversions] = + { + tr("Automatic"), + tr("Letterbox 16/9"), + tr("Letterbox 14/9"), + tr("Pillarbox"), + tr("CentreCutOut"), + tr("Always 16/9"), + }; + + + static const char * AnalogueVideoItems[kAnalogueVideos] = + { + tr("Disabled"), + "RGB", + "CVBS + YUV", + "YC (S-Video)", + }; + + static const char * AudioDownmixItems[kAudioDownmixes] = + { + tr("Disabled"), + tr("Analogue only"), + tr("Always"), + tr("Automatic"), + tr("HDMI only"), + }; + + static const char * OsdSizeItems[kOsdSizes] = + { + tr("Follow resolution"), + "1920x1080", + "1280x720", + "1024x576", + "720x576", + }; + + static const char * RemoteProtocolItems[] = + { + tr("none"), + "RC5", + "RC6", + }; + mHdffCmdIf = pHdffCmdIf; mNewHdffSetup = gHdffSetup; - Add(new cMenuEditStraItem("Resolution", &mNewHdffSetup.Resolution, kResolutions, ResolutionItems)); - Add(new cMenuEditStraItem("TV format", &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems)); - Add(new cMenuEditStraItem("Video Conversion", &mNewHdffSetup.VideoConversion, kVideoConversions, VideoConversionItems)); - Add(new cMenuEditStraItem("Analogue Video", &mNewHdffSetup.AnalogueVideo, kAnalogueVideos, AnalogueVideoItems)); - Add(new cMenuEditIntItem("Audio Delay (ms)", &mNewHdffSetup.AudioDelay, 0, 500)); - Add(new cMenuEditStraItem("Audio Downmix", &mNewHdffSetup.AudioDownmix, kAudioDownmixes, AudioDownmixItems)); - Add(new cMenuEditStraItem("Osd Size", &mNewHdffSetup.OsdSize, kOsdSizes, OsdSizeItems)); - Add(new cMenuEditBoolItem("HDMI CEC", &mNewHdffSetup.CecEnabled)); - Add(new cMenuEditStraItem("Remote Control Protocol", &mNewHdffSetup.RemoteProtocol, kRemoteProtocols, RemoteProtocolItems)); - Add(new cMenuEditIntItem("Remote Control Address", &mNewHdffSetup.RemoteAddress, -1, 31)); - Add(new cMenuEditBoolItem("High Level OSD", &mNewHdffSetup.HighLevelOsd)); - Add(new cMenuEditBoolItem("Allow True Color OSD", &mNewHdffSetup.TrueColorOsd)); + Add(new cMenuEditStraItem(tr("Resolution"), &mNewHdffSetup.Resolution, kResolutions, ResolutionItems)); + Add(new cMenuEditStraItem(tr("TV format"), &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems)); + Add(new cMenuEditStraItem(tr("Video Conversion"), &mNewHdffSetup.VideoConversion, kVideoConversions, VideoConversionItems)); + Add(new cMenuEditStraItem(tr("Analogue Video"), &mNewHdffSetup.AnalogueVideo, kAnalogueVideos, AnalogueVideoItems)); + Add(new cMenuEditIntItem(tr("Audio Delay (ms)"), &mNewHdffSetup.AudioDelay, 0, 500)); + Add(new cMenuEditStraItem(tr("Audio Downmix"), &mNewHdffSetup.AudioDownmix, kAudioDownmixes, AudioDownmixItems)); + Add(new cMenuEditStraItem(tr("OSD Size"), &mNewHdffSetup.OsdSize, kOsdSizes, OsdSizeItems)); + Add(new cMenuEditBoolItem(tr("HDMI CEC"), &mNewHdffSetup.CecEnabled)); + Add(new cMenuEditStraItem(tr("Remote Control Protocol"), &mNewHdffSetup.RemoteProtocol, kRemoteProtocols, RemoteProtocolItems)); + Add(new cMenuEditIntItem(tr("Remote Control Address"), &mNewHdffSetup.RemoteAddress, -1, 31)); + Add(new cMenuEditBoolItem(tr("High Level OSD"), &mNewHdffSetup.HighLevelOsd)); + Add(new cMenuEditBoolItem(tr("Allow True Color OSD"), &mNewHdffSetup.TrueColorOsd)); } cHdffSetupPage::~cHdffSetupPage(void) |