mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add support to configure and clear buffers on channel switch.
This commit is contained in:
parent
fb2a7f9959
commit
0e40f5f872
@ -1,5 +1,10 @@
|
|||||||
|
User Dr. Seltsam
|
||||||
|
Date: Tue Nov 5 16:46:34 CET 2013
|
||||||
|
|
||||||
|
Add support to configure and clear buffers on channel switch.
|
||||||
|
|
||||||
User johns
|
User johns
|
||||||
Date:
|
Date: Tue Oct 8 10:18:04 CET 2013
|
||||||
|
|
||||||
CLOCK_REALTIME -> CLOCK_MONOTONIC to allow time changes.
|
CLOCK_REALTIME -> CLOCK_MONOTONIC to allow time changes.
|
||||||
Add function VideoStreamOpen and always use VideoStreamClose.
|
Add function VideoStreamOpen and always use VideoStreamClose.
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: VDR \n"
|
"Project-Id-Version: VDR \n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2013-08-03 17:21+0200\n"
|
"POT-Creation-Date: 2013-10-06 22:20+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -510,6 +510,9 @@ msgstr "Sanftanlauf A/V Sync"
|
|||||||
msgid "Black during channel switch"
|
msgid "Black during channel switch"
|
||||||
msgstr "Schwarz während Kanalwechsel"
|
msgstr "Schwarz während Kanalwechsel"
|
||||||
|
|
||||||
|
msgid "Clear decoder on channel switch"
|
||||||
|
msgstr "Decoder bei Kanalwechsel leeren"
|
||||||
|
|
||||||
msgid "Brightness (-1000..1000) (vdpau)"
|
msgid "Brightness (-1000..1000) (vdpau)"
|
||||||
msgstr "Helligkeit (-1000..1000) (vdpau)"
|
msgstr "Helligkeit (-1000..1000) (vdpau)"
|
||||||
|
|
||||||
|
29
softhddev.c
29
softhddev.c
@ -83,6 +83,7 @@ static char VdpauDecoder = 1; ///< vdpau decoder used
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int ConfigAudioBufferTime; ///< config size ms of audio buffer
|
extern int ConfigAudioBufferTime; ///< config size ms of audio buffer
|
||||||
|
extern int ConfigVideoClearOnSwitch; //< clear decoder on channel switch
|
||||||
char ConfigStartX11Server; ///< flag start the x11 server
|
char ConfigStartX11Server; ///< flag start the x11 server
|
||||||
static char ConfigStartSuspended; ///< flag to start in suspend mode
|
static char ConfigStartSuspended; ///< flag to start in suspend mode
|
||||||
static char ConfigFullscreen; ///< fullscreen modus
|
static char ConfigFullscreen; ///< fullscreen modus
|
||||||
@ -2465,10 +2466,12 @@ uint8_t *GrabImage(int *size, int jpeg, int quality, int width, int height)
|
|||||||
*/
|
*/
|
||||||
int SetPlayMode(int play_mode)
|
int SetPlayMode(int play_mode)
|
||||||
{
|
{
|
||||||
VideoDisplayWakeup();
|
switch (play_mode) {
|
||||||
// tell video parser we have new stream
|
case 0: // audio/video from decoder
|
||||||
|
// tell video parser we get new stream
|
||||||
if (MyVideoStream->Decoder && !MyVideoStream->SkipStream) {
|
if (MyVideoStream->Decoder && !MyVideoStream->SkipStream) {
|
||||||
if (MyVideoStream->ClearClose) { // replay clear buffers on close
|
// clear buffers on close configured always or replay only
|
||||||
|
if (ConfigVideoClearOnSwitch || MyVideoStream->ClearClose) {
|
||||||
Clear(); // flush all buffers
|
Clear(); // flush all buffers
|
||||||
MyVideoStream->ClearClose = 0;
|
MyVideoStream->ClearClose = 0;
|
||||||
}
|
}
|
||||||
@ -2488,22 +2491,22 @@ int SetPlayMode(int play_mode)
|
|||||||
NewAudioStream = 1;
|
NewAudioStream = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (play_mode) {
|
break;
|
||||||
case 0: // nothing
|
|
||||||
case 1: // audio/video from player
|
case 1: // audio/video from player
|
||||||
|
VideoDisplayWakeup();
|
||||||
|
Play();
|
||||||
break;
|
break;
|
||||||
case 2: // audio only
|
case 2: // audio only from player, video from decoder
|
||||||
|
case 3: // audio only from player, no video (black screen)
|
||||||
Debug(3, "softhddev: FIXME: audio only, silence video errors\n");
|
Debug(3, "softhddev: FIXME: audio only, silence video errors\n");
|
||||||
|
VideoDisplayWakeup();
|
||||||
|
Play();
|
||||||
break;
|
break;
|
||||||
case 3: // audio only, black screen
|
case 4: // video only from player, audio from decoder
|
||||||
Debug(3, "softhddev: FIXME: audio only, silence video errors\n");
|
VideoDisplayWakeup();
|
||||||
break;
|
Play();
|
||||||
case 4: // video only
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Play();
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ 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
|
static char ConfigVideoBlackPicture; ///< config enable black picture mode
|
||||||
|
char ConfigVideoClearOnSwitch; ///< config enable Clear on channel switch
|
||||||
|
|
||||||
static int ConfigVideoBrightness; ///< config video brightness
|
static int ConfigVideoBrightness; ///< config video brightness
|
||||||
static int ConfigVideoContrast = 1000; ///< config video contrast
|
static int ConfigVideoContrast = 1000; ///< config video contrast
|
||||||
@ -595,6 +596,7 @@ class cMenuSetupSoft:public cMenuSetupPage
|
|||||||
int _60HzMode;
|
int _60HzMode;
|
||||||
int SoftStartSync;
|
int SoftStartSync;
|
||||||
int BlackPicture;
|
int BlackPicture;
|
||||||
|
int ClearOnSwitch;
|
||||||
|
|
||||||
int Brightness;
|
int Brightness;
|
||||||
int Contrast;
|
int Contrast;
|
||||||
@ -785,6 +787,8 @@ void cMenuSetupSoft::Create(void)
|
|||||||
trVDR("no"), trVDR("yes")));
|
trVDR("no"), trVDR("yes")));
|
||||||
Add(new cMenuEditBoolItem(tr("Black during channel switch"),
|
Add(new cMenuEditBoolItem(tr("Black during channel switch"),
|
||||||
&BlackPicture, trVDR("no"), trVDR("yes")));
|
&BlackPicture, trVDR("no"), trVDR("yes")));
|
||||||
|
Add(new cMenuEditBoolItem(tr("Clear decoder on channel switch"),
|
||||||
|
&ClearOnSwitch, trVDR("no"), trVDR("yes")));
|
||||||
|
|
||||||
Add(new cMenuEditIntItem(tr("Brightness (-1000..1000) (vdpau)"),
|
Add(new cMenuEditIntItem(tr("Brightness (-1000..1000) (vdpau)"),
|
||||||
&Brightness, -1000, 1000, tr("min"), tr("max")));
|
&Brightness, -1000, 1000, tr("min"), tr("max")));
|
||||||
@ -1010,6 +1014,7 @@ cMenuSetupSoft::cMenuSetupSoft(void)
|
|||||||
_60HzMode = ConfigVideo60HzMode;
|
_60HzMode = ConfigVideo60HzMode;
|
||||||
SoftStartSync = ConfigVideoSoftStartSync;
|
SoftStartSync = ConfigVideoSoftStartSync;
|
||||||
BlackPicture = ConfigVideoBlackPicture;
|
BlackPicture = ConfigVideoBlackPicture;
|
||||||
|
ClearOnSwitch = ConfigVideoClearOnSwitch;
|
||||||
|
|
||||||
Brightness = ConfigVideoBrightness;
|
Brightness = ConfigVideoBrightness;
|
||||||
Contrast = ConfigVideoContrast;
|
Contrast = ConfigVideoContrast;
|
||||||
@ -1133,6 +1138,7 @@ void cMenuSetupSoft::Store(void)
|
|||||||
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
|
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
|
||||||
SetupStore("BlackPicture", ConfigVideoBlackPicture = BlackPicture);
|
SetupStore("BlackPicture", ConfigVideoBlackPicture = BlackPicture);
|
||||||
VideoSetBlackPicture(ConfigVideoBlackPicture);
|
VideoSetBlackPicture(ConfigVideoBlackPicture);
|
||||||
|
SetupStore("ClearOnSwitch", ConfigVideoClearOnSwitch = ClearOnSwitch);
|
||||||
|
|
||||||
SetupStore("Brightness", ConfigVideoBrightness = Brightness);
|
SetupStore("Brightness", ConfigVideoBrightness = Brightness);
|
||||||
VideoSetBrightness(ConfigVideoBrightness);
|
VideoSetBrightness(ConfigVideoBrightness);
|
||||||
@ -2852,6 +2858,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
|
|||||||
VideoSetBlackPicture(ConfigVideoBlackPicture = atoi(value));
|
VideoSetBlackPicture(ConfigVideoBlackPicture = atoi(value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (!strcasecmp(name, "ClearOnSwitch")) {
|
||||||
|
ConfigVideoClearOnSwitch = atoi(value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!strcasecmp(name, "Brightness")) {
|
if (!strcasecmp(name, "Brightness")) {
|
||||||
VideoSetBrightness(ConfigVideoBrightness = atoi(value));
|
VideoSetBrightness(ConfigVideoBrightness = atoi(value));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user