Skip to content

Commit

Permalink
Get rid of ClearOnSwitch, BlackPicture, and AudioAppendAES configurat…
Browse files Browse the repository at this point in the history
…ion parameters.
  • Loading branch information
rofafor authored and pesintta committed Mar 4, 2018
1 parent 2bbca44 commit dfe5a20
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 81 deletions.
8 changes: 0 additions & 8 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ Setup: /etc/vdr/setup.conf
0 disable soft start of audio/video sync
1 enable soft start of audio/video sync

vaapidevice.BlackPicture = 0
0 disable black picture during channel switch
1 enable black picture during channel switch

vaapidevice.ClearOnSwitch = 0
0 keep video und audio buffers during channel switch
1 clear video and audio buffers on channel switch

vaapidevice.Video4to3DisplayFormat = 1
0 pan and scan
1 letter box
Expand Down
15 changes: 0 additions & 15 deletions audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ static const char *AudioModuleName; ///< which audio module to use
static const AudioModule *AudioUsedModule = &NoopModule;
static const char *AudioPCMDevice; ///< PCM device name
static const char *AudioPassthroughDevice; ///< Passthrough device name
static char AudioAppendAES; ///< flag automatic append AES
static const char *AudioMixerDevice; ///< mixer device name
static const char *AudioMixerChannel; ///< mixer channel name
static char AudioDoingInit; ///> flag in init, reduce error
Expand Down Expand Up @@ -2059,20 +2058,6 @@ void AudioSetChannel(const char *channel)
AudioMixerChannel = channel;
}

/**
** Set automatic AES flag handling.
**
** @param onoff turn setting AES flag on or off
*/
void AudioSetAutoAES(int onoff)
{
if (onoff < 0) {
AudioAppendAES ^= 1;
} else {
AudioAppendAES = onoff;
}
}

/**
** Initialize audio output module.
**
Expand Down
1 change: 0 additions & 1 deletion audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ extern void AudioSetDevice(const char *); ///< set PCM audio device
/// set pass-through device
extern void AudioSetPassthroughDevice(const char *);
extern void AudioSetChannel(const char *); ///< set mixer channel
extern void AudioSetAutoAES(int); ///< set automatic AES flag handling
extern void AudioInit(void); ///< setup audio module
extern void AudioExit(void); ///< cleanup and exit audio module

Expand Down
9 changes: 0 additions & 9 deletions po/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ msgstr "60Hz Anzeigemodus"
msgid "Soft start a/v sync"
msgstr "Sanftanlauf A/V Sync"

msgid "Black during channel switch"
msgstr "Schwarz während Kanalwechsel"

msgid "Clear decoder on channel switch"
msgstr "Decoder bei Kanalwechsel leeren"

#, c-format
msgid "Brightness (%d..[%d]..%d)"
msgstr "Helligkeit (%d..[%d]..%d)"
Expand Down Expand Up @@ -176,9 +170,6 @@ msgstr "Reduziere Steropegel (/1000)"
msgid "Audio buffer size (ms)"
msgstr "Audio Puffergröße (ms)"

msgid "Enable automatic AES"
msgstr "Aktiviere automatiche AES"

msgid "Detach VA-API Device"
msgstr ""

Expand Down
3 changes: 1 addition & 2 deletions vaapidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ static int ValidateMpeg(const uint8_t * data, int size);
//////////////////////////////////////////////////////////////////////////////

extern int ConfigAudioBufferTime; ///< config size ms of audio buffer
extern int ConfigVideoClearOnSwitch; ///< clear decoder on channel switch
char ConfigStartX11Server; ///< flag start the x11 server
static signed char ConfigStartSuspended; ///< flag to start in suspend mode
static char ConfigFullscreen; ///< fullscreen modus
Expand Down Expand Up @@ -2202,7 +2201,7 @@ int SetPlayMode(int play_mode)
// tell video parser we get new stream
if (MyVideoStream->Decoder && !MyVideoStream->SkipStream) {
// clear buffers on close configured always or replay only
if (ConfigVideoClearOnSwitch || MyVideoStream->ClearClose) {
if (MyVideoStream->ClearClose) {
Clear(); // flush all buffers
MyVideoStream->ClearClose = 0;
}
Expand Down
30 changes: 0 additions & 30 deletions vaapidevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ static uint32_t ConfigVideoBackground; ///< config video background color
static char ConfigVideoStudioLevels; ///< config use studio levels
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
static char ConfigVideoSoftStartSync; ///< config use softstart sync
static char ConfigVideoBlackPicture; ///< config enable black picture mode
char ConfigVideoClearOnSwitch; ///< config enable Clear on channel switch

static int ConfigVideoBrightness; ///< config video brightness
static int ConfigVideoContrast = 1000; ///< config video contrast
Expand Down Expand Up @@ -114,7 +112,6 @@ static char ConfigAudioCompression; ///< config use volume compression
static int ConfigAudioMaxCompression; ///< config max volume compression
static int ConfigAudioStereoDescent; ///< config reduce stereo loudness
int ConfigAudioBufferTime; ///< config size ms of audio buffer
static int ConfigAudioAutoAES; ///< config automatic AES handling

static char *ConfigX11Display; ///< config x11 display
static char *ConfigAudioDevice; ///< config audio stereo device
Expand Down Expand Up @@ -565,8 +562,6 @@ class cMenuSetupSoft:public cMenuSetupPage
int StudioLevels;
int _60HzMode;
int SoftStartSync;
int BlackPicture;
int ClearOnSwitch;

int Brightness;
int Contrast;
Expand Down Expand Up @@ -601,7 +596,6 @@ class cMenuSetupSoft:public cMenuSetupPage
int AudioMaxCompression;
int AudioStereoDescent;
int AudioBufferTime;
int AudioAutoAES;

/// @}
private:
Expand Down Expand Up @@ -719,8 +713,6 @@ void cMenuSetupSoft::Create(void)
Add(new cMenuEditIntItem(tr("Video background color (Alpha)"), (int *)&BackgroundAlpha, 0, 0xFF));
Add(new cMenuEditBoolItem(tr("60hz display mode"), &_60HzMode, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Black during channel switch"), &BlackPicture, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Clear decoder on channel switch"), &ClearOnSwitch, trVDR("no"), trVDR("yes")));

if (brightness_active)
Add(new cMenuEditIntItem(*cString::sprintf(tr("Brightness (%d..[%d]..%d)"), brightness_min, brightness_def,
Expand Down Expand Up @@ -790,7 +782,6 @@ void cMenuSetupSoft::Create(void)
Add(new cMenuEditIntItem(tr(" Max compression factor (/1000)"), &AudioMaxCompression, 0, 10000));
Add(new cMenuEditIntItem(tr("Reduce stereo volume (/1000)"), &AudioStereoDescent, 0, 1000));
Add(new cMenuEditIntItem(tr("Audio buffer size (ms)"), &AudioBufferTime, 0, 1000));
Add(new cMenuEditBoolItem(tr("Enable automatic AES"), &AudioAutoAES, trVDR("no"), trVDR("yes")));
}

SetCurrent(Get(current)); // restore selected menu entry
Expand Down Expand Up @@ -899,8 +890,6 @@ cMenuSetupSoft::cMenuSetupSoft(void)
StudioLevels = ConfigVideoStudioLevels;
_60HzMode = ConfigVideo60HzMode;
SoftStartSync = ConfigVideoSoftStartSync;
BlackPicture = ConfigVideoBlackPicture;
ClearOnSwitch = ConfigVideoClearOnSwitch;

Brightness = ConfigVideoBrightness;
Contrast = ConfigVideoContrast;
Expand Down Expand Up @@ -943,7 +932,6 @@ cMenuSetupSoft::cMenuSetupSoft(void)
AudioMaxCompression = ConfigAudioMaxCompression;
AudioStereoDescent = ConfigAudioStereoDescent;
AudioBufferTime = ConfigAudioBufferTime;
AudioAutoAES = ConfigAudioAutoAES;

Create();
}
Expand Down Expand Up @@ -991,9 +979,6 @@ void cMenuSetupSoft::Store(void)
VideoSet60HzMode(ConfigVideo60HzMode);
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
VideoSetSoftStartSync(ConfigVideoSoftStartSync);
SetupStore("BlackPicture", ConfigVideoBlackPicture = BlackPicture);
VideoSetBlackPicture(ConfigVideoBlackPicture);
SetupStore("ClearOnSwitch", ConfigVideoClearOnSwitch = ClearOnSwitch);

SetupStore("Brightness", ConfigVideoBrightness = Brightness);
VideoSetBrightness(ConfigVideoBrightness);
Expand Down Expand Up @@ -1070,8 +1055,6 @@ void cMenuSetupSoft::Store(void)
SetupStore("AudioStereoDescent", ConfigAudioStereoDescent = AudioStereoDescent);
AudioSetStereoDescent(ConfigAudioStereoDescent);
SetupStore("AudioBufferTime", ConfigAudioBufferTime = AudioBufferTime);
SetupStore("AudioAutoAES", ConfigAudioAutoAES = AudioAutoAES);
AudioSetAutoAES(ConfigAudioAutoAES);
}

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -2146,14 +2129,6 @@ bool cPluginVaapiDevice::SetupParse(const char *name, const char *value)
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
return true;
}
if (!strcasecmp(name, "BlackPicture")) {
VideoSetBlackPicture(ConfigVideoBlackPicture = atoi(value));
return true;
}
if (!strcasecmp(name, "ClearOnSwitch")) {
ConfigVideoClearOnSwitch = atoi(value);
return true;
}
if (!strcasecmp(name, "Brightness")) {
VideoSetBrightness(ConfigVideoBrightness = atoi(value));
return true;
Expand Down Expand Up @@ -2289,11 +2264,6 @@ bool cPluginVaapiDevice::SetupParse(const char *name, const char *value)
AudioSetBufferTime(ConfigAudioBufferTime);
return true;
}
if (!strcasecmp(name, "AudioAutoAES")) {
ConfigAudioAutoAES = atoi(value);
AudioSetAutoAES(ConfigAudioAutoAES);
return true;
}
return false;
}

Expand Down
15 changes: 2 additions & 13 deletions video.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ static VideoZoomModes VideoOtherZoomMode;
static char Video60HzMode; ///< handle 60hz displays
static char VideoSoftStartSync; ///< soft start sync audio/video
static const int VideoSoftStartFrames = 100; ///< soft start frames
static char VideoShowBlackPicture; ///< flag show black picture

static xcb_atom_t WmDeleteWindowAtom; ///< WM delete message atom
static xcb_atom_t NetWmState; ///< wm-state message atom
Expand Down Expand Up @@ -3634,8 +3633,8 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
err =
VaapiMessage(1, "video: decoder buffer empty, duping frame (%d/%d) %d v-buf", decoder->FramesDuped,
decoder->FrameCounter, VideoGetBuffers(decoder->Stream));
// some time no new picture or black video configured
if (decoder->Closing < -300 || (VideoShowBlackPicture && decoder->Closing)) {
// some time no new picture
if (decoder->Closing < -300) {
// clear ring buffer to trigger black picture
atomic_set(&decoder->SurfacesFilled, 0);
}
Expand Down Expand Up @@ -4957,16 +4956,6 @@ void VideoSetSoftStartSync(int onoff)
VideoSoftStartSync = onoff;
}

///
/// Set show black picture during channel switch.
///
/// @param onoff enable / disable black picture.
///
void VideoSetBlackPicture(int onoff)
{
VideoShowBlackPicture = onoff;
}

///
/// Vaapi helper to set various video params (brightness, contrast etc.)
///
Expand Down
3 changes: 0 additions & 3 deletions video.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ extern void VideoSet60HzMode(int);
/// Set soft start audio/video sync.
extern void VideoSetSoftStartSync(int);

/// Set show black picture during channel switch.
extern void VideoSetBlackPicture(int);

/// Set brightness adjustment.
extern void VideoSetBrightness(int);

Expand Down

0 comments on commit dfe5a20

Please sign in to comment.