diff options
Diffstat (limited to 'PLUGINS/src')
31 files changed, 573 insertions, 278 deletions
diff --git a/PLUGINS/src/dvbhddevice/Makefile b/PLUGINS/src/dvbhddevice/Makefile index 09ca4ad..46597a0 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.9 2011/12/04 15:30:21 kls Exp $ +# $Id: Makefile 1.12 2012/02/08 15:10:09 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -51,7 +51,7 @@ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): -OBJS = $(PLUGIN).o bitbuffer.o dvbhdffdevice.o hdffcmd.o hdffosd.o setup.o +OBJS = $(PLUGIN).o dvbhdffdevice.o hdffcmd.o hdffosd.o menu.o setup.o ### The main target: diff --git a/PLUGINS/src/dvbhddevice/bitbuffer.c b/PLUGINS/src/dvbhddevice/bitbuffer.c deleted file mode 100644 index 244b85e..0000000 --- a/PLUGINS/src/dvbhddevice/bitbuffer.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * bitbuffer.c: TODO(short description) - * - * See the README file for copyright information and how to reach the author. - * - * $Id: bitbuffer.c 1.1 2009/12/29 14:29:20 kls Exp $ - */ - -#include "bitbuffer.h" -#include <stdlib.h> - -cBitBuffer::cBitBuffer(uint32_t MaxLength) -{ - mData = NULL; - mMaxLength = 0; - mBitPos = 0; - - if (MaxLength <= 0x10000) - { - mData = new uint8_t[MaxLength]; - if (mData) - { - mMaxLength = MaxLength * 8; - } - } -} - -cBitBuffer::~cBitBuffer(void) -{ - if (mData) - delete[] mData; -} - -uint8_t * cBitBuffer::GetData(void) -{ - return mData; -} - -uint32_t cBitBuffer::GetMaxLength(void) -{ - return mMaxLength / 8; -} - -uint32_t cBitBuffer::GetBits(int NumBits) -{ - return 0; -} - -void cBitBuffer::SetBits(int NumBits, uint32_t Data) -{ - uint32_t nextBitPos; - uint32_t bytePos; - uint32_t bitsInByte; - int shift; - - if (NumBits <= 0 || NumBits > 32) - return; - - nextBitPos = mBitPos + NumBits; - - if (nextBitPos > mMaxLength) - return; - - bytePos = mBitPos / 8; - bitsInByte = mBitPos % 8; - - mData[bytePos] &= (uint8_t) (0xFF << (8 - bitsInByte)); - shift = NumBits - (8 - bitsInByte); - if (shift > 0) - mData[bytePos] |= (uint8_t) (Data >> shift); - else - mData[bytePos] |= (uint8_t) (Data << (-shift)); - NumBits -= 8 - bitsInByte; - bytePos++; - while (NumBits > 0) - { - shift = NumBits - 8; - if (shift > 0) - mData[bytePos] = (uint8_t) (Data >> shift); - else - mData[bytePos] = (uint8_t) (Data << (-shift)); - NumBits -= 8; - bytePos++; - } - mBitPos = nextBitPos; -} - -uint32_t cBitBuffer::GetByteLength(void) -{ - return (mBitPos + 7) / 8; -} - -void cBitBuffer::SetDataByte(uint32_t Position, uint8_t Data) -{ - if (Position < mMaxLength) - mData[Position] = Data; -} diff --git a/PLUGINS/src/dvbhddevice/bitbuffer.h b/PLUGINS/src/dvbhddevice/bitbuffer.h deleted file mode 100644 index e7b3650..0000000 --- a/PLUGINS/src/dvbhddevice/bitbuffer.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * bitbuffer.h: TODO(short description) - * - * See the README file for copyright information and how to reach the author. - * - * $Id: bitbuffer.h 1.1 2009/12/29 14:27:03 kls Exp $ - */ - -#ifndef _HDFF_BITBUFFER_H_ -#define _HDFF_BITBUFFER_H_ - -#include <stdint.h> - -class cBitBuffer -{ -private: - uint8_t * mData; - uint32_t mMaxLength; - uint32_t mBitPos; -public: - cBitBuffer(uint32_t MaxLength); - ~cBitBuffer(void); - uint8_t * GetData(void); - uint32_t GetMaxLength(void); - uint32_t GetBits(int NumBits); - void SetBits(int NumBits, uint32_t Data); - uint32_t GetByteLength(void); - void SetDataByte(uint32_t Position, uint8_t Data); -}; - -#endif diff --git a/PLUGINS/src/dvbhddevice/dvbhddevice.c b/PLUGINS/src/dvbhddevice/dvbhddevice.c index 0ad1698..a1e5881 100644 --- a/PLUGINS/src/dvbhddevice/dvbhddevice.c +++ b/PLUGINS/src/dvbhddevice/dvbhddevice.c @@ -3,29 +3,37 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbhddevice.c 1.14 2011/08/27 09:31:45 kls Exp $ + * $Id: dvbhddevice.c 1.16 2012/02/08 15:10:30 kls Exp $ */ #include <vdr/plugin.h> +#include <vdr/shutdown.h> #include "dvbhdffdevice.h" +#include "menu.h" #include "setup.h" static const char *VERSION = "0.0.4"; static const char *DESCRIPTION = trNOOP("HD Full Featured DVB device"); +static const char *MAINMENUENTRY = "dvbhddevice"; class cPluginDvbhddevice : public cPlugin { private: cDvbHdFfDeviceProbe *probe; + bool mIsUserInactive; public: cPluginDvbhddevice(void); virtual ~cPluginDvbhddevice(); virtual const char *Version(void) { return VERSION; } virtual const char *Description(void) { return tr(DESCRIPTION); } + virtual void MainThreadHook(void); + virtual const char *MainMenuEntry(void); + virtual cOsdObject *MainMenuAction(void); virtual cMenuSetupPage *SetupMenu(void); virtual bool SetupParse(const char *Name, const char *Value); }; cPluginDvbhddevice::cPluginDvbhddevice(void) +: mIsUserInactive(true) { probe = new cDvbHdFfDeviceProbe; } @@ -35,6 +43,33 @@ cPluginDvbhddevice::~cPluginDvbhddevice() delete probe; } +void cPluginDvbhddevice::MainThreadHook(void) +{ + bool isUserInactive = ShutdownHandler.IsUserInactive(); + if (isUserInactive != mIsUserInactive) + { + mIsUserInactive = isUserInactive; + if (gHdffSetup.CecEnabled && gHdffSetup.CecTvOn) + { + HDFF::cHdffCmdIf * hdffCmdIf = cDvbHdFfDevice::GetHdffCmdHandler(); + if (!mIsUserInactive) + { + hdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON); + } + } + } +} + +const char *cPluginDvbhddevice::MainMenuEntry(void) +{ + return gHdffSetup.HideMainMenu ? NULL : MAINMENUENTRY; +} + +cOsdObject *cPluginDvbhddevice::MainMenuAction(void) +{ + return new cHdffMenu(cDvbHdFfDevice::GetHdffCmdHandler()); +} + cMenuSetupPage *cPluginDvbhddevice::SetupMenu(void) { return new cHdffSetupPage(cDvbHdFfDevice::GetHdffCmdHandler()); diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c index 101558d..160d9c3 100644 --- a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c +++ b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c @@ -3,9 +3,11 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbhdffdevice.c 1.35 2011/12/04 15:30:42 kls Exp $ + * $Id: dvbhdffdevice.c 1.39 2012/02/15 13:14:49 kls Exp $ */ +#include <stdint.h> + #include "dvbhdffdevice.h" #include <errno.h> #include <limits.h> @@ -50,30 +52,34 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapter, int Frontend) mHdffCmdIf->CmdAvSetAudioDownmix((HdffAudioDownmixMode_t) gHdffSetup.AudioDownmix); mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) gHdffSetup.AnalogueVideo); mHdffCmdIf->CmdHdmiSetVideoMode(gHdffSetup.GetVideoMode()); + HdffHdmiConfig_t hdmiConfig; + memset(&hdmiConfig, 0, sizeof(hdmiConfig)); hdmiConfig.TransmitAudio = true; hdmiConfig.ForceDviMode = false; hdmiConfig.CecEnabled = gHdffSetup.CecEnabled; + strcpy(hdmiConfig.CecDeviceName, "VDR"); hdmiConfig.VideoModeAdaption = (HdffVideoModeAdaption_t) gHdffSetup.VideoModeAdaption; mHdffCmdIf->CmdHdmiConfigure(&hdmiConfig); - if (gHdffSetup.CecEnabled) - mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON); + mHdffCmdIf->CmdRemoteSetProtocol((HdffRemoteProtocol_t) gHdffSetup.RemoteProtocol); mHdffCmdIf->CmdRemoteSetAddressFilter(gHdffSetup.RemoteAddress >= 0, gHdffSetup.RemoteAddress); } - - // Video format: - - SetVideoFormat(Setup.VideoFormat); } cDvbHdFfDevice::~cDvbHdFfDevice() { - delete spuDecoder; - if (isHdffPrimary) - delete mHdffCmdIf; - // We're not explicitly closing any device files here, since this sometimes - // caused segfaults. Besides, the program is about to terminate anyway... + delete spuDecoder; + if (isHdffPrimary) + { + if (gHdffSetup.CecEnabled && gHdffSetup.CecTvOff) + { + mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_OFF); + } + delete mHdffCmdIf; + } + // We're not explicitly closing any device files here, since this sometimes + // caused segfaults. Besides, the program is about to terminate anyway... } void cDvbHdFfDevice::MakePrimaryDevice(bool On) diff --git a/PLUGINS/src/dvbhddevice/hdffcmd.c b/PLUGINS/src/dvbhddevice/hdffcmd.c index 957f2c7..cb06b8c 100644 --- a/PLUGINS/src/dvbhddevice/hdffcmd.c +++ b/PLUGINS/src/dvbhddevice/hdffcmd.c @@ -3,9 +3,11 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hdffcmd.c 1.22 2011/12/04 15:31:03 kls Exp $ + * $Id: hdffcmd.c 1.23 2012/02/06 11:08:48 kls Exp $ */ +#include <stdint.h> + #include "hdffcmd.h" #include "libhdffcmd/hdffcmd.h" #include <stdio.h> diff --git a/PLUGINS/src/dvbhddevice/hdffcmd.h b/PLUGINS/src/dvbhddevice/hdffcmd.h index 142f65f..c4f5104 100644 --- a/PLUGINS/src/dvbhddevice/hdffcmd.h +++ b/PLUGINS/src/dvbhddevice/hdffcmd.h @@ -3,13 +3,12 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hdffcmd.h 1.18 2011/12/04 15:31:23 kls Exp $ + * $Id: hdffcmd.h 1.19 2012/02/06 11:09:27 kls Exp $ */ #ifndef _HDFF_CMD_H_ #define _HDFF_CMD_H_ -#include "bitbuffer.h" #include "libhdffcmd/hdffcmd.h" namespace HDFF diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile b/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile index f9c068a..8b25f66 100644 --- a/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile +++ b/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile @@ -4,17 +4,9 @@ VERSION = 0.1.0 -ifndef $(INSTALL_PATH) - INSTALL_PATH=/usr/local -endif - -ifndef $(INSTALL_LIB_PATH) - INSTALL_LIB_PATH=$(INSTALL_PATH)/lib -endif - -ifndef $(INSTALL_INCLUDE_PATH) - INSTALL_INCLUDE_PATH=$(INSTALL_PATH)/include -endif +INSTALL_PATH ?= /usr/local +INSTALL_LIB_PATH ?= $(INSTALL_PATH)/lib +INSTALL_INCLUDE_PATH ?= $(INSTALL_PATH)/include LIB_NAME = libhdffcmd @@ -27,9 +19,10 @@ LIB_HEADERS = hdffcmd.h hdffcmd_av.h hdffcmd_generic.h hdffcmd_hdmi.h \ LIB_STATIC = $(LIB_NAME).a LIB_SHARED = $(LIB_NAME)-$(VERSION).so -CC = gcc -CFLAGS = -g -O2 -fPIC -Wall -AR = ar -r +CC ?= gcc +CFLAGS ?= -g -O2 -fPIC -Wall +AR ?= ar +ARFLAGS ?= r ### Implicit rules: @@ -50,10 +43,10 @@ $(DEPFILE): Makefile all: $(LIB_STATIC) $(LIB_SHARED) $(LIB_STATIC): $(LIB_OBJS) - $(AR) $(LIB_STATIC) $(LIB_OBJS) + $(AR) $(ARFLAGS) $(LIB_STATIC) $(LIB_OBJS) $(LIB_SHARED): $(LIB_OBJS) - $(CC) -fPIC -shared -o $(LIB_SHARED) $(LIB_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $(LIB_SHARED) $(LIB_OBJS) ln -sf $(LIB_SHARED) $(LIB_NAME).so clean: diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h index 7c2189b..0e77c79 100644 --- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h +++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h @@ -66,7 +66,8 @@ typedef enum HdffVideoConversion_t HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9, HDFF_VIDEO_CONVERSION_PILLARBOX, HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT, - HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9 + HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9, + HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9 } HdffVideoConversion_t; typedef struct HdffVideoFormat_t diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h index 8b24d7b..f68da66 100644 --- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h +++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h @@ -111,6 +111,7 @@ typedef enum HdffMessageId_t HDFF_MSG_HDMI_GET_DISPLAY_INFO, HDFF_MSG_HDMI_GET_VIDEO_MODE, HDFF_MSG_HDMI_SEND_CEC_COMMAND, + HDFF_MSG_HDMI_SEND_RAW_CEC_COMMAND, HDFF_MSG_REMOTE_SET_PROTOCOL = 0, HDFF_MSG_REMOTE_SET_ADDRESS_FILTER, diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.c b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.c index 42b82b5..de315f8 100644 --- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.c +++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.c @@ -48,9 +48,11 @@ int HdffCmdHdmiSetVideoMode(int OsdDevice, HdffVideoMode_t VideoMode) int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config) { - uint8_t cmdData[8]; + uint8_t cmdData[24]; BitBuffer_t cmdBuf; osd_raw_cmd_t osd_cmd; + size_t nameLen; + int i; BitBuffer_Init(&cmdBuf, cmdData, sizeof(cmdData)); memset(&osd_cmd, 0, sizeof(osd_raw_cmd_t)); @@ -61,6 +63,14 @@ int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config) BitBuffer_SetBits(&cmdBuf, 1, Config->ForceDviMode ? 1 : 0); BitBuffer_SetBits(&cmdBuf, 1, Config->CecEnabled ? 1 : 0); BitBuffer_SetBits(&cmdBuf, 3, Config->VideoModeAdaption); + BitBuffer_SetBits(&cmdBuf, 6, 0); // reserved + nameLen = strlen(Config->CecDeviceName); + if (nameLen > 13) + nameLen = 13; + BitBuffer_SetBits(&cmdBuf, 4, nameLen); + for (i = 0; i < nameLen; i++) + BitBuffer_SetBits(&cmdBuf, 8, Config->CecDeviceName[i]); + osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf); return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd); } @@ -80,3 +90,31 @@ int HdffCmdHdmiSendCecCommand(int OsdDevice, HdffCecCommand_t Command) osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf); return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd); } + +int HdffCmdHdmiSendRawCecCommand(int OsdDevice, uint8_t Destination, + uint8_t Opcode, const uint8_t * Operand, + uint8_t OperandLength) +{ + uint8_t cmdData[24]; + BitBuffer_t cmdBuf; + osd_raw_cmd_t osd_cmd; + int i; + + if (OperandLength > 14) + OperandLength = 14; + + BitBuffer_Init(&cmdBuf, cmdData, sizeof(cmdData)); + memset(&osd_cmd, 0, sizeof(osd_raw_cmd_t)); + osd_cmd.cmd_data = cmdData; + HdffCmdBuildHeader(&cmdBuf, HDFF_MSG_TYPE_COMMAND, HDFF_MSG_GROUP_HDMI, + HDFF_MSG_HDMI_SEND_RAW_CEC_COMMAND); + BitBuffer_SetBits(&cmdBuf, 4, 0); // reserved + BitBuffer_SetBits(&cmdBuf, 4, Destination); + BitBuffer_SetBits(&cmdBuf, 8, Opcode); + BitBuffer_SetBits(&cmdBuf, 8, OperandLength); + for (i = 0; i < OperandLength; i++) + BitBuffer_SetBits(&cmdBuf, 8, Operand[i]); + + osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf); + return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd); +} diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.h b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.h index 16e375f..fc79bd9 100644 --- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.h +++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_hdmi.h @@ -47,14 +47,15 @@ typedef struct HdffHdmiConfig_t int ForceDviMode; int CecEnabled; HdffVideoModeAdaption_t VideoModeAdaption; + char CecDeviceName[14]; } HdffHdmiConfig_t; typedef enum HdffCecCommand_t { HDFF_CEC_COMMAND_TV_ON, HDFF_CEC_COMMAND_TV_OFF, - HDFF_CEC_COMMAND_TV_ACTIVE_SOURCE, - HDFF_CEC_COMMAND_TV_INACTIVE_SOURCE + HDFF_CEC_COMMAND_ACTIVE_SOURCE, + HDFF_CEC_COMMAND_INACTIVE_SOURCE } HdffCecCommand_t; @@ -64,4 +65,8 @@ int HdffCmdHdmiConfigure(int OsdDevice, const HdffHdmiConfig_t * Config); int HdffCmdHdmiSendCecCommand(int OsdDevice, HdffCecCommand_t Command); +int HdffCmdHdmiSendRawCecCommand(int OsdDevice, uint8_t Destination, + uint8_t Opcode, const uint8_t * Operand, + uint8_t OperandLength); + #endif /* HDFFCMD_HDMI_H */ diff --git a/PLUGINS/src/dvbhddevice/menu.c b/PLUGINS/src/dvbhddevice/menu.c new file mode 100644 index 0000000..e8fd867 --- /dev/null +++ b/PLUGINS/src/dvbhddevice/menu.c @@ -0,0 +1,65 @@ +/* + * menu.c: The DVB HD Full Featured device main menu + * + * See the README file for copyright information and how to reach the author. + */ + +#include "menu.h" +#include "setup.h" + +cHdffMenu::cHdffMenu(HDFF::cHdffCmdIf * pHdffCmdIf) +: cOsdMenu("dvbhddevice"), + mHdffCmdIf(pHdffCmdIf) +{ + mVideoConversionItem = new cOsdItem("", osUnknown, false); + Add(mVideoConversionItem); + SetHelp(tr("Video Conversion"), tr("TV on")); + SetVideoConversion(); +} + +cHdffMenu::~cHdffMenu() +{ +} + +eOSState cHdffMenu::ProcessKey(eKeys key) +{ + eOSState state = cOsdMenu::ProcessKey(key); + if (state == osUnknown) + { + switch (key) + { + case kRed: + gHdffSetup.SetNextVideoConversion(); + SetVideoConversion(); + break; + + case kGreen: + mHdffCmdIf->CmdHdmiSendCecCommand(HDFF_CEC_COMMAND_TV_ON); + state = osEnd; + break; + + case kOk: + state = osEnd; + break; + + default: + break; + } + } + return state; +} + +void cHdffMenu::SetVideoConversion(void) +{ + HdffVideoFormat_t videoFormat; + videoFormat.AutomaticEnabled = true; + videoFormat.AfdEnabled = false; + videoFormat.TvFormat = (HdffTvFormat_t) gHdffSetup.TvFormat; + videoFormat.VideoConversion = (HdffVideoConversion_t) gHdffSetup.VideoConversion; + mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat); + + char str[128]; + sprintf(str, "%s: %s", tr("Video Conversion"), gHdffSetup.GetVideoConversionString()); + mVideoConversionItem->SetText(str); + Display(); +} diff --git a/PLUGINS/src/dvbhddevice/menu.h b/PLUGINS/src/dvbhddevice/menu.h new file mode 100644 index 0000000..18b3d99 --- /dev/null +++ b/PLUGINS/src/dvbhddevice/menu.h @@ -0,0 +1,29 @@ +/* + * menu.h: The DVB HD Full Featured device main menu + * + * See the README file for copyright information and how to reach the author. + */ + +#ifndef _HDFF_MENU_H_ +#define _HDFF_MENU_H_ + +#include <vdr/osd.h> +#include <vdr/plugin.h> + +#include "hdffcmd.h" + +class cHdffMenu : public cOsdMenu +{ +private: + HDFF::cHdffCmdIf * mHdffCmdIf; + + cOsdItem * mVideoConversionItem; + + void SetVideoConversion(void); +public: + cHdffMenu(HDFF::cHdffCmdIf * pHdffCmdIf); + virtual ~cHdffMenu(); + virtual eOSState ProcessKey(eKeys Key); +}; + +#endif diff --git a/PLUGINS/src/dvbhddevice/po/de_DE.po b/PLUGINS/src/dvbhddevice/po/de_DE.po index 78ace1b..ac58c0c 100644 --- a/PLUGINS/src/dvbhddevice/po/de_DE.po +++ b/PLUGINS/src/dvbhddevice/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR \n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2011-08-21 14:02+0200\n" +"POT-Creation-Date: 2012-02-07 20:13+0100\n" "PO-Revision-Date: 2011-04-25 21:44+0200\n" "Last-Translator: Christoph Haubrich\n" "Language-Team: <see README>\n" @@ -19,17 +19,11 @@ msgstr "" msgid "HD Full Featured DVB device" msgstr "HD Full Featured DVB device" -msgid "Off" -msgstr "aus" - -msgid "Frame rate" -msgstr "passende Framerate" - -msgid "HD Only" -msgstr "nur bei HD" +msgid "Video Conversion" +msgstr "Bildanpassung" -msgid "Always" -msgstr "immer" +msgid "TV on" +msgstr "TV ein" msgid "Automatic" msgstr "automatisch" @@ -49,11 +43,26 @@ msgstr "CentreCutOut" msgid "Always 16/9" msgstr "immer 16:9" +msgid "Zoom 16/9" +msgstr "Zoome 16:9" + +msgid "Off" +msgstr "aus" + +msgid "Frame rate" +msgstr "passende Framerate" + +msgid "HD Only" +msgstr "nur bei HD" + +msgid "Always" +msgstr "immer" + msgid "Disabled" msgstr "abgeschaltet" msgid "Analogue only" -msgstr "nur Analoge Ausgänge" +msgstr "nur analoge Ausgänge" msgid "HDMI only" msgstr "nur HDMI" @@ -73,9 +82,6 @@ msgstr "Auflösungsanpassung" msgid "TV format" msgstr "TV-Format" -msgid "Video Conversion" -msgstr "Videokonvertierung" - msgid "Analogue Video" msgstr "Analoges Video" @@ -91,6 +97,12 @@ msgstr "OSD Größe" msgid "HDMI CEC" msgstr "HDMI CEC" +msgid "CEC: Switch TV on" +msgstr "CEC: TV einschalten" + +msgid "CEC: Switch TV off" +msgstr "CEC: TV ausschalten" + msgid "Remote Control Protocol" msgstr "Fernbedienungsprotokoll" @@ -102,3 +114,6 @@ msgstr "High Level OSD" msgid "Allow True Color OSD" msgstr "Erlaube True Color OSD" + +msgid "Hide mainmenu entry" +msgstr "Hauptmenüeintrag verstecken" diff --git a/PLUGINS/src/dvbhddevice/po/fi_FI.po b/PLUGINS/src/dvbhddevice/po/fi_FI.po index 48abaf5..c8980ba 100644 --- a/PLUGINS/src/dvbhddevice/po/fi_FI.po +++ b/PLUGINS/src/dvbhddevice/po/fi_FI.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR \n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2011-08-21 14:02+0200\n" +"POT-Creation-Date: 2012-02-07 20:13+0100\n" "PO-Revision-Date: 2011-04-25 21:44+0200\n" "Last-Translator: Rolf Ahrenberg\n" "Language-Team: Finnish <vdr@linuxtv.org>\n" @@ -19,17 +19,11 @@ msgstr "" msgid "HD Full Featured DVB device" msgstr "DVB-laite HD-ulostulolla" -msgid "Off" -msgstr "ei" - -msgid "Frame rate" -msgstr "kuvataajuuden mukaan" - -msgid "HD Only" -msgstr "vain HD-resoluutiolla" +msgid "Video Conversion" +msgstr "Näyttömuoto" -msgid "Always" -msgstr "aina" +msgid "TV on" +msgstr "" msgid "Automatic" msgstr "automaattinen" @@ -49,6 +43,21 @@ msgstr "center cut out" msgid "Always 16/9" msgstr "aina 16:9" +msgid "Zoom 16/9" +msgstr "" + +msgid "Off" +msgstr "ei" + +msgid "Frame rate" +msgstr "kuvataajuuden mukaan" + +msgid "HD Only" +msgstr "vain HD-resoluutiolla" + +msgid "Always" +msgstr "aina" + msgid "Disabled" msgstr "ei käytössä" @@ -73,9 +82,6 @@ msgstr "Sovita näyttömoodi" msgid "TV format" msgstr "Näytön kuvasuhde" -msgid "Video Conversion" -msgstr "Näyttömuoto" - msgid "Analogue Video" msgstr "Analoginen kuvalähtö" @@ -91,6 +97,12 @@ msgstr "Kuvaruutunäytön koko" msgid "HDMI CEC" msgstr "Käytä HDMI CEC-toimintoa" +msgid "CEC: Switch TV on" +msgstr "" + +msgid "CEC: Switch TV off" +msgstr "" + msgid "Remote Control Protocol" msgstr "Kaukosäätimen protokolla" @@ -102,3 +114,6 @@ msgstr "Käytä korkean tason kuvaruutunäyttöä" msgid "Allow True Color OSD" msgstr "Salli tosivärit kuvaruutunäytölle" + +msgid "Hide mainmenu entry" +msgstr "" diff --git a/PLUGINS/src/dvbhddevice/po/it_IT.po b/PLUGINS/src/dvbhddevice/po/it_IT.po index bafb2c5..def0389 100644 --- a/PLUGINS/src/dvbhddevice/po/it_IT.po +++ b/PLUGINS/src/dvbhddevice/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2011-08-21 14:02+0200\n" +"POT-Creation-Date: 2012-02-07 20:13+0100\n" "PO-Revision-Date: 2011-07-10 00:23+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: <see README>\n" @@ -22,18 +22,12 @@ msgstr "" msgid "HD Full Featured DVB device" msgstr "" -msgid "Off" -msgstr "" - -msgid "Frame rate" -msgstr "" +msgid "Video Conversion" +msgstr "Conversione video" -msgid "HD Only" +msgid "TV on" msgstr "" -msgid "Always" -msgstr "Sempre" - msgid "Automatic" msgstr "Automatica" @@ -52,6 +46,21 @@ msgstr "CentreCutOut" msgid "Always 16/9" msgstr "Sempre 16:9" +msgid "Zoom 16/9" +msgstr "" + +msgid "Off" +msgstr "" + +msgid "Frame rate" +msgstr "" + +msgid "HD Only" +msgstr "" + +msgid "Always" +msgstr "Sempre" + msgid "Disabled" msgstr "Disabilitata" @@ -76,9 +85,6 @@ msgstr "" msgid "TV format" msgstr "Formato TV" -msgid "Video Conversion" -msgstr "Conversione video" - msgid "Analogue Video" msgstr "Video analogico" @@ -94,6 +100,12 @@ msgstr "Dimensione OSD" msgid "HDMI CEC" msgstr "HDMI CEC" +msgid "CEC: Switch TV on" +msgstr "" + +msgid "CEC: Switch TV off" +msgstr "" + msgid "Remote Control Protocol" msgstr "Protocollo controllo remoto" @@ -105,3 +117,6 @@ msgstr "OSD alto livello" msgid "Allow True Color OSD" msgstr "Permetti OSD True Color" + +msgid "Hide mainmenu entry" +msgstr "" diff --git a/PLUGINS/src/dvbhddevice/setup.c b/PLUGINS/src/dvbhddevice/setup.c index cb476a8..b6525a0 100644 --- a/PLUGINS/src/dvbhddevice/setup.c +++ b/PLUGINS/src/dvbhddevice/setup.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: setup.c 1.14 2011/12/04 15:31:58 kls Exp $ + * $Id: setup.c 1.17 2012/02/08 15:14:01 kls Exp $ */ #include "setup.h" @@ -28,10 +28,13 @@ cHdffSetup::cHdffSetup(void) AudioDownmix = HDFF_AUDIO_DOWNMIX_AUTOMATIC; OsdSize = 0; CecEnabled = 1; + CecTvOn = 1; + CecTvOff = 0; RemoteProtocol = 1; RemoteAddress = -1; HighLevelOsd = 1; TrueColorOsd = 1; + HideMainMenu = 0; } bool cHdffSetup::SetupParse(const char *Name, const char *Value) @@ -45,10 +48,13 @@ bool cHdffSetup::SetupParse(const char *Name, const char *Value) else if (strcmp(Name, "AudioDownmix") == 0) AudioDownmix = atoi(Value); else if (strcmp(Name, "OsdSize") == 0) OsdSize = atoi(Value); else if (strcmp(Name, "CecEnabled") == 0) CecEnabled = atoi(Value); + else if (strcmp(Name, "CecTvOn") == 0) CecTvOn = atoi(Value); + else if (strcmp(Name, "CecTvOff") == 0) CecTvOff = atoi(Value); else if (strcmp(Name, "RemoteProtocol") == 0) RemoteProtocol = atoi(Value); else if (strcmp(Name, "RemoteAddress") == 0) RemoteAddress = atoi(Value); else if (strcmp(Name, "HighLevelOsd") == 0) HighLevelOsd = atoi(Value); else if (strcmp(Name, "TrueColorOsd") == 0) TrueColorOsd = atoi(Value); + else if (strcmp(Name, "HideMainMenu") == 0) HideMainMenu = atoi(Value); else return false; return true; } @@ -112,12 +118,74 @@ HdffVideoMode_t cHdffSetup::GetVideoMode(void) } } +void cHdffSetup::SetNextVideoConversion(void) +{ + int nextVideoConversion = HDFF_VIDEO_CONVERSION_AUTOMATIC; + + if (TvFormat == HDFF_TV_FORMAT_16_BY_9) + { + switch (VideoConversion) + { + case HDFF_VIDEO_CONVERSION_PILLARBOX: + nextVideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT; + break; + case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT: + nextVideoConversion = HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9; + break; + case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9: + nextVideoConversion = HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9; + break; + case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9: + nextVideoConversion = HDFF_VIDEO_CONVERSION_PILLARBOX; + break; + } + } + else + { + switch (VideoConversion) + { + case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9: + nextVideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9; + break; + case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9: + nextVideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT; + break; + case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT: + nextVideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9; + break; + } + } + VideoConversion = nextVideoConversion; +} + +const char * cHdffSetup::GetVideoConversionString(void) +{ + switch (VideoConversion) + { + case HDFF_VIDEO_CONVERSION_AUTOMATIC: + default: + return tr("Automatic"); + case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9: + return tr("Letterbox 16/9"); + case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9: + return tr("Letterbox 14/9"); + case HDFF_VIDEO_CONVERSION_PILLARBOX: + return tr("Pillarbox"); + case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT: + return tr("CentreCutOut"); + case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9: + return tr("Always 16/9"); + case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9: + return tr("Zoom 16/9"); + } +} + + cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf) { const int kResolutions = 4; const int kVideoModeAdaptions = 4; const int kTvFormats = 2; - const int kVideoConversions = 6; const int kAnalogueVideos = 4; const int kAudioDownmixes = 5; const int kOsdSizes = 5; @@ -145,17 +213,6 @@ cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf) "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"), @@ -194,25 +251,133 @@ cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf) Add(new cMenuEditStraItem(tr("Resolution"), &mNewHdffSetup.Resolution, kResolutions, ResolutionItems)); Add(new cMenuEditStraItem(tr("Video Mode Adaption"), &mNewHdffSetup.VideoModeAdaption, kVideoModeAdaptions, VideoModeAdaptionItems)); - Add(new cMenuEditStraItem(tr("TV format"), &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems)); - Add(new cMenuEditStraItem(tr("Video Conversion"), &mNewHdffSetup.VideoConversion, kVideoConversions, VideoConversionItems)); + mTvFormatItem = new cMenuEditStraItem(tr("TV format"), &mNewHdffSetup.TvFormat, kTvFormats, TvFormatItems); + Add(mTvFormatItem); 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 cMenuEditBoolItem(tr("CEC: Switch TV on"), &mNewHdffSetup.CecTvOn)); + Add(new cMenuEditBoolItem(tr("CEC: Switch TV off"), &mNewHdffSetup.CecTvOff)); 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)); + Add(new cMenuEditBoolItem(tr("Hide mainmenu entry"), &mNewHdffSetup.HideMainMenu)); + + mVideoConversion = 0; + if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9) + { + switch (mNewHdffSetup.VideoConversion) + { + case HDFF_VIDEO_CONVERSION_PILLARBOX: + mVideoConversion = 0; + break; + case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT: + mVideoConversion = 1; + break; + case HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9: + mVideoConversion = 2; + break; + case HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9: + mVideoConversion = 3; + break; + } + } + else + { + switch (mNewHdffSetup.VideoConversion) + { + case HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9: + mVideoConversion = 0; + break; + case HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9: + mVideoConversion = 1; + break; + case HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT: + mVideoConversion = 2; + break; + } + } + BuildVideoConversionItem(); } cHdffSetupPage::~cHdffSetupPage(void) { } +void cHdffSetupPage::BuildVideoConversionItem(void) +{ + const int kVideoConversions4by3 = 3; + const int kVideoConversions16by9 = 4; + + static const char * VideoConversionItems4by3[kVideoConversions4by3] = + { + tr("Letterbox 16/9"), + tr("Letterbox 14/9"), + tr("CentreCutOut") + }; + + static const char * VideoConversionItems16by9[kVideoConversions16by9] = + { + tr("Pillarbox"), + tr("CentreCutOut"), + tr("Always 16/9"), + tr("Zoom 16/9") + }; + + cOsdItem * item; + + cList<cOsdItem>::Del(mTvFormatItem->Next()); + if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9) + { + item = new cMenuEditStraItem(tr("Video Conversion"), &mVideoConversion, + kVideoConversions16by9, VideoConversionItems16by9); + } + else + { + item = new cMenuEditStraItem(tr("Video Conversion"), &mVideoConversion, + kVideoConversions4by3, VideoConversionItems4by3); + } + Add(item, false, mTvFormatItem); +} + void cHdffSetupPage::Store(void) { + if (mNewHdffSetup.TvFormat == HDFF_TV_FORMAT_16_BY_9) + { + switch (mVideoConversion) + { + case 0: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_PILLARBOX; + break; + case 1: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT; + break; + case 2: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_ALWAYS_16_BY_9; + break; + case 3: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_ZOOM_16_BY_9; + break; + } + } + else + { + switch (mVideoConversion) + { + case 0: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9; + break; + case 1: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_LETTERBOX_14_BY_9; + break; + case 2: + mNewHdffSetup.VideoConversion = HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT; + break; + } + } SetupStore("Resolution", mNewHdffSetup.Resolution); SetupStore("VideoModeAdaption", mNewHdffSetup.VideoModeAdaption); SetupStore("TvFormat", mNewHdffSetup.TvFormat); @@ -222,10 +387,13 @@ void cHdffSetupPage::Store(void) SetupStore("AudioDownmix", mNewHdffSetup.AudioDownmix); SetupStore("OsdSize", mNewHdffSetup.OsdSize); SetupStore("CecEnabled", mNewHdffSetup.CecEnabled); + SetupStore("CecTvOn", mNewHdffSetup.CecTvOn); + SetupStore("CecTvOff", mNewHdffSetup.CecTvOff); SetupStore("RemoteProtocol", mNewHdffSetup.RemoteProtocol); SetupStore("RemoteAddress", mNewHdffSetup.RemoteAddress); SetupStore("HighLevelOsd", mNewHdffSetup.HighLevelOsd); SetupStore("TrueColorOsd", mNewHdffSetup.TrueColorOsd); + SetupStore("HideMainMenu", mNewHdffSetup.HideMainMenu); if (mHdffCmdIf) { @@ -237,7 +405,7 @@ void cHdffSetupPage::Store(void) HdffHdmiConfig_t hdmiConfig; videoFormat.AutomaticEnabled = true; - videoFormat.AfdEnabled = true; + videoFormat.AfdEnabled = false; videoFormat.TvFormat = (HdffTvFormat_t) mNewHdffSetup.TvFormat; videoFormat.VideoConversion = (HdffVideoConversion_t) mNewHdffSetup.VideoConversion; mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat); @@ -247,6 +415,7 @@ void cHdffSetupPage::Store(void) mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) mNewHdffSetup.AnalogueVideo); + memset(&hdmiConfig, 0, sizeof(hdmiConfig)); hdmiConfig.TransmitAudio = true; hdmiConfig.ForceDviMode = false; hdmiConfig.CecEnabled = mNewHdffSetup.CecEnabled; @@ -259,3 +428,29 @@ void cHdffSetupPage::Store(void) gHdffSetup = mNewHdffSetup; } + +eOSState cHdffSetupPage::ProcessKey(eKeys key) +{ + eOSState state = cMenuSetupPage::ProcessKey(key); + + if (state == osContinue) + { + cOsdItem * item; + switch (key) + { + case kLeft: + case kRight: + item = Get(Current()); + if (item == mTvFormatItem) + { + mVideoConversion = 0; + BuildVideoConversionItem(); + Display(); + } + break; + default: + break; + } + } + return state; +} diff --git a/PLUGINS/src/dvbhddevice/setup.h b/PLUGINS/src/dvbhddevice/setup.h index 964105e..64033e1 100644 --- a/PLUGINS/src/dvbhddevice/setup.h +++ b/PLUGINS/src/dvbhddevice/setup.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: setup.h 1.10 2011/12/04 15:32:13 kls Exp $ + * $Id: setup.h 1.12 2012/02/08 15:14:56 kls Exp $ */ #ifndef _HDFF_SETUP_H_ @@ -18,6 +18,8 @@ struct cHdffSetup bool SetupParse(const char * Name, const char * Value); void GetOsdSize(int &Width, int &Height, double &PixelAspect); HdffVideoMode_t GetVideoMode(void); + void SetNextVideoConversion(void); + const char * GetVideoConversionString(void); int Resolution; int VideoModeAdaption; @@ -28,11 +30,15 @@ struct cHdffSetup int AudioDownmix; int OsdSize; int CecEnabled; + int CecTvOn; + int CecTvOff; int RemoteProtocol; int RemoteAddress; int HighLevelOsd; int TrueColorOsd; + + int HideMainMenu; }; extern cHdffSetup gHdffSetup; @@ -42,6 +48,10 @@ class cHdffSetupPage : public cMenuSetupPage private: HDFF::cHdffCmdIf * mHdffCmdIf; cHdffSetup mNewHdffSetup; + cOsdItem * mTvFormatItem; + int mVideoConversion; + + void BuildVideoConversionItem(void); protected: virtual void Store(void); @@ -49,6 +59,7 @@ protected: public: cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf); virtual ~cHdffSetupPage(void); + virtual eOSState ProcessKey(eKeys Key); }; #endif diff --git a/PLUGINS/src/dvbsddevice/Makefile b/PLUGINS/src/dvbsddevice/Makefile index 5529976..bf5f717 100644 --- a/PLUGINS/src/dvbsddevice/Makefile +++ b/PLUGINS/src/dvbsddevice/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.7 2011/05/21 12:25:37 kls Exp $ +# $Id: Makefile 1.8 2012/01/18 12:28:43 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c index 17f842b..cc6af33 100644 --- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c +++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbsdffdevice.c 2.30 2011/08/27 11:33:57 kls Exp $ + * $Id: dvbsdffdevice.c 2.31 2012/02/15 13:15:05 kls Exp $ */ #include "dvbsdffdevice.h" @@ -66,10 +66,6 @@ cDvbSdFfDevice::cDvbSdFfDevice(int Adapter, int Frontend, bool OutputOnly) fclose(f); } devVideoIndex = devVideoOffset >= 0 ? devVideoOffset++ : -1; - - // Video format: - - SetVideoFormat(Setup.VideoFormat); } cDvbSdFfDevice::~cDvbSdFfDevice() diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index b59d08a..b1a5af1 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:41 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:29:09 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile index d93d802..d192b4a 100644 --- a/PLUGINS/src/osddemo/Makefile +++ b/PLUGINS/src/osddemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:01 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY index 4f880c6..c85c1a2 100644 --- a/PLUGINS/src/pictures/HISTORY +++ b/PLUGINS/src/pictures/HISTORY @@ -63,3 +63,7 @@ VDR Plugin 'pictures' Revision History 2012-01-08: - Added option -o to pic2mpg. + +2012-02-17: + +- cReadDir::Next() now skips directory entries "." and "..". diff --git a/PLUGINS/src/pictures/Makefile b/PLUGINS/src/pictures/Makefile index 456207b..112586b 100644 --- a/PLUGINS/src/pictures/Makefile +++ b/PLUGINS/src/pictures/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:45 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:30:05 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/pictures/entry.c b/PLUGINS/src/pictures/entry.c index 1438481..8c124b5 100644 --- a/PLUGINS/src/pictures/entry.c +++ b/PLUGINS/src/pictures/entry.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: entry.c 2.0 2008/02/17 13:42:34 kls Exp $ + * $Id: entry.c 2.1 2012/02/17 14:00:28 kls Exp $ */ #include "entry.h" @@ -48,13 +48,11 @@ void cPictureEntry::Load(void) const if (d.Ok()) { struct dirent *e; while ((e = d.Next()) != NULL) { - if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) { - struct stat ds; - if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) { - if (!entries) - entries = new cList<cPictureEntry>; - entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode))); - } + struct stat ds; + if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) { + if (!entries) + entries = new cList<cPictureEntry>; + entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode))); } } if (entries) diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c index 8a890b1..77fb421 100644 --- a/PLUGINS/src/pictures/pictures.c +++ b/PLUGINS/src/pictures/pictures.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: pictures.c 2.3 2011/02/20 16:50:01 kls Exp $ + * $Id: pictures.c 2.4 2012/02/17 14:00:48 kls Exp $ */ #include <getopt.h> @@ -11,7 +11,7 @@ #include "menu.h" #include "player.h" -static const char *VERSION = "0.1.0"; +static const char *VERSION = "0.1.1"; static const char *DESCRIPTION = trNOOP("A simple picture viewer"); static const char *MAINMENUENTRY = trNOOP("Pictures"); diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile index 2c8b17b..b2713ed 100644 --- a/PLUGINS/src/servicedemo/Makefile +++ b/PLUGINS/src/servicedemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:04 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -64,7 +64,7 @@ all: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/skincurses/Makefile b/PLUGINS/src/skincurses/Makefile index a765b65..62f5d25 100644 --- a/PLUGINS/src/skincurses/Makefile +++ b/PLUGINS/src/skincurses/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.7 2011/05/21 12:25:49 kls Exp $ +# $Id: Makefile 2.8 2012/01/18 12:30:52 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -22,9 +22,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile index f166981..3e9b170 100644 --- a/PLUGINS/src/status/Makefile +++ b/PLUGINS/src/status/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:08 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: @@ -62,7 +62,7 @@ all: libvdr-$(PLUGIN).so # Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile index 2c84920..1f640b8 100644 --- a/PLUGINS/src/svdrpdemo/Makefile +++ b/PLUGINS/src/svdrpdemo/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 2.3 2011/02/27 10:05:10 kls Exp $ +# $Id: Makefile 2.4 2012/01/18 12:17:23 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -20,9 +20,9 @@ CXXFLAGS ?= -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses ### The directory environment: -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp +VDRDIR ?= ../../.. +LIBDIR ?= ../../lib +TMPDIR ?= /tmp ### Make sure that necessary options are included: |