Make soft start sync setup menu configurable.

This commit is contained in:
Johns 2012-03-06 12:16:47 +01:00
parent d6c6818ecf
commit 340816d763
6 changed files with 56 additions and 5 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Make soft start sync setup menu configurable.
Fix bug: StillPicture NAL end of sequence is 10 and not 0x10.
Fix bug: AudioEnqueue crash without sound card.

View File

@ -186,6 +186,10 @@ Setup: /etc/vdr/setup.conf
0 disable 60Hz display mode
1 enable 60Hz display mode
softhddevice.SoftStartSync = 0
0 disable soft start of audio/video sync
1 enable soft start of audio/video sync
VideoDisplayFormat = ?
0 pan and scan
1 letter box

1
Todo
View File

@ -88,6 +88,7 @@ audio:
samplerate problem resume/suspend.
only wait for video start, if video is running.
Not primary device, don't use and block audio/video.
Remote learning support.
audio/alsa:
better downmix of >2 channels on 2 channel hardware

View File

@ -68,8 +68,9 @@ static char ConfigHideMainMenuEntry; ///< config hide main menu entry
static uint32_t ConfigVideoBackground; ///< config video background color
static int ConfigVideoSkipLines; ///< config skip lines top/bottom
static int ConfigVideoStudioLevels; ///< config use studio levels
static int ConfigVideo60HzMode; ///< config use 60Hz display mode
static char ConfigVideoStudioLevels; ///< config use studio levels
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
static char ConfigVideoSoftStartSync; ///< config use softstart sync
/// config deinterlace
static int ConfigVideoDeinterlace[RESOLUTIONS];
@ -421,6 +422,8 @@ class cMenuSetupSoft:public cMenuSetupPage
uint32_t BackgroundAlpha;
int SkipLines;
int StudioLevels;
int _60HzMode;
int SoftStartSync;
int Scaling[RESOLUTIONS];
int Deinterlace[RESOLUTIONS];
int SkipChromaDeinterlace[RESOLUTIONS];
@ -503,6 +506,12 @@ cMenuSetupSoft::cMenuSetupSoft(void)
StudioLevels = ConfigVideoStudioLevels;
Add(new cMenuEditBoolItem(tr("Use studio levels (vdpau only)"),
&StudioLevels, trVDR("no"), trVDR("yes")));
_60HzMode = ConfigVideo60HzMode;
Add(new cMenuEditBoolItem(tr("60hz display mode"), &_60HzMode, trVDR("no"),
trVDR("yes")));
SoftStartSync = ConfigVideoSoftStartSync;
Add(new cMenuEditBoolItem(tr("soft start a/v sync"), &SoftStartSync,
trVDR("no"), trVDR("yes")));
for (i = 0; i < RESOLUTIONS; ++i) {
Add(SeparatorItem(resolution[i]));
@ -580,6 +589,10 @@ void cMenuSetupSoft::Store(void)
VideoSetSkipLines(ConfigVideoSkipLines);
SetupStore("StudioLevels", ConfigVideoStudioLevels = StudioLevels);
VideoSetStudioLevels(ConfigVideoStudioLevels);
SetupStore("60HzMode", ConfigVideo60HzMode = _60HzMode);
VideoSet60HzMode(ConfigVideo60HzMode);
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
for (i = 0; i < RESOLUTIONS; ++i) {
char buf[128];
@ -928,6 +941,7 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
cDevice::MakePrimaryDevice(on);
if (on) {
new cSoftOsdProvider();
if (SuspendMode == SUSPEND_DETACHED) {
Resume();
SuspendMode = 0;
@ -1124,7 +1138,7 @@ bool cSoftHdDevice::Flush(int timeout_ms)
** device has an MPEG decoder).
*/
void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat
video_display_format)
video_display_format)
{
static int last = -1;
@ -1550,6 +1564,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
VideoSet60HzMode(ConfigVideo60HzMode = atoi(value));
return true;
}
if (!strcasecmp(name, "SoftStartSync")) {
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
return true;
}
for (i = 0; i < RESOLUTIONS; ++i) {
char buf[128];

28
video.c
View File

@ -331,9 +331,8 @@ int VideoAudioDelay;
/// Default zoom mode
static VideoZoomModes Video4to3ZoomMode;
static char VideoSoftStartSync = 1; ///< soft start sync audio/video
static char Video60HzMode; ///< handle 60hz displays
static char VideoSoftStartSync; ///< soft start sync audio/video
static xcb_atom_t WmDeleteWindowAtom; ///< WM delete message atom
static xcb_atom_t NetWmState; ///< wm-state message atom
@ -533,6 +532,15 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width,
return;
}
///
/// Output video messages.
///
/// Reduce output.
///
static void VideoMessage(void)
{
}
//----------------------------------------------------------------------------
// GLX
//----------------------------------------------------------------------------
@ -7469,6 +7477,11 @@ static void VdpauSyncDisplayFrame(VdpauDecoder * decoder)
static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
const AVCodecContext * video_ctx, const AVFrame * frame)
{
// FIXME: temp debug
if (0 && frame->pkt_pts != (int64_t) AV_NOPTS_VALUE) {
Info("render frame pts %s\n", Timestamp2String(frame->pkt_pts));
}
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
if (!atomic_read(&decoder->SurfacesFilled)) {
@ -9004,6 +9017,7 @@ int VideoSetGeometry(const char *geometry)
return 0;
}
///
/// Set 60hz display mode.
///
/// Pull up 50 Hz video for 60 Hz display.
@ -9015,6 +9029,16 @@ void VideoSet60HzMode(int onoff)
Video60HzMode = onoff;
}
///
/// Set soft start audio/video sync.
///
/// @param onoff enable / disable the soft start sync.
///
void VideoSetSoftStartSync(int onoff)
{
VideoSoftStartSync = onoff;
}
///
/// Set video output position.
///

View File

@ -83,6 +83,9 @@ extern int VideoSetGeometry(const char *);
/// Set 60Hz display mode.
extern void VideoSet60HzMode(int);
/// Set soft start audio/video sync.
extern void VideoSetSoftStartSync(int);
/// Set video output position.
extern void VideoSetOutputPosition(int, int, int, int);