mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Make soft start sync setup menu configurable.
This commit is contained in:
parent
d6c6818ecf
commit
340816d763
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Make soft start sync setup menu configurable.
|
||||||
Fix bug: StillPicture NAL end of sequence is 10 and not 0x10.
|
Fix bug: StillPicture NAL end of sequence is 10 and not 0x10.
|
||||||
Fix bug: AudioEnqueue crash without sound card.
|
Fix bug: AudioEnqueue crash without sound card.
|
||||||
|
|
||||||
|
@ -186,6 +186,10 @@ Setup: /etc/vdr/setup.conf
|
|||||||
0 disable 60Hz display mode
|
0 disable 60Hz display mode
|
||||||
1 enable 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 = ?
|
VideoDisplayFormat = ?
|
||||||
0 pan and scan
|
0 pan and scan
|
||||||
1 letter box
|
1 letter box
|
||||||
|
1
Todo
1
Todo
@ -88,6 +88,7 @@ audio:
|
|||||||
samplerate problem resume/suspend.
|
samplerate problem resume/suspend.
|
||||||
only wait for video start, if video is running.
|
only wait for video start, if video is running.
|
||||||
Not primary device, don't use and block audio/video.
|
Not primary device, don't use and block audio/video.
|
||||||
|
Remote learning support.
|
||||||
|
|
||||||
audio/alsa:
|
audio/alsa:
|
||||||
better downmix of >2 channels on 2 channel hardware
|
better downmix of >2 channels on 2 channel hardware
|
||||||
|
@ -68,8 +68,9 @@ static char ConfigHideMainMenuEntry; ///< config hide main menu entry
|
|||||||
|
|
||||||
static uint32_t ConfigVideoBackground; ///< config video background color
|
static uint32_t ConfigVideoBackground; ///< config video background color
|
||||||
static int ConfigVideoSkipLines; ///< config skip lines top/bottom
|
static int ConfigVideoSkipLines; ///< config skip lines top/bottom
|
||||||
static int ConfigVideoStudioLevels; ///< config use studio levels
|
static char ConfigVideoStudioLevels; ///< config use studio levels
|
||||||
static int ConfigVideo60HzMode; ///< config use 60Hz display mode
|
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
|
||||||
|
static char ConfigVideoSoftStartSync; ///< config use softstart sync
|
||||||
|
|
||||||
/// config deinterlace
|
/// config deinterlace
|
||||||
static int ConfigVideoDeinterlace[RESOLUTIONS];
|
static int ConfigVideoDeinterlace[RESOLUTIONS];
|
||||||
@ -421,6 +422,8 @@ class cMenuSetupSoft:public cMenuSetupPage
|
|||||||
uint32_t BackgroundAlpha;
|
uint32_t BackgroundAlpha;
|
||||||
int SkipLines;
|
int SkipLines;
|
||||||
int StudioLevels;
|
int StudioLevels;
|
||||||
|
int _60HzMode;
|
||||||
|
int SoftStartSync;
|
||||||
int Scaling[RESOLUTIONS];
|
int Scaling[RESOLUTIONS];
|
||||||
int Deinterlace[RESOLUTIONS];
|
int Deinterlace[RESOLUTIONS];
|
||||||
int SkipChromaDeinterlace[RESOLUTIONS];
|
int SkipChromaDeinterlace[RESOLUTIONS];
|
||||||
@ -503,6 +506,12 @@ cMenuSetupSoft::cMenuSetupSoft(void)
|
|||||||
StudioLevels = ConfigVideoStudioLevels;
|
StudioLevels = ConfigVideoStudioLevels;
|
||||||
Add(new cMenuEditBoolItem(tr("Use studio levels (vdpau only)"),
|
Add(new cMenuEditBoolItem(tr("Use studio levels (vdpau only)"),
|
||||||
&StudioLevels, trVDR("no"), trVDR("yes")));
|
&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) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
Add(SeparatorItem(resolution[i]));
|
Add(SeparatorItem(resolution[i]));
|
||||||
@ -580,6 +589,10 @@ void cMenuSetupSoft::Store(void)
|
|||||||
VideoSetSkipLines(ConfigVideoSkipLines);
|
VideoSetSkipLines(ConfigVideoSkipLines);
|
||||||
SetupStore("StudioLevels", ConfigVideoStudioLevels = StudioLevels);
|
SetupStore("StudioLevels", ConfigVideoStudioLevels = StudioLevels);
|
||||||
VideoSetStudioLevels(ConfigVideoStudioLevels);
|
VideoSetStudioLevels(ConfigVideoStudioLevels);
|
||||||
|
SetupStore("60HzMode", ConfigVideo60HzMode = _60HzMode);
|
||||||
|
VideoSet60HzMode(ConfigVideo60HzMode);
|
||||||
|
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
|
||||||
|
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
|
||||||
|
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@ -928,6 +941,7 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
|
|||||||
cDevice::MakePrimaryDevice(on);
|
cDevice::MakePrimaryDevice(on);
|
||||||
if (on) {
|
if (on) {
|
||||||
new cSoftOsdProvider();
|
new cSoftOsdProvider();
|
||||||
|
|
||||||
if (SuspendMode == SUSPEND_DETACHED) {
|
if (SuspendMode == SUSPEND_DETACHED) {
|
||||||
Resume();
|
Resume();
|
||||||
SuspendMode = 0;
|
SuspendMode = 0;
|
||||||
@ -1124,7 +1138,7 @@ bool cSoftHdDevice::Flush(int timeout_ms)
|
|||||||
** device has an MPEG decoder).
|
** device has an MPEG decoder).
|
||||||
*/
|
*/
|
||||||
void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat
|
void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat
|
||||||
video_display_format)
|
video_display_format)
|
||||||
{
|
{
|
||||||
static int last = -1;
|
static int last = -1;
|
||||||
|
|
||||||
@ -1550,6 +1564,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
|
|||||||
VideoSet60HzMode(ConfigVideo60HzMode = atoi(value));
|
VideoSet60HzMode(ConfigVideo60HzMode = atoi(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!strcasecmp(name, "SoftStartSync")) {
|
||||||
|
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
|
28
video.c
28
video.c
@ -331,9 +331,8 @@ int VideoAudioDelay;
|
|||||||
/// Default zoom mode
|
/// Default zoom mode
|
||||||
static VideoZoomModes Video4to3ZoomMode;
|
static VideoZoomModes Video4to3ZoomMode;
|
||||||
|
|
||||||
static char VideoSoftStartSync = 1; ///< soft start sync audio/video
|
|
||||||
|
|
||||||
static char Video60HzMode; ///< handle 60hz displays
|
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 WmDeleteWindowAtom; ///< WM delete message atom
|
||||||
static xcb_atom_t NetWmState; ///< wm-state 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Output video messages.
|
||||||
|
///
|
||||||
|
/// Reduce output.
|
||||||
|
///
|
||||||
|
static void VideoMessage(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// GLX
|
// GLX
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -7469,6 +7477,11 @@ static void VdpauSyncDisplayFrame(VdpauDecoder * decoder)
|
|||||||
static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
|
static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
|
||||||
const AVCodecContext * video_ctx, const AVFrame * frame)
|
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);
|
VideoSetPts(&decoder->PTS, decoder->Interlaced, frame);
|
||||||
|
|
||||||
if (!atomic_read(&decoder->SurfacesFilled)) {
|
if (!atomic_read(&decoder->SurfacesFilled)) {
|
||||||
@ -9004,6 +9017,7 @@ int VideoSetGeometry(const char *geometry)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
/// Set 60hz display mode.
|
/// Set 60hz display mode.
|
||||||
///
|
///
|
||||||
/// Pull up 50 Hz video for 60 Hz display.
|
/// Pull up 50 Hz video for 60 Hz display.
|
||||||
@ -9015,6 +9029,16 @@ void VideoSet60HzMode(int onoff)
|
|||||||
Video60HzMode = 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.
|
/// Set video output position.
|
||||||
///
|
///
|
||||||
|
3
video.h
3
video.h
@ -83,6 +83,9 @@ extern int VideoSetGeometry(const char *);
|
|||||||
/// Set 60Hz display mode.
|
/// Set 60Hz display mode.
|
||||||
extern void VideoSet60HzMode(int);
|
extern void VideoSet60HzMode(int);
|
||||||
|
|
||||||
|
/// Set soft start audio/video sync.
|
||||||
|
extern void VideoSetSoftStartSync(int);
|
||||||
|
|
||||||
/// Set video output position.
|
/// Set video output position.
|
||||||
extern void VideoSetOutputPosition(int, int, int, int);
|
extern void VideoSetOutputPosition(int, int, int, int);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user