From e983a05100b9ba6bfcfa4b4a87de49d6dd2ec6f7 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 3 Apr 2011 20:21:44 +0200 Subject: [PATCH] libtriple: implement cVideo::SetSyncMode() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4a49f203f7b8bb84edb5e3757a2142875b46593d Author: Stefan Seyfried Date: 2011-04-03 (Sun, 03 Apr 2011) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- lib/libtriple/video_td.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/libtriple/video_td.cpp b/lib/libtriple/video_td.cpp index 52d91f82b..93f8adc80 100644 --- a/lib/libtriple/video_td.cpp +++ b/lib/libtriple/video_td.cpp @@ -634,9 +634,26 @@ void cVideo::getPictureInfo(int &width, int &height, int &rate) height = (int)v.v_size; } -void cVideo::SetSyncMode(AVSYNC_TYPE /*Mode*/) +void cVideo::SetSyncMode(AVSYNC_TYPE Mode) { - lt_debug("%s\n", __FUNCTION__); + lt_debug("%s %d\n", __FUNCTION__, Mode); + /* + * { 0, LOCALE_OPTIONS_OFF }, + * { 1, LOCALE_OPTIONS_ON }, + * { 2, LOCALE_AUDIOMENU_AVSYNC_AM } + */ + switch(Mode) + { + case 0: + ioctl(fd, MPEG_VID_SYNC_OFF); + break; + case 1: + ioctl(fd, MPEG_VID_SYNC_ON, VID_SYNC_VID); + break; + default: + ioctl(fd, MPEG_VID_SYNC_ON, VID_SYNC_AUD); + break; + } }; int cVideo::SetStreamType(VIDEO_FORMAT type)