mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Makes 4:3 and 16:9 display format configurable.
Don't use DVB display format.
This commit is contained in:
parent
87c1c7be84
commit
acf377ec60
@ -1,3 +1,9 @@
|
|||||||
|
User johns
|
||||||
|
Date:
|
||||||
|
|
||||||
|
Makes 4:3 and 16:9 display format configurable.
|
||||||
|
Don't use DVB display format.
|
||||||
|
|
||||||
User Zoolook
|
User Zoolook
|
||||||
Date: Tue Jan 1 12:49:19 CET 2013
|
Date: Tue Jan 1 12:49:19 CET 2013
|
||||||
|
|
||||||
|
@ -80,6 +80,8 @@ static char ConfigHideMainMenuEntry; ///< config hide main menu entry
|
|||||||
static char ConfigSuspendClose; ///< suspend should close devices
|
static char ConfigSuspendClose; ///< suspend should close devices
|
||||||
static char ConfigSuspendX11; ///< suspend should stop x11
|
static char ConfigSuspendX11; ///< suspend should stop x11
|
||||||
|
|
||||||
|
static char Config4to3DisplayFormat = 1; ///< config 4:3 display format
|
||||||
|
static char ConfigOtherDisplayFormat = 1; ///< config other display format
|
||||||
static uint32_t ConfigVideoBackground; ///< config video background color
|
static uint32_t ConfigVideoBackground; ///< config video background color
|
||||||
static int ConfigOsdWidth; ///< config OSD width
|
static int ConfigOsdWidth; ///< config OSD width
|
||||||
static int ConfigOsdHeight; ///< config OSD height
|
static int ConfigOsdHeight; ///< config OSD height
|
||||||
@ -563,8 +565,8 @@ class cMenuSetupSoft:public cMenuSetupPage
|
|||||||
int SuspendX11;
|
int SuspendX11;
|
||||||
|
|
||||||
int Video;
|
int Video;
|
||||||
int VideoFormat;
|
int Video4to3DisplayFormat;
|
||||||
int VideoDisplayFormat;
|
int VideoOtherDisplayFormat;
|
||||||
uint32_t Background;
|
uint32_t Background;
|
||||||
uint32_t BackgroundAlpha;
|
uint32_t BackgroundAlpha;
|
||||||
int StudioLevels;
|
int StudioLevels;
|
||||||
@ -656,14 +658,12 @@ void cMenuSetupSoft::Create(void)
|
|||||||
static const char *const osd_size[] = {
|
static const char *const osd_size[] = {
|
||||||
"auto", "1920x1080", "1280x720", "custom",
|
"auto", "1920x1080", "1280x720", "custom",
|
||||||
};
|
};
|
||||||
#if 0
|
|
||||||
static const char *const video_display_formats_4_3[] = {
|
static const char *const video_display_formats_4_3[] = {
|
||||||
"pan&scan", "letterbox", "center cut-out",
|
"pan&scan", "letterbox", "center cut-out",
|
||||||
};
|
};
|
||||||
static const char *const video_display_formats_16_9[] = {
|
static const char *const video_display_formats_16_9[] = {
|
||||||
"pan&scan", "pillarbox", "center cut-out",
|
"pan&scan", "pillarbox", "center cut-out",
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
static const char *const deinterlace[] = {
|
static const char *const deinterlace[] = {
|
||||||
"Bob", "Weave/None", "Temporal", "TemporalSpatial", "Software Bob",
|
"Bob", "Weave/None", "Temporal", "TemporalSpatial", "Software Bob",
|
||||||
"Software Spatial",
|
"Software Spatial",
|
||||||
@ -724,17 +724,10 @@ void cMenuSetupSoft::Create(void)
|
|||||||
//
|
//
|
||||||
Add(CollapsedItem(tr("Video"), Video));
|
Add(CollapsedItem(tr("Video"), Video));
|
||||||
if (Video) {
|
if (Video) {
|
||||||
#if 0 // disabled, not working as expected
|
Add(new cMenuEditStraItem(trVDR("4:3 video display format"),
|
||||||
Add(new cMenuEditBoolItem(trVDR("Setup.DVB$Video format"),
|
&Video4to3DisplayFormat, 3, video_display_formats_4_3));
|
||||||
&VideoFormat, "4:3", "16:9"));
|
Add(new cMenuEditStraItem(trVDR("16:9 + other video display format"),
|
||||||
if (VideoFormat) {
|
&VideoOtherDisplayFormat, 3, video_display_formats_16_9));
|
||||||
Add(new cMenuEditStraItem(trVDR("Setup.DVB$Video display format"),
|
|
||||||
&VideoDisplayFormat, 3, video_display_formats_16_9));
|
|
||||||
} else {
|
|
||||||
Add(new cMenuEditStraItem(trVDR("Setup.DVB$Video display format"),
|
|
||||||
&VideoDisplayFormat, 3, video_display_formats_4_3));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// FIXME: switch config gray/color configuration
|
// FIXME: switch config gray/color configuration
|
||||||
Add(new cMenuEditIntItem(tr("Video background color (RGB)"),
|
Add(new cMenuEditIntItem(tr("Video background color (RGB)"),
|
||||||
@ -845,7 +838,6 @@ eOSState cMenuSetupSoft::ProcessKey(eKeys key)
|
|||||||
int old_video;
|
int old_video;
|
||||||
int old_audio;
|
int old_audio;
|
||||||
int old_osd_size;
|
int old_osd_size;
|
||||||
int old_video_format;
|
|
||||||
int old_resolution_shown[RESOLUTIONS];
|
int old_resolution_shown[RESOLUTIONS];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -853,7 +845,6 @@ eOSState cMenuSetupSoft::ProcessKey(eKeys key)
|
|||||||
old_video = Video;
|
old_video = Video;
|
||||||
old_audio = Audio;
|
old_audio = Audio;
|
||||||
old_osd_size = OsdSize;
|
old_osd_size = OsdSize;
|
||||||
old_video_format = VideoFormat;
|
|
||||||
memcpy(old_resolution_shown, ResolutionShown, sizeof(ResolutionShown));
|
memcpy(old_resolution_shown, ResolutionShown, sizeof(ResolutionShown));
|
||||||
state = cMenuSetupPage::ProcessKey(key);
|
state = cMenuSetupPage::ProcessKey(key);
|
||||||
|
|
||||||
@ -861,7 +852,7 @@ eOSState cMenuSetupSoft::ProcessKey(eKeys key)
|
|||||||
// update menu only, if something on the structure has changed
|
// update menu only, if something on the structure has changed
|
||||||
// this is needed because VDR menus are evil slow
|
// this is needed because VDR menus are evil slow
|
||||||
if (old_general != General || old_video != Video || old_audio != Audio
|
if (old_general != General || old_video != Video || old_audio != Audio
|
||||||
|| old_osd_size != OsdSize || old_video_format != VideoFormat) {
|
|| old_osd_size != OsdSize) {
|
||||||
Create(); // update menu
|
Create(); // update menu
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
@ -915,8 +906,8 @@ cMenuSetupSoft::cMenuSetupSoft(void)
|
|||||||
// video
|
// video
|
||||||
//
|
//
|
||||||
Video = 0;
|
Video = 0;
|
||||||
VideoFormat = Setup.VideoFormat;
|
Video4to3DisplayFormat = Config4to3DisplayFormat;
|
||||||
VideoDisplayFormat = Setup.VideoDisplayFormat;
|
VideoOtherDisplayFormat = ConfigOtherDisplayFormat;
|
||||||
// no unsigned int menu item supported, split background color/alpha
|
// no unsigned int menu item supported, split background color/alpha
|
||||||
Background = ConfigVideoBackground >> 8;
|
Background = ConfigVideoBackground >> 8;
|
||||||
BackgroundAlpha = ConfigVideoBackground & 0xFF;
|
BackgroundAlpha = ConfigVideoBackground & 0xFF;
|
||||||
@ -1003,19 +994,13 @@ void cMenuSetupSoft::Store(void)
|
|||||||
|
|
||||||
SetupStore("Suspend.Close", ConfigSuspendClose = SuspendClose);
|
SetupStore("Suspend.Close", ConfigSuspendClose = SuspendClose);
|
||||||
SetupStore("Suspend.X11", ConfigSuspendX11 = SuspendX11);
|
SetupStore("Suspend.X11", ConfigSuspendX11 = SuspendX11);
|
||||||
// FIXME: this is also in VDR-DVB setup
|
|
||||||
if (Setup.VideoFormat != VideoFormat) {
|
SetupStore("Video4to3DisplayFormat", Config4to3DisplayFormat =
|
||||||
Setup.VideoFormat = VideoFormat;
|
Video4to3DisplayFormat);
|
||||||
cDevice::PrimaryDevice()->SetVideoFormat(Setup.VideoFormat);
|
VideoSet4to3DisplayFormat(Config4to3DisplayFormat);
|
||||||
}
|
SetupStore("VideoOtherDisplayFormat", ConfigOtherDisplayFormat =
|
||||||
//SetupStore("VideoFormat", Setup.VideoFormat);
|
VideoOtherDisplayFormat);
|
||||||
if (Setup.VideoDisplayFormat != VideoDisplayFormat) {
|
VideoSetOtherDisplayFormat(ConfigOtherDisplayFormat);
|
||||||
Setup.VideoDisplayFormat = VideoDisplayFormat;
|
|
||||||
cDevice::PrimaryDevice()->
|
|
||||||
SetVideoDisplayFormat(eVideoDisplayFormat(Setup.
|
|
||||||
VideoDisplayFormat));
|
|
||||||
}
|
|
||||||
//SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat);
|
|
||||||
|
|
||||||
ConfigVideoBackground = Background << 8 | (BackgroundAlpha & 0xFF);
|
ConfigVideoBackground = Background << 8 | (BackgroundAlpha & 0xFF);
|
||||||
SetupStore("Background", ConfigVideoBackground);
|
SetupStore("Background", ConfigVideoBackground);
|
||||||
@ -1335,13 +1320,21 @@ static void HandleHotkey(int code)
|
|||||||
tr("auto-crop disabled and freezed"));
|
tr("auto-crop disabled and freezed"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 30: // change 4:3 -> 16:9 mode
|
case 30: // change 4:3 -> window mode
|
||||||
case 31:
|
case 31:
|
||||||
case 32:
|
case 32:
|
||||||
VideoSetDisplayFormat(code - 30);
|
VideoSet4to3DisplayFormat(code - 30);
|
||||||
break;
|
break;
|
||||||
case 39: // rortate 4:3 -> 16:9 mode
|
case 39: // rotate 4:3 -> window mode
|
||||||
VideoSetDisplayFormat(-1);
|
VideoSet4to3DisplayFormat(-1);
|
||||||
|
break;
|
||||||
|
case 40: // change 16:9 -> window mode
|
||||||
|
case 41:
|
||||||
|
case 42:
|
||||||
|
VideoSetOtherDisplayFormat(code - 40);
|
||||||
|
break;
|
||||||
|
case 49: // rotate 16:9 -> window mode
|
||||||
|
VideoSetOtherDisplayFormat(-1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
esyslog(tr("[softhddev]: hot key %d is not supported\n"), code);
|
esyslog(tr("[softhddev]: hot key %d is not supported\n"), code);
|
||||||
@ -1717,11 +1710,11 @@ bool cSoftHdDevice::Flush(int timeout_ms)
|
|||||||
void cSoftHdDevice::
|
void cSoftHdDevice::
|
||||||
SetVideoDisplayFormat(eVideoDisplayFormat video_display_format)
|
SetVideoDisplayFormat(eVideoDisplayFormat video_display_format)
|
||||||
{
|
{
|
||||||
static int last = -1;
|
|
||||||
|
|
||||||
dsyslog("[softhddev]%s: %d\n", __FUNCTION__, video_display_format);
|
dsyslog("[softhddev]%s: %d\n", __FUNCTION__, video_display_format);
|
||||||
|
|
||||||
cDevice::SetVideoDisplayFormat(video_display_format);
|
cDevice::SetVideoDisplayFormat(video_display_format);
|
||||||
|
#if 0
|
||||||
|
static int last = -1;
|
||||||
|
|
||||||
// called on every channel switch, no need to kill osd...
|
// called on every channel switch, no need to kill osd...
|
||||||
if (last != video_display_format) {
|
if (last != video_display_format) {
|
||||||
@ -1730,6 +1723,7 @@ SetVideoDisplayFormat(eVideoDisplayFormat video_display_format)
|
|||||||
::VideoSetDisplayFormat(video_display_format);
|
::VideoSetDisplayFormat(video_display_format);
|
||||||
cSoftOsd::Dirty = 1;
|
cSoftOsd::Dirty = 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1916,9 +1910,8 @@ cRect cSoftHdDevice::CanScaleVideo(const cRect & rect,
|
|||||||
void cSoftHdDevice::ScaleVideo(const cRect & rect)
|
void cSoftHdDevice::ScaleVideo(const cRect & rect)
|
||||||
{
|
{
|
||||||
#ifdef OSD_DEBUG
|
#ifdef OSD_DEBUG
|
||||||
dsyslog("[softhddev]%s: %dx%d%+d%+d\n", __FUNCTION__,
|
dsyslog("[softhddev]%s: %dx%d%+d%+d\n", __FUNCTION__, VidWinRect.Width(),
|
||||||
VidWinRect.Width(), VidWinRect.Height(), VidWinRect.X(),
|
VidWinRect.Height(), VidWinRect.X(), VidWinRect.Y());
|
||||||
VidWinRect.Y());
|
|
||||||
#endif
|
#endif
|
||||||
VideoSetOutputPosition(rect.X(), rect.Y(), rect.Width(), rect.Height());
|
VideoSetOutputPosition(rect.X(), rect.Y(), rect.Width(), rect.Height());
|
||||||
}
|
}
|
||||||
@ -2194,6 +2187,16 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(name, "Video4to3DisplayFormat")) {
|
||||||
|
Config4to3DisplayFormat = atoi(value);
|
||||||
|
VideoSet4to3DisplayFormat(Config4to3DisplayFormat);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!strcasecmp(name, "VideoOtherDisplayFormat")) {
|
||||||
|
ConfigOtherDisplayFormat = atoi(value);
|
||||||
|
VideoSetOtherDisplayFormat(ConfigOtherDisplayFormat);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!strcasecmp(name, "Background")) {
|
if (!strcasecmp(name, "Background")) {
|
||||||
VideoSetBackground(ConfigVideoBackground = strtoul(value, NULL, 0));
|
VideoSetBackground(ConfigVideoBackground = strtoul(value, NULL, 0));
|
||||||
return true;
|
return true;
|
||||||
@ -2455,9 +2458,13 @@ static const char *SVDRPHelpText[] = {
|
|||||||
" 22: toggle fullscreen\n"
|
" 22: toggle fullscreen\n"
|
||||||
" 23: disable auto-crop\n\040 24: enable auto-crop\n"
|
" 23: disable auto-crop\n\040 24: enable auto-crop\n"
|
||||||
" 25: toggle auto-crop\n"
|
" 25: toggle auto-crop\n"
|
||||||
" 30: stretch 4:3 to 16:9\n\040 31: pillar box 4:3 in 16:9\n"
|
" 30: stretch 4:3 to display\n\040 31: pillar box 4:3 in display\n"
|
||||||
" 32: center cut-out 4:3 to 16:9\n"
|
" 32: center cut-out 4:3 to display\n"
|
||||||
" 39: rotate 4:3 to 16:9 zoom mode\n",
|
" 39: rotate 4:3 to display zoom mode\n"
|
||||||
|
" 40: stretch other aspect ratios to display\n"
|
||||||
|
" 41: letter box other aspect ratios in display\n"
|
||||||
|
" 42: center cut-out other aspect ratios to display\n"
|
||||||
|
" 49: rotate other aspect ratios to display zoom mode\n",
|
||||||
"STAT\n" "\040 Display SuspendMode of the plugin.\n\n"
|
"STAT\n" "\040 Display SuspendMode of the plugin.\n\n"
|
||||||
" reply code is 910 + SuspendMode\n"
|
" reply code is 910 + SuspendMode\n"
|
||||||
" SUSPEND_EXTERNAL == -1 (909)\n"
|
" SUSPEND_EXTERNAL == -1 (909)\n"
|
||||||
|
87
video.c
87
video.c
@ -1,7 +1,7 @@
|
|||||||
///
|
///
|
||||||
/// @file video.c @brief Video module
|
/// @file video.c @brief Video module
|
||||||
///
|
///
|
||||||
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
|
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
|
||||||
///
|
///
|
||||||
/// Contributor(s):
|
/// Contributor(s):
|
||||||
///
|
///
|
||||||
@ -345,9 +345,12 @@ static VideoScalingModes VideoScaling[VideoResolutionMax];
|
|||||||
/// Default audio/video delay
|
/// Default audio/video delay
|
||||||
int VideoAudioDelay;
|
int VideoAudioDelay;
|
||||||
|
|
||||||
/// Default zoom mode
|
/// Default zoom mode for 4:3
|
||||||
static VideoZoomModes Video4to3ZoomMode;
|
static VideoZoomModes Video4to3ZoomMode;
|
||||||
|
|
||||||
|
/// Default zoom mode for 16:9 and others
|
||||||
|
static VideoZoomModes VideoOtherZoomMode;
|
||||||
|
|
||||||
static char Video60HzMode; ///< handle 60hz displays
|
static char Video60HzMode; ///< handle 60hz displays
|
||||||
static char VideoSoftStartSync; ///< soft start sync audio/video
|
static char VideoSoftStartSync; ///< soft start sync audio/video
|
||||||
static const int VideoSoftStartFrames = 100; ///< soft start frames
|
static const int VideoSoftStartFrames = 100; ///< soft start frames
|
||||||
@ -494,11 +497,9 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width,
|
|||||||
// FIXME: store different positions for the ratios
|
// FIXME: store different positions for the ratios
|
||||||
tmp_ratio.num = 4;
|
tmp_ratio.num = 4;
|
||||||
tmp_ratio.den = 3;
|
tmp_ratio.den = 3;
|
||||||
/*
|
fprintf(stderr, "ratio: %d:%d %d:%d\n", input_aspect_ratio.num,
|
||||||
fprintf(stderr, "ratio: %d:%d %d:%d\n", input_aspect_ratio.num,
|
input_aspect_ratio.den, display_aspect_ratio.num,
|
||||||
input_aspect_ratio.den, display_aspect_ratio.num,
|
display_aspect_ratio.den);
|
||||||
display_aspect_ratio.den);
|
|
||||||
*/
|
|
||||||
if (!av_cmp_q(input_aspect_ratio, tmp_ratio)) {
|
if (!av_cmp_q(input_aspect_ratio, tmp_ratio)) {
|
||||||
switch (Video4to3ZoomMode) {
|
switch (Video4to3ZoomMode) {
|
||||||
case VideoNormal:
|
case VideoNormal:
|
||||||
@ -512,7 +513,17 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width,
|
|||||||
goto stretch;
|
goto stretch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME: this overwrites user choosen output position
|
switch (VideoOtherZoomMode) {
|
||||||
|
case VideoNormal:
|
||||||
|
goto normal;
|
||||||
|
case VideoStretch:
|
||||||
|
goto stretch;
|
||||||
|
case VideoCenterCutOut:
|
||||||
|
goto center_cut_out;
|
||||||
|
case VideoAnamorphic:
|
||||||
|
// FIXME: rest should be done by hardware
|
||||||
|
goto stretch;
|
||||||
|
}
|
||||||
|
|
||||||
normal:
|
normal:
|
||||||
*output_x = video_x;
|
*output_x = video_x;
|
||||||
@ -537,6 +548,8 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width,
|
|||||||
*output_y = video_y;
|
*output_y = video_y;
|
||||||
*output_width = video_width;
|
*output_width = video_width;
|
||||||
*output_height = video_height;
|
*output_height = video_height;
|
||||||
|
Debug(3, "video: stretch output %dx%d%+d%+d\n", *output_width,
|
||||||
|
*output_height, *output_x, *output_y);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
center_cut_out:
|
center_cut_out:
|
||||||
@ -10309,34 +10322,80 @@ void VideoSetVideoMode( __attribute__ ((unused))
|
|||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set video display format.
|
/// Set 4:3 video display format.
|
||||||
///
|
///
|
||||||
/// @param format video format (stretch, normal, center cut-out)
|
/// @param format video format (stretch, normal, center cut-out)
|
||||||
///
|
///
|
||||||
void VideoSetDisplayFormat(int format)
|
void VideoSet4to3DisplayFormat(int format)
|
||||||
{
|
{
|
||||||
|
// convert api to internal format
|
||||||
|
switch (format) {
|
||||||
|
case -1: // rotate settings
|
||||||
|
format = (Video4to3ZoomMode + 1) % (VideoCenterCutOut + 1);
|
||||||
|
break;
|
||||||
|
case 0: // pan&scan (we have no pan&scan)
|
||||||
|
format = VideoStretch;
|
||||||
|
break;
|
||||||
|
case 1: // letter box
|
||||||
|
format = VideoNormal;
|
||||||
|
break;
|
||||||
|
case 2: // center cut-out
|
||||||
|
format = VideoCenterCutOut;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((unsigned)format == Video4to3ZoomMode) {
|
||||||
|
return; // no change, no need to lock
|
||||||
|
}
|
||||||
|
|
||||||
VideoOsdExit();
|
VideoOsdExit();
|
||||||
// FIXME: must tell VDR that the OsdSize has been changed!
|
// FIXME: must tell VDR that the OsdSize has been changed!
|
||||||
|
|
||||||
VideoThreadLock();
|
VideoThreadLock();
|
||||||
|
Video4to3ZoomMode = format;
|
||||||
|
// FIXME: need only VideoUsedModule->UpdateOutput();
|
||||||
|
VideoUsedModule->SetVideoMode();
|
||||||
|
VideoThreadUnlock();
|
||||||
|
|
||||||
|
VideoOsdInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Set other video display format.
|
||||||
|
///
|
||||||
|
/// @param format video format (stretch, normal, center cut-out)
|
||||||
|
///
|
||||||
|
void VideoSetOtherDisplayFormat(int format)
|
||||||
|
{
|
||||||
|
// convert api to internal format
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case -1: // rotate settings
|
case -1: // rotate settings
|
||||||
Video4to3ZoomMode = (Video4to3ZoomMode + 1) % VideoCenterCutOut;
|
format = (VideoOtherZoomMode + 1) % (VideoCenterCutOut + 1);
|
||||||
break;
|
break;
|
||||||
case 0: // pan&scan (we have no pan&scan)
|
case 0: // pan&scan (we have no pan&scan)
|
||||||
Video4to3ZoomMode = VideoStretch;
|
format = VideoStretch;
|
||||||
break;
|
break;
|
||||||
case 1: // letter box
|
case 1: // letter box
|
||||||
Video4to3ZoomMode = VideoNormal;
|
format = VideoNormal;
|
||||||
break;
|
break;
|
||||||
case 2: // center cut-out
|
case 2: // center cut-out
|
||||||
Video4to3ZoomMode = VideoCenterCutOut;
|
format = VideoCenterCutOut;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((unsigned)format == VideoOtherZoomMode) {
|
||||||
|
return; // no change, no need to lock
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoOsdExit();
|
||||||
|
// FIXME: must tell VDR that the OsdSize has been changed!
|
||||||
|
|
||||||
|
VideoThreadLock();
|
||||||
|
VideoOtherZoomMode = format;
|
||||||
|
// FIXME: need only VideoUsedModule->UpdateOutput();
|
||||||
VideoUsedModule->SetVideoMode();
|
VideoUsedModule->SetVideoMode();
|
||||||
VideoThreadUnlock();
|
VideoThreadUnlock();
|
||||||
|
|
||||||
VideoOsdInit();
|
VideoOsdInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9
video.h
9
video.h
@ -1,7 +1,7 @@
|
|||||||
///
|
///
|
||||||
/// @file video.h @brief Video module header file
|
/// @file video.h @brief Video module header file
|
||||||
///
|
///
|
||||||
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
|
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
|
||||||
///
|
///
|
||||||
/// Contributor(s):
|
/// Contributor(s):
|
||||||
///
|
///
|
||||||
@ -115,8 +115,11 @@ extern void VideoSetOutputPosition(int, int, int, int);
|
|||||||
/// Set video mode.
|
/// Set video mode.
|
||||||
extern void VideoSetVideoMode(int, int, int, int);
|
extern void VideoSetVideoMode(int, int, int, int);
|
||||||
|
|
||||||
/// Set display format.
|
/// Set 4:3 display format.
|
||||||
extern void VideoSetDisplayFormat(int);
|
extern void VideoSet4to3DisplayFormat(int);
|
||||||
|
|
||||||
|
/// Set other display format.
|
||||||
|
extern void VideoSetOtherDisplayFormat(int);
|
||||||
|
|
||||||
/// Set video fullscreen mode.
|
/// Set video fullscreen mode.
|
||||||
extern void VideoSetFullscreen(int);
|
extern void VideoSetFullscreen(int);
|
||||||
|
Loading…
Reference in New Issue
Block a user