summaryrefslogtreecommitdiff
path: root/PLUGINS
diff options
context:
space:
mode:
Diffstat (limited to 'PLUGINS')
-rw-r--r--PLUGINS/src/dvbhddevice/dvbhdffdevice.c169
-rw-r--r--PLUGINS/src/dvbhddevice/dvbhdffdevice.h3
-rw-r--r--PLUGINS/src/dvbhddevice/hdffcmd.c7
-rw-r--r--PLUGINS/src/dvbhddevice/hdffcmd.h3
-rw-r--r--PLUGINS/src/dvbhddevice/hdffmsgdef.h313
-rw-r--r--PLUGINS/src/dvbhddevice/hdffosd.c4
-rw-r--r--PLUGINS/src/dvbhddevice/libhdffcmd/Makefile12
-rw-r--r--PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.c19
-rw-r--r--PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h2
-rw-r--r--PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h1
-rw-r--r--PLUGINS/src/dvbhddevice/po/de_DE.po5
-rw-r--r--PLUGINS/src/dvbhddevice/po/fi_FI.po5
-rw-r--r--PLUGINS/src/dvbhddevice/po/it_IT.po5
-rw-r--r--PLUGINS/src/dvbhddevice/setup.c7
-rw-r--r--PLUGINS/src/dvbhddevice/setup.h3
15 files changed, 168 insertions, 390 deletions
diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c
index f8b47bd..845fa6b 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.43 2012/05/08 11:40:32 kls Exp $
+ * $Id: dvbhdffdevice.c 1.46 2012/11/15 09:19:10 kls Exp $
*/
#include <stdint.h>
@@ -69,6 +69,7 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapter, int Frontend)
mHdffCmdIf->CmdAvSetAudioDelay(gHdffSetup.AudioDelay);
mHdffCmdIf->CmdAvSetAudioDownmix((HdffAudioDownmixMode_t) gHdffSetup.AudioDownmix);
+ mHdffCmdIf->CmdAvSetSyncShift(gHdffSetup.AvSyncShift);
mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) gHdffSetup.AnalogueVideo);
mHdffCmdIf->CmdHdmiSetVideoMode(gHdffSetup.GetVideoMode());
@@ -136,7 +137,7 @@ void cDvbHdFfDevice::SetVideoFormat(bool VideoFormat16_9)
{
HdffVideoFormat_t videoFormat;
videoFormat.AutomaticEnabled = true;
- videoFormat.AfdEnabled = true;
+ videoFormat.AfdEnabled = false;
videoFormat.TvFormat = (HdffTvFormat_t) gHdffSetup.TvFormat;
videoFormat.VideoConversion = (HdffVideoConversion_t) gHdffSetup.VideoConversion;
mHdffCmdIf->CmdAvSetVideoFormat(0, &videoFormat);
@@ -375,62 +376,86 @@ bool cDvbHdFfDevice::CanReplay(void) const
bool cDvbHdFfDevice::SetPlayMode(ePlayMode PlayMode)
{
- if (PlayMode == pmNone) {
- mHdffCmdIf->CmdAvSetVideoSpeed(0, 100);
- mHdffCmdIf->CmdAvSetAudioSpeed(0, 100);
-
- mHdffCmdIf->CmdAvEnableVideoAfterStop(0, false);
- mHdffCmdIf->CmdAvSetPcrPid(0, 0);
- mHdffCmdIf->CmdAvSetVideoPid(0, 0, HDFF_VIDEO_STREAM_MPEG1);
- mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_MPEG1);
+ if (PlayMode == pmNone) {
+ if (fd_video == -1)
+ fd_video = DvbOpen(DEV_DVB_VIDEO, adapter, frontend, O_RDWR | O_NONBLOCK);
+ if (fd_audio == -1)
+ fd_audio = DvbOpen(DEV_DVB_AUDIO, adapter, frontend, O_RDWR | O_NONBLOCK);
- ioctl(fd_video, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX);
- mHdffCmdIf->CmdAvSetDecoderInput(0, 0);
- mHdffCmdIf->CmdAvEnableSync(0, true);
- mHdffCmdIf->CmdAvSetPlayMode(0, true);
- }
- else {
- if (playMode == pmNone)
- TurnOffLiveMode(true);
+ mHdffCmdIf->CmdAvSetVideoSpeed(0, 100);
+ mHdffCmdIf->CmdAvSetAudioSpeed(0, 100);
- mHdffCmdIf->CmdAvSetPlayMode(1, Transferring() || (cTransferControl::ReceiverDevice() == this));
- mHdffCmdIf->CmdAvSetStc(0, 100000);
- mHdffCmdIf->CmdAvEnableSync(0, true);
- mHdffCmdIf->CmdAvEnableVideoAfterStop(0, true);
+ mHdffCmdIf->CmdAvEnableVideoAfterStop(0, false);
+ mHdffCmdIf->CmdAvSetPcrPid(0, 0);
+ mHdffCmdIf->CmdAvSetVideoPid(0, 0, HDFF_VIDEO_STREAM_MPEG1);
+ mHdffCmdIf->CmdAvSetAudioPid(0, 0, HDFF_AUDIO_STREAM_MPEG1);
- playVideoPid = -1;
- playAudioPid = -1;
- audioCounter = 0;
- videoCounter = 0;
- freezed = false;
- trickMode = false;
+ ioctl(fd_video, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX);
+ mHdffCmdIf->CmdAvSetDecoderInput(0, 0);
+ mHdffCmdIf->CmdAvEnableSync(0, true);
+ mHdffCmdIf->CmdAvSetPlayMode(0, true);
+ }
+ else {
+ if (playMode == pmNone)
+ TurnOffLiveMode(true);
- mHdffCmdIf->CmdAvSetDecoderInput(0, 2);
- ioctl(fd_video, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY);
- }
- playMode = PlayMode;
- return true;
+ if (PlayMode == pmExtern_THIS_SHOULD_BE_AVOIDED)
+ {
+ close(fd_video);
+ fd_video = -1;
+ close(fd_audio);
+ fd_audio = -1;
+ }
+ else
+ {
+ mHdffCmdIf->CmdAvSetPlayMode(1, Transferring() || (cTransferControl::ReceiverDevice() == this));
+ mHdffCmdIf->CmdAvSetStc(0, 100000);
+ mHdffCmdIf->CmdAvEnableSync(0, false);
+ mHdffCmdIf->CmdAvEnableVideoAfterStop(0, true);
+
+ playVideoPid = -1;
+ playAudioPid = -1;
+ audioCounter = 0;
+ videoCounter = 0;
+ freezed = false;
+ trickMode = false;
+ isPlayingVideo = false;
+
+ mHdffCmdIf->CmdAvSetDecoderInput(0, 2);
+ ioctl(fd_video, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY);
+ }
+ }
+ playMode = PlayMode;
+ return true;
}
int64_t cDvbHdFfDevice::GetSTC(void)
{
- if (fd_video >= 0) {
- uint64_t pts;
- if (ioctl(fd_video, VIDEO_GET_PTS, &pts) == -1) {
- esyslog("ERROR: pts %d: %m", CardIndex() + 1);
- return -1;
+ if (isPlayingVideo)
+ {
+ if (fd_video >= 0) {
+ uint64_t pts;
+ if (ioctl(fd_video, VIDEO_GET_PTS, &pts) == -1) {
+ esyslog("ERROR: pts %d: %m", CardIndex() + 1);
+ return -1;
+ }
+ //printf("video PTS %lld\n", pts);
+ return pts;
}
- return pts;
- }
- if (fd_audio >= 0) {
- uint64_t pts;
- if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
- esyslog("ERROR: pts %d: %m", CardIndex() + 1);
- return -1;
+ }
+ else
+ {
+ if (fd_audio >= 0) {
+ uint64_t pts;
+ if (ioctl(fd_audio, AUDIO_GET_PTS, &pts) == -1) {
+ esyslog("ERROR: pts %d: %m", CardIndex() + 1);
+ return -1;
+ }
+ //printf("audio PTS %lld\n", pts);
+ return pts;
}
- return pts;
- }
- return -1;
+ }
+ return -1;
}
void cDvbHdFfDevice::TrickSpeed(int Speed)
@@ -456,12 +481,13 @@ void cDvbHdFfDevice::Clear(void)
void cDvbHdFfDevice::Play(void)
{
- freezed = false;
- trickMode = false;
- mHdffCmdIf->CmdAvEnableSync(0, true);
- mHdffCmdIf->CmdAvSetVideoSpeed(0, 100);
- mHdffCmdIf->CmdAvSetAudioSpeed(0, 100);
- cDevice::Play();
+ freezed = false;
+ trickMode = false;
+ if (isPlayingVideo)
+ mHdffCmdIf->CmdAvEnableSync(0, true);
+ mHdffCmdIf->CmdAvSetVideoSpeed(0, 100);
+ mHdffCmdIf->CmdAvSetAudioSpeed(0, 100);
+ cDevice::Play();
}
void cDvbHdFfDevice::Freeze(void)
@@ -631,6 +657,11 @@ int cDvbHdFfDevice::PlayVideo(const uchar *Data, int Length)
{
if (freezed)
return -1;
+ if (!isPlayingVideo)
+ {
+ mHdffCmdIf->CmdAvEnableSync(0, true);
+ isPlayingVideo = true;
+ }
//TODO: support greater Length
uint8_t tsBuffer[188 * 16];
uint32_t tsLength;
@@ -651,8 +682,6 @@ int cDvbHdFfDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
{
if (freezed)
return -1;
- if (trickMode)
- return Length;
uint8_t streamId;
uint8_t tsBuffer[188 * 16];
uint32_t tsLength;
@@ -702,17 +731,23 @@ int cDvbHdFfDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
int cDvbHdFfDevice::PlayTsVideo(const uchar *Data, int Length)
{
- if (freezed)
- return -1;
- int pid = TsPid(Data);
- if (pid != playVideoPid) {
- PatPmtParser();
- if (pid == PatPmtParser()->Vpid()) {
- playVideoPid = pid;
- mHdffCmdIf->CmdAvSetVideoPid(0, playVideoPid, MapVideoStreamTypes(PatPmtParser()->Vtype()), true);
+ if (freezed)
+ return -1;
+ if (!isPlayingVideo)
+ {
+ mHdffCmdIf->CmdAvEnableSync(0, true);
+ isPlayingVideo = true;
+ }
+
+ int pid = TsPid(Data);
+ if (pid != playVideoPid) {
+ PatPmtParser();
+ if (pid == PatPmtParser()->Vpid()) {
+ playVideoPid = pid;
+ mHdffCmdIf->CmdAvSetVideoPid(0, playVideoPid, MapVideoStreamTypes(PatPmtParser()->Vtype()), true);
}
- }
- return WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
+ }
+ return WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
}
static HdffAudioStreamType_t MapAudioStreamTypes(int Atype)
@@ -732,8 +767,6 @@ int cDvbHdFfDevice::PlayTsAudio(const uchar *Data, int Length)
{
if (freezed)
return -1;
- if (trickMode)
- return Length;
int pid = TsPid(Data);
if (pid != playAudioPid) {
playAudioPid = pid;
diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.h b/PLUGINS/src/dvbhddevice/dvbhdffdevice.h
index 439ec9b..344f3dc 100644
--- a/PLUGINS/src/dvbhddevice/dvbhdffdevice.h
+++ b/PLUGINS/src/dvbhddevice/dvbhdffdevice.h
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dvbhdffdevice.h 1.7 2011/09/10 10:17:32 kls Exp $
+ * $Id: dvbhdffdevice.h 1.8 2012/11/05 08:49:29 kls Exp $
*/
#ifndef __DVBHDFFDEVICE_H
@@ -81,6 +81,7 @@ private:
int playAudioPid;
bool freezed;
bool trickMode;
+ bool isPlayingVideo;
// Pes2Ts conversion stuff
uint8_t videoCounter;
diff --git a/PLUGINS/src/dvbhddevice/hdffcmd.c b/PLUGINS/src/dvbhddevice/hdffcmd.c
index a6a41d9..1532cc2 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.25 2012/06/16 11:16:38 kls Exp $
+ * $Id: hdffcmd.c 1.26 2012/11/15 09:19:47 kls Exp $
*/
#include <stdint.h>
@@ -170,6 +170,11 @@ void cHdffCmdIf::CmdAvSetAudioChannel(uint8_t AudioChannel)
HdffCmdAvSetAudioChannel(mOsdDev, AudioChannel);
}
+void cHdffCmdIf::CmdAvSetSyncShift(int16_t SyncShift)
+{
+ HdffCmdAvSetSyncShift(mOsdDev, SyncShift);
+}
+
void cHdffCmdIf::CmdOsdConfigure(const HdffOsdConfig_t * pConfig)
{
diff --git a/PLUGINS/src/dvbhddevice/hdffcmd.h b/PLUGINS/src/dvbhddevice/hdffcmd.h
index f33fe08..58ed138 100644
--- a/PLUGINS/src/dvbhddevice/hdffcmd.h
+++ b/PLUGINS/src/dvbhddevice/hdffcmd.h
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: hdffcmd.h 1.20 2012/06/16 11:16:52 kls Exp $
+ * $Id: hdffcmd.h 1.21 2012/11/15 09:20:05 kls Exp $
*/
#ifndef _HDFF_CMD_H_
@@ -47,6 +47,7 @@ public:
void CmdAvSetAudioDelay(int16_t Delay);
void CmdAvSetAudioDownmix(HdffAudioDownmixMode_t DownmixMode);
void CmdAvSetAudioChannel(uint8_t AudioChannel);
+ void CmdAvSetSyncShift(int16_t SyncShift);
void CmdOsdConfigure(const HdffOsdConfig_t * pConfig);
void CmdOsdReset(void);
diff --git a/PLUGINS/src/dvbhddevice/hdffmsgdef.h b/PLUGINS/src/dvbhddevice/hdffmsgdef.h
deleted file mode 100644
index d63e88a..0000000
--- a/PLUGINS/src/dvbhddevice/hdffmsgdef.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * hdffmsgdef.h: TODO(short description)
- *
- * See the README file for copyright information and how to reach the author.
- *
- * $Id: hdffmsgdef.h 1.13 2011/08/27 09:34:43 kls Exp $
- */
-
-#ifndef _HDFF_MSGDEF_H_
-#define _HDFF_MSGDEF_H_
-
-#define MAX_CMD_LEN 1536
-
-namespace HDFF
-{
-
-typedef enum _eMessageType
-{
- msgTypeCommand,
- msgTypeAnswer,
- msgTypeResult,
- msgTypeEvent
-} eMessageType;
-
-typedef enum _eMessageGroup
-{
- msgGroupGeneric,
- msgGroupAvDec,
- msgGroupAvMux,
- msgGroupFrontend,
- msgGroupOsd,
- msgGroupHdmi,
- msgGroupRemoteControl
-} eMessageGroup;
-
-typedef enum _eMessageId
-{
- msgGenGetFirmwareVersion = 0,
- msgGenGetInterfaceVersion,
- msgGenGetCopyrights,
-
- msgAvSetAudioPid = 0,
- msgAvSetVideoPid,
- msgAvSetPcrPid,
- msgAvSetTeletextPid,
- msgAvShowStillImage,
- msgAvSetVideoWindow,
- msgAvSetDecoderInput,
- msgAvSetDemultiplexerInput,
- msgAvSetVideoFormat,
- msgAvSetVideoOutputMode,
- msgAvSetStc,
- msgAvFlushBuffer,
- msgAvEnableSync,
- msgAvSetVideoSpeed,
- msgAvSetAudioSpeed,
- msgAvEnableVideoAfterStop,
- msgAvGetVideoFormatInfo,
- msgAvSetAudioDelay,
- msgAvSetAudioDownmix,
- msgAvSetAudioChannel,
- msgAvSetPlayMode,
-
- msgMuxSetVideoOut = 0,
- msgMuxSetSlowBlank,
- msgMuxSetFastBlank,
- msgMuxSetVolume,
- msgMuxSetAudioMute,
-
- msgOsdConfigure = 0,
- msgOsdReset,
- msgOsdCreateDisplay = 10,
- msgOsdDeleteDisplay,
- msgOsdEnableDisplay,
- msgOsdSetDisplayOutputRectangle,
- msgOsdSetDisplayClippingArea,
- msgOsdRenderDisplay,
- msgOsdSaveRegion,
- msgOsdRestoreRegion,
- msgOsdCreatePalette = 30,
- msgOsdDeletePalette,
- msgOsdSetDisplayPalette,
- msgOsdSetPaletteColors,
- msgOsdCreateFontFace = 50,
- msgOsdDeleteFontFace,
- msgOsdCreateFont,
- msgOsdDeleteFont,
- msgOsdDrawPixel = 70,
- msgOsdDrawRectangle,
- msgOsdDrawCircle,
- msgOsdDrawEllipse,
- msgOsdDrawSlope,
- msgOsdDrawText,
- msgOsdDrawTextW,
- msgOsdDrawBitmap,
-
- msgHdmiEnableOutput = 0,
- msgHdmiSetVideoMode,
- msgHdmiConfigure,
- msgHdmiIsDisplayConnected,
- msgHdmiGetDisplayInfo,
- msgHdmiGetVideoMode,
- msgHdmiSendCecCommand,
-
- msgRemoteSetProtocol = 0,
- msgRemoteSetAddressFilter,
- msgRemoteKeyEvent
-} eMessageId;
-
-
-// AvDec definitions
-
-typedef enum _eAVContainerType
-{
- avContainerPes,
- avContainerPesDvd,
- avContainerMaxValue
-} eAVContainerType;
-
-typedef enum _eAudioStreamType
-{
- audioStreamMpeg1,
- audioStreamMpeg2,
- audioStreamAc3,
- audioStreamAac,
- audioStreamHeAac,
- audioStreamPcm,
- audioStreamEAc3,
- audioStreamDts,
- audioStreamMaxValue
-} eAudioStreamType;
-
-typedef enum _eVideoStreamType
-{
- videoStreamMpeg1,
- videoStreamMpeg2,
- videoStreamH264,
- videoStreamMpeg4Asp,
- videoStreamVc1,
- videoStreamMaxValue
-} eVideoStreamType;
-
-
-typedef enum _eTvFormat
-{
- tvFormat4by3,
- tvFormat16by9,
- tvFormatMaxValue
-} eTvFormat;
-
-typedef enum _eVideoConversion
-{
- videoConversionAutomatic,
- videoConversionLetterbox16by9,
- videoConversionLetterbox14by9,
- videoConversionPillarbox,
- videoConversionCentreCutOut,
- videoConversionAlways16by9,
- videoConversionMaxValue
-} eVideoConversion;
-
-typedef struct _tVideoFormat
-{
- bool AutomaticEnabled;
- bool AfdEnabled;
- eTvFormat TvFormat;
- eVideoConversion VideoConversion;
-} tVideoFormat;
-
-typedef enum _eVideoOutputMode
-{
- videoOutputClone,
- videoOutputDualView,
- videoOutputMaxValue
-} eVideoOutputMode;
-
-typedef enum _eDownmixMode
-{
- downmixOff,
- downmixAnalog,
- downmixAlways,
- downmixAutomatic,
- downmixHdmi
-} eDownmixMode;
-
-// AvMux definitions
-
-typedef enum _eVideoOut
-{
- videoOutDisabled,
- videoOutRgb,
- videoOutCvbsYuv,
- videoOutYc,
- videoOutMaxValue
-} eVideoOut;
-
-typedef enum _eSlowBlank
-{
- slowBlankOff,
- slowBlank16by9,
- slowBlank4by3,
- slowBlankMaxValue
-} eSlowBlank;
-
-typedef enum _eFastBlank
-{
- fastBlankCvbs,
- fastBlankRgb,
- fastBlankMaxValue
-} eFastBlank;
-
-
-// OSD definitions
-
-#define InvalidHandle 0xFFFFFFFF
-#define ScreenDisplayHandle 0xFFFFFFFE
-
-#define PositionScreenCentered 0xFFFF
-
-#define SizeFullScreen 0xFFFF
-#define SizeSameAsSource 0xFFFE
-
-#define FontFaceTiresias 0x00000000
-
-typedef enum _eColorType
-{
- colorTypeClut1,
- colorTypeClut2,
- colorTypeClut4,
- colorTypeClut8,
- colorTypeARGB8888,
- colorTypeARGB8565,
- colorTypeARGB4444,
- colorTypeARGB1555,
-} eColorType;
-
-typedef enum _eColorFormat
-{
- colorFormatARGB,
- colorFormatACbYCr,
-} eColorFormat;
-
-typedef enum _eDrawingFlags
-{
- drawFull,
- drawHalfTop,
- drawHalfLeft,
- drawHalfBottom,
- drawHalfRight,
- drawQuarterTopLeft,
- drawQuarterTopRight,
- drawQuarterBottomLeft,
- drawQuarterBottomRight,
- drawQuarterTopLeftInverted,
- drawQuarterTopRightInverted,
- drawQuarterBottomLeftInverted,
- drawQuarterBottomRightInverted
-} eDrawingFlags;
-
-typedef struct _tOsdConfig
-{
- bool FontAntialiasing;
- bool FontKerning;
-} tOsdConfig;
-
-// HDMI definitions
-
-typedef enum _eHdmiVideoMode
-{
- videoMode576p50 = 18,
- videoMode720p50 = 19,
- videoMode1080i50 = 20,
- videoMode576i50 = 22,
- videoModeMaxValue
-} eHdmiVideoMode;
-
-typedef enum _eVideoModeAdaption
-{
- videoModeAdaptOff,
- videoModeAdaptFrameRate,
- videoModeAdaptOnlyForHd,
- videoModeAdaptAlways
-} eVideoModeAdaption;
-
-typedef enum _eCecCommand
-{
- cecCommandTvOn,
- cecCommandTvOff,
- cecCommandActiveSource,
- cecCommandInactiveSource
-} eCecCommand;
-
-typedef struct _tHdmiConfig
-{
- bool TransmitAudio;
- bool ForceDviMode;
- bool CecEnabled;
- eVideoModeAdaption VideoModeAdaption;
-} tHdmiConfig;
-
-// Remote control definitions
-
-typedef enum _eRemoteProtocol
-{
- remoteProtocolNone,
- remoteProtocolRc5,
- remoteProtocolRc6,
- remoteProtocolMaxValue
-} eRemoteProtocol;
-
-} // end of namespace
-
-#endif
diff --git a/PLUGINS/src/dvbhddevice/hdffosd.c b/PLUGINS/src/dvbhddevice/hdffosd.c
index 427a3fb..5d55c95 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.17 2012/06/16 11:17:11 kls Exp $
+ * $Id: hdffosd.c 1.18 2012/11/15 09:20:24 kls Exp $
*/
#include "hdffosd.h"
@@ -390,11 +390,13 @@ void cHdffOsd::DrawText(int x, int y, const char *s, tColor ColorFg, tColor Colo
}
}
}
+#if 0
if (mSupportsUtf8Text)
{
mHdffCmdIf->CmdOsdDrawUtf8Text(mDisplay, pFont->Handle, x + mLeft, y + mTop + h, s, ColorFg);
}
else
+#endif
{
uint16_t tmp[1000];
uint16_t len = 0;
diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile b/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile
index 8b25f66..babe79b 100644
--- a/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile
+++ b/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile
@@ -24,6 +24,18 @@ CFLAGS ?= -g -O2 -fPIC -Wall
AR ?= ar
ARFLAGS ?= r
+### The directory environment:
+
+VDRDIR ?= ../../../..
+
+### Make sure that necessary options are included:
+
+include $(VDRDIR)/Make.global
+
+### Allow user defined options to overwrite defaults:
+
+-include $(VDRDIR)/Make.config
+
### Implicit rules:
%.o: %.c
diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.c b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.c
index 413f3e2..3ae1fd7 100644
--- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.c
+++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.c
@@ -449,3 +449,22 @@ int HdffCmdAvSetAudioChannel(int OsdDevice, uint8_t AudioChannel)
osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf);
return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd);
}
+
+int HdffCmdAvSetSyncShift(int OsdDevice, int16_t SyncShift)
+{
+ uint8_t cmdData[16];
+ BitBuffer_t cmdBuf;
+ osd_raw_cmd_t osd_cmd;
+
+ 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_AV_DECODER,
+ HDFF_MSG_AV_SET_OPTIONS);
+ BitBuffer_SetBits(&cmdBuf, 1, 1);
+ BitBuffer_SetBits(&cmdBuf, 31, 0); // reserved
+ BitBuffer_SetBits(&cmdBuf, 16, SyncShift);
+ osd_cmd.cmd_len = HdffCmdSetLength(&cmdBuf);
+ return ioctl(OsdDevice, OSD_RAW_CMD, &osd_cmd);
+}
diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h
index 0e77c79..bfed59d 100644
--- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h
+++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_av.h
@@ -149,4 +149,6 @@ int HdffCmdAvSetAudioDownmix(int OsdDevice,
int HdffCmdAvSetAudioChannel(int OsdDevice, uint8_t AudioChannel);
+int HdffCmdAvSetSyncShift(int OsdDevice, int16_t SyncShift);
+
#endif /* HDFFCMD_AV_H */
diff --git a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h
index 322c256..5ead270 100644
--- a/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h
+++ b/PLUGINS/src/dvbhddevice/libhdffcmd/hdffcmd_defs.h
@@ -70,6 +70,7 @@ typedef enum HdffMessageId_t
HDFF_MSG_AV_SET_AUDIO_DOWNMIX,
HDFF_MSG_AV_SET_AUDIO_CHANNEL,
HDFF_MSG_AV_SET_PLAY_MODE,
+ HDFF_MSG_AV_SET_OPTIONS,
HDFF_MSG_MUX_SET_VIDEO_OUT = 0,
HDFF_MSG_MUX_SET_SLOW_BLANK,
diff --git a/PLUGINS/src/dvbhddevice/po/de_DE.po b/PLUGINS/src/dvbhddevice/po/de_DE.po
index ac58c0c..b263f08 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: 2012-02-07 20:13+0100\n"
+"POT-Creation-Date: 2012-11-13 20:08+0100\n"
"PO-Revision-Date: 2011-04-25 21:44+0200\n"
"Last-Translator: Christoph Haubrich\n"
"Language-Team: <see README>\n"
@@ -91,6 +91,9 @@ msgstr "Audio Verzögerung (ms)"
msgid "Audio Downmix"
msgstr "Audio Downmix"
+msgid "A/V Sync Shift (ms)"
+msgstr "A/V-Sync Verschiebung (ms)"
+
msgid "OSD Size"
msgstr "OSD Größe"
diff --git a/PLUGINS/src/dvbhddevice/po/fi_FI.po b/PLUGINS/src/dvbhddevice/po/fi_FI.po
index f8e480b..a971773 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: 2012-02-07 20:13+0100\n"
+"POT-Creation-Date: 2012-11-13 20:08+0100\n"
"PO-Revision-Date: 2011-04-25 21:44+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
@@ -91,6 +91,9 @@ msgstr "Äänen viive (ms)"
msgid "Audio Downmix"
msgstr "Äänen alasmiksaus"
+msgid "A/V Sync Shift (ms)"
+msgstr ""
+
msgid "OSD Size"
msgstr "Kuvaruutunäytön koko"
diff --git a/PLUGINS/src/dvbhddevice/po/it_IT.po b/PLUGINS/src/dvbhddevice/po/it_IT.po
index def0389..56b987a 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: 2012-02-07 20:13+0100\n"
+"POT-Creation-Date: 2012-11-13 20:08+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"
@@ -94,6 +94,9 @@ msgstr "Ritardo audio (ms)"
msgid "Audio Downmix"
msgstr "Scala Audio"
+msgid "A/V Sync Shift (ms)"
+msgstr ""
+
msgid "OSD Size"
msgstr "Dimensione OSD"
diff --git a/PLUGINS/src/dvbhddevice/setup.c b/PLUGINS/src/dvbhddevice/setup.c
index b6525a0..fcc1648 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.17 2012/02/08 15:14:01 kls Exp $
+ * $Id: setup.c 1.18 2012/11/15 09:20:50 kls Exp $
*/
#include "setup.h"
@@ -26,6 +26,7 @@ cHdffSetup::cHdffSetup(void)
AnalogueVideo = HDFF_VIDEO_OUT_CVBS_YUV;
AudioDelay = 0;
AudioDownmix = HDFF_AUDIO_DOWNMIX_AUTOMATIC;
+ AvSyncShift = 0;
OsdSize = 0;
CecEnabled = 1;
CecTvOn = 1;
@@ -46,6 +47,7 @@ bool cHdffSetup::SetupParse(const char *Name, const char *Value)
else if (strcmp(Name, "AnalogueVideo") == 0) AnalogueVideo = atoi(Value);
else if (strcmp(Name, "AudioDelay") == 0) AudioDelay = atoi(Value);
else if (strcmp(Name, "AudioDownmix") == 0) AudioDownmix = atoi(Value);
+ else if (strcmp(Name, "AvSyncShift") == 0) AvSyncShift = 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);
@@ -256,6 +258,7 @@ cHdffSetupPage::cHdffSetupPage(HDFF::cHdffCmdIf * pHdffCmdIf)
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 cMenuEditIntItem(tr("A/V Sync Shift (ms)"), &mNewHdffSetup.AvSyncShift, -500, 500));
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));
@@ -385,6 +388,7 @@ void cHdffSetupPage::Store(void)
SetupStore("AnalogueVideo", mNewHdffSetup.AnalogueVideo);
SetupStore("AudioDelay", mNewHdffSetup.AudioDelay);
SetupStore("AudioDownmix", mNewHdffSetup.AudioDownmix);
+ SetupStore("AvSyncShift", mNewHdffSetup.AvSyncShift);
SetupStore("OsdSize", mNewHdffSetup.OsdSize);
SetupStore("CecEnabled", mNewHdffSetup.CecEnabled);
SetupStore("CecTvOn", mNewHdffSetup.CecTvOn);
@@ -412,6 +416,7 @@ void cHdffSetupPage::Store(void)
mHdffCmdIf->CmdAvSetAudioDelay(mNewHdffSetup.AudioDelay);
mHdffCmdIf->CmdAvSetAudioDownmix((HdffAudioDownmixMode_t) mNewHdffSetup.AudioDownmix);
+ mHdffCmdIf->CmdAvSetSyncShift(mNewHdffSetup.AvSyncShift);
mHdffCmdIf->CmdMuxSetVideoOut((HdffVideoOut_t) mNewHdffSetup.AnalogueVideo);
diff --git a/PLUGINS/src/dvbhddevice/setup.h b/PLUGINS/src/dvbhddevice/setup.h
index 64033e1..011411d 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.12 2012/02/08 15:14:56 kls Exp $
+ * $Id: setup.h 1.13 2012/11/15 09:21:07 kls Exp $
*/
#ifndef _HDFF_SETUP_H_
@@ -28,6 +28,7 @@ struct cHdffSetup
int AnalogueVideo;
int AudioDelay;
int AudioDownmix;
+ int AvSyncShift;
int OsdSize;
int CecEnabled;
int CecTvOn;