mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Made showing black picture configurable.
This commit is contained in:
parent
44ca71fedb
commit
53f22a2ed2
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Made showing black picture configurable.
|
||||||
Show black picture, if no video stream is available.
|
Show black picture, if no video stream is available.
|
||||||
Setup split into foldable sections.
|
Setup split into foldable sections.
|
||||||
Adds show cursor on pointer move and hide after 200ms.
|
Adds show cursor on pointer move and hide after 200ms.
|
||||||
|
@ -219,6 +219,10 @@ Setup: /etc/vdr/setup.conf
|
|||||||
0 disable soft start of audio/video sync
|
0 disable soft start of audio/video sync
|
||||||
1 enable soft start of audio/video sync
|
1 enable soft start of audio/video sync
|
||||||
|
|
||||||
|
softhddevice.BlackPicture = 0
|
||||||
|
0 disable black picture during channel switch
|
||||||
|
1 enable black picture during channel switch
|
||||||
|
|
||||||
VideoDisplayFormat = ?
|
VideoDisplayFormat = ?
|
||||||
0 pan and scan
|
0 pan and scan
|
||||||
1 letter box
|
1 letter box
|
||||||
|
@ -82,6 +82,7 @@ static uint32_t ConfigVideoBackground; ///< config video background color
|
|||||||
static char ConfigVideoStudioLevels; ///< config use studio levels
|
static char ConfigVideoStudioLevels; ///< config use studio levels
|
||||||
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
|
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
|
||||||
static char ConfigVideoSoftStartSync; ///< config use softstart sync
|
static char ConfigVideoSoftStartSync; ///< config use softstart sync
|
||||||
|
static char ConfigVideoBlackPicture; ///< config enable black picture mode
|
||||||
|
|
||||||
/// config deinterlace
|
/// config deinterlace
|
||||||
static int ConfigVideoDeinterlace[RESOLUTIONS];
|
static int ConfigVideoDeinterlace[RESOLUTIONS];
|
||||||
@ -490,6 +491,7 @@ class cMenuSetupSoft:public cMenuSetupPage
|
|||||||
int StudioLevels;
|
int StudioLevels;
|
||||||
int _60HzMode;
|
int _60HzMode;
|
||||||
int SoftStartSync;
|
int SoftStartSync;
|
||||||
|
int BlackPicture;
|
||||||
|
|
||||||
int ResolutionShown[RESOLUTIONS];
|
int ResolutionShown[RESOLUTIONS];
|
||||||
int Scaling[RESOLUTIONS];
|
int Scaling[RESOLUTIONS];
|
||||||
@ -639,6 +641,8 @@ void cMenuSetupSoft::Create(void)
|
|||||||
trVDR("no"), trVDR("yes")));
|
trVDR("no"), trVDR("yes")));
|
||||||
Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync,
|
Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync,
|
||||||
trVDR("no"), trVDR("yes")));
|
trVDR("no"), trVDR("yes")));
|
||||||
|
Add(new cMenuEditBoolItem(tr("Black during channel switch"),
|
||||||
|
&BlackPicture, trVDR("no"), trVDR("yes")));
|
||||||
|
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
Add(CollapsedItem(resolution[i], ResolutionShown[i]));
|
Add(CollapsedItem(resolution[i], ResolutionShown[i]));
|
||||||
@ -779,6 +783,7 @@ cMenuSetupSoft::cMenuSetupSoft(void)
|
|||||||
StudioLevels = ConfigVideoStudioLevels;
|
StudioLevels = ConfigVideoStudioLevels;
|
||||||
_60HzMode = ConfigVideo60HzMode;
|
_60HzMode = ConfigVideo60HzMode;
|
||||||
SoftStartSync = ConfigVideoSoftStartSync;
|
SoftStartSync = ConfigVideoSoftStartSync;
|
||||||
|
BlackPicture = ConfigVideoBlackPicture;
|
||||||
|
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
ResolutionShown[i] = 0;
|
ResolutionShown[i] = 0;
|
||||||
@ -853,6 +858,8 @@ void cMenuSetupSoft::Store(void)
|
|||||||
VideoSet60HzMode(ConfigVideo60HzMode);
|
VideoSet60HzMode(ConfigVideo60HzMode);
|
||||||
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
|
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
|
||||||
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
|
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
|
||||||
|
SetupStore("BlackPicture", ConfigVideoBlackPicture = BlackPicture);
|
||||||
|
VideoSetBlackPicture(ConfigVideoBlackPicture);
|
||||||
|
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@ -1923,6 +1930,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
|
|||||||
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
|
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!strcasecmp(name, "BlackPicture")) {
|
||||||
|
VideoSetBlackPicture(ConfigVideoBlackPicture = atoi(value));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
|
26
video.c
26
video.c
@ -348,6 +348,8 @@ static VideoZoomModes Video4to3ZoomMode;
|
|||||||
|
|
||||||
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 = 120; ///< soft start frames
|
||||||
|
static char VideoShowBlackPicture; ///< flag show black picture
|
||||||
|
|
||||||
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
|
||||||
@ -4459,7 +4461,7 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
|
|||||||
decoder->TrickCounter = decoder->TrickSpeed;
|
decoder->TrickCounter = decoder->TrickSpeed;
|
||||||
}
|
}
|
||||||
// at start of new video stream, soft or hard sync video to audio
|
// at start of new video stream, soft or hard sync video to audio
|
||||||
if (!VideoSoftStartSync && decoder->FramesDisplayed < 60
|
if (!VideoSoftStartSync && decoder->FramesDisplayed < VideoSoftStartFrames
|
||||||
&& (audio_clock == (int64_t) AV_NOPTS_VALUE
|
&& (audio_clock == (int64_t) AV_NOPTS_VALUE
|
||||||
|| video_clock > audio_clock + VideoAudioDelay + 120 * 90)) {
|
|| video_clock > audio_clock + VideoAudioDelay + 120 * 90)) {
|
||||||
err =
|
err =
|
||||||
@ -4510,7 +4512,7 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
|
|||||||
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
|
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
|
||||||
decoder->FrameCounter, VideoGetBuffers());
|
decoder->FrameCounter, VideoGetBuffers());
|
||||||
if (decoder->Closing < -300) {
|
if (decoder->Closing < -300) {
|
||||||
atomic_set(&decoder->SurfacesFilled, 0);
|
atomic_set(&decoder->SurfacesFilled, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
@ -7545,8 +7547,10 @@ static void VdpauDisplayFrame(void)
|
|||||||
// need 1 frame for progressive, 3 frames for interlaced
|
// need 1 frame for progressive, 3 frames for interlaced
|
||||||
if (filled < 1 + 2 * decoder->Interlaced) {
|
if (filled < 1 + 2 * decoder->Interlaced) {
|
||||||
// FIXME: rewrite MixVideo to support less surfaces
|
// FIXME: rewrite MixVideo to support less surfaces
|
||||||
VdpauBlackSurface(decoder);
|
if (VideoShowBlackPicture || decoder->Closing < -300) {
|
||||||
VdpauMessage(3, "video/vdpau: black surface displayed\n");
|
VdpauBlackSurface(decoder);
|
||||||
|
VdpauMessage(3, "video/vdpau: black surface displayed\n");
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7681,7 +7685,7 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder)
|
|||||||
decoder->TrickCounter = decoder->TrickSpeed;
|
decoder->TrickCounter = decoder->TrickSpeed;
|
||||||
}
|
}
|
||||||
// at start of new video stream, soft or hard sync video to audio
|
// at start of new video stream, soft or hard sync video to audio
|
||||||
if (!VideoSoftStartSync && decoder->FramesDisplayed < 60
|
if (!VideoSoftStartSync && decoder->FramesDisplayed < VideoSoftStartFrames
|
||||||
&& (audio_clock == (int64_t) AV_NOPTS_VALUE
|
&& (audio_clock == (int64_t) AV_NOPTS_VALUE
|
||||||
|| video_clock > audio_clock + VideoAudioDelay + 120 * 90)) {
|
|| video_clock > audio_clock + VideoAudioDelay + 120 * 90)) {
|
||||||
err =
|
err =
|
||||||
@ -7732,7 +7736,7 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder)
|
|||||||
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
|
"duping frame (%d/%d) %d v-buf\n"), decoder->FramesDuped,
|
||||||
decoder->FrameCounter, VideoGetBuffers());
|
decoder->FrameCounter, VideoGetBuffers());
|
||||||
if (decoder->Closing < -300) {
|
if (decoder->Closing < -300) {
|
||||||
atomic_set(&decoder->SurfacesFilled, 0);
|
atomic_set(&decoder->SurfacesFilled, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
@ -9608,6 +9612,16 @@ void VideoSetSoftStartSync(int onoff)
|
|||||||
VideoSoftStartSync = onoff;
|
VideoSoftStartSync = onoff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Set show black picture during channel switch.
|
||||||
|
///
|
||||||
|
/// @param onoff enable / disable black picture.
|
||||||
|
///
|
||||||
|
void VideoSetBlackPicture(int onoff)
|
||||||
|
{
|
||||||
|
VideoShowBlackPicture = onoff;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set video output position.
|
/// Set video output position.
|
||||||
///
|
///
|
||||||
|
3
video.h
3
video.h
@ -90,6 +90,9 @@ extern void VideoSet60HzMode(int);
|
|||||||
/// Set soft start audio/video sync.
|
/// Set soft start audio/video sync.
|
||||||
extern void VideoSetSoftStartSync(int);
|
extern void VideoSetSoftStartSync(int);
|
||||||
|
|
||||||
|
/// Set show black picture during channel switch.
|
||||||
|
extern void VideoSetBlackPicture(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