summaryrefslogtreecommitdiff
path: root/PLUGINS/src/dvbhddevice/libhdffcmd
diff options
context:
space:
mode:
Diffstat (limited to 'PLUGINS/src/dvbhddevice/libhdffcmd')
-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
4 files changed, 34 insertions, 0 deletions
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,