vdr-plugin-softhddevice-drm-gles 1.7.3-98a2ef7
config.h
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-or-later
2
13#ifndef __SOFTHDCONFIG_H
14#define __SOFTHDCONFIG_H
15
16#include <atomic>
17#include <mutex>
18#include <vector>
19
30struct sDrmMode {
31 int width = 0;
32 int height = 0;
33 double refreshRateHz = 0.0;
34 bool interlaced = false;
35};
36
48
59
66public:
67 //
68 // setup.conf parameters
69 //
70
71 // General
73
74 // Video
78
79 // Audio
80 bool ConfigAudioSoftvol = false;
81 bool ConfigAudioDownmix = false;
86 bool ConfigAudioNormalize = false;
91
92 // Audio Equalizer
93 int ConfigAudioEq = 0;
95 { 0, 0, 0, 0, 0, 0, 0, 0, 0,
96 0, 0, 0, 0, 0, 0, 0, 0, 0 };
97
98 // PiP
99 // default position at right top, 25% scaled
103 int ConfigPipUseAlt = false;
104 // alternative position at left top, 25% scaled
108
109 // Logging
110 bool ConfigLogState = true;
112
113 // Expert Settings
115 bool ConfigDisableDeint = false;
120#ifdef USE_GLES
122#endif
124
125 //
126 // command line parameters
127 //
128 const char *ConfigAudioPCMDevice = nullptr;
129 const char *ConfigAudioMixerChannel = nullptr;
130 const char *ConfigDrmConnector = nullptr;
131 const char *ConfigDrmDevice = nullptr;
132 const char *ConfigDisplayResolution = nullptr;
133 const char *ConfigOsdResolution = nullptr;
134#ifdef USE_GLES
136#endif
137
138 //
139 // runtime stats
140 //
141 const char *CurrentDecoderName = "unknown";
142 const char *CurrentDecoderType = "unknown";
143 std::atomic<int> StatMaxShortTermAudioJitterMs = 0;
144 std::atomic<int> StatMaxLongTermAudioJitterMs = 0;
145 std::atomic<int> StatMaxShortTermVideoJitterMs = 0;
146 std::atomic<int> StatMaxLongTermVideoJitterMs = 0;
147 std::vector<sDrmMode> CollectedDrmModes;
153
154 cSoftHdConfig(void) = default;
155 bool SetupParse(const char *, const char *);
156 void PrintLogLevel(int);
160
161private:
163 std::mutex m_mutex;
164};
165
166#endif
Plugin Configuration.
Definition config.h:65
sDrmMode RequestedDrmMode
is set to the requested mode which should be changed to
Definition config.h:152
const char * ConfigDrmDevice
user requested drm device (e.g. "/dev/dri/card0")
Definition config.h:131
int ConfigVideoAudioDelayMs
config audio delay
Definition config.h:85
const char * ConfigDisplayResolution
display resolution (syntax: "1920x1080@50")
Definition config.h:132
std::atomic< int > StatMaxLongTermAudioJitterMs
logged max overall audio jitter since stream start
Definition config.h:144
void PrintLogLevel(int)
Definition config.cpp:111
int ConfigVideoDisplayMode
display mode (enum ConfigDisplayModes)
Definition config.h:76
bool ConfigLogState
flag logging on/off
Definition config.h:110
bool ConfigAudioNormalize
config use normalize volume
Definition config.h:86
int ConfigAudioAutoAES
config automatic AES handling
Definition config.h:84
int ConfigVideoChannelSwitchMode
channel switch mode (enum ChannelSwitchMode)
Definition config.h:77
int ConfigAudioStereoDescent
config reduce stereo loudness
Definition config.h:90
int ConfigMaxSizeGPUImageCache
config max gpu image cache size
Definition config.h:121
int m_decoderNeedsMaxPackets
Definition config.h:162
std::atomic< int > StatMaxShortTermAudioJitterMs
logged max audio jitter of the last 1000 packets
Definition config.h:143
int ConfigParseH264StreamStart
log frames at stream start up to the given number of I-Frames
Definition config.h:118
int ConfigDecoderFallbackToSwNumPkts
maximum number of packets sent before fallback to sw decoder
Definition config.h:117
void SetDecoderNeedsMaxPackets(int)
Definition config.cpp:149
bool ConfigAudioCompression
config use volume compression
Definition config.h:88
bool ConfigAudioPassthroughState
flag audio-passthrough on/off
Definition config.h:83
const char * ConfigAudioPCMDevice
audio PCM device
Definition config.h:128
std::vector< sDrmMode > CollectedDrmModes
collected available drm modes on the current connector
Definition config.h:147
bool ConfigAudioSoftvol
config use software volume
Definition config.h:80
bool ConfigDisableDeint
disable deinterlacer
Definition config.h:115
int ConfigVideoEnableHDR
enable HDR
Definition config.h:75
int ConfigDisableOglOsd
config disable ogl osd
Definition config.h:135
int ConfigPipAltTopPercent
0 = aligned to top, 100 = aligned to bottom
Definition config.h:107
const char * CurrentDecoderType
current decoder type: "hardware" or "software"
Definition config.h:142
int ConfigAudioEqBand[18]
config equalizer filter bands
Definition config.h:94
int ConfigPipLeftPercent
0 = aligned to left, 100 = aligned to right
Definition config.h:101
int ConfigAdditionalBufferLengthMs
config size ms of a/v buffer
Definition config.h:114
int ConfigAudioMaxCompression
config max volume compression
Definition config.h:89
cSoftHdConfig(void)=default
int ConfigPipAltLeftPercent
0 = aligned to left, 100 = aligned to right
Definition config.h:106
int ConfigLogLevels
loglevel config
Definition config.h:111
const char * ConfigAudioMixerChannel
audio mixer channel name
Definition config.h:129
int ConfigPipAltScalePercent
alternative scale factor of pip video
Definition config.h:105
bool SetupParse(const char *, const char *)
Parse setup parameters.
Definition config.cpp:33
bool CompareCurrentMode(sDrmMode *)
Return true, if the given mode is equal to the current display mode.
Definition config.cpp:164
std::atomic< int > StatMaxShortTermVideoJitterMs
logged max video jitter of the last 1000 packets
Definition config.h:145
int ConfigShowChannelSwitchDurationMessage
let the skin show a short message about the channel switch duration
Definition config.h:123
const char * ConfigDrmConnector
user requested drm connector (e.g. "HDMI-A-1")
Definition config.h:130
int ConfigPipTopPercent
0 = aligned to top, 100 = aligned to bottom
Definition config.h:102
sDrmMode AutoDetectedDrmMode
auto detected mode on the first startup (maybe equal to UserSetMode)
Definition config.h:148
const char * CurrentDecoderName
current decoder name
Definition config.h:141
bool ConfigDecoderFallbackToSw
fallback to software decoder if the hardware decoder fails
Definition config.h:116
int GetDecoderNeedsMaxPackets(void)
Definition config.cpp:155
int ConfigAudioEq
config equalizer filter
Definition config.h:93
int ConfigPipScalePercent
scale factor of pip video
Definition config.h:100
int ConfigPipUseAlt
Definition config.h:103
int ConfigAudioPassthroughMask
config audio pass-through mask
Definition config.h:82
const char * ConfigOsdResolution
osd resolution (syntax: "1920x1080")
Definition config.h:133
std::mutex m_mutex
Definition config.h:163
std::atomic< int > StatMaxLongTermVideoJitterMs
logged max overall video jitter since stream start
Definition config.h:146
sDrmMode UserSetDrmMode
user requested drm mode on the current connector
Definition config.h:149
bool ConfigHideMainMenuEntry
config hide main menu entry
Definition config.h:72
bool ConfigAudioDownmix
config ffmpeg audio downmix
Definition config.h:81
sDrmMode CurrentVideoDrmMode
currently used video drm mode
Definition config.h:151
int ConfigAudioMaxNormalize
config max normalize factor
Definition config.h:87
sDrmMode CurrentDrmMode
currently used drm mode on the current connector
Definition config.h:150
int ConfigDropInvalidH264PFrames
drop P-Frames with invalid references on stream start up to the given number of I-Frames
Definition config.h:119
ChannelSwitchMode
Channel switch modes.
Definition config.h:54
@ CHANNEL_SWITCH_FAST_VIDEO
Definition config.h:56
@ CHANNEL_SWITCH_AVSYNC
Definition config.h:55
@ CHANNEL_SWITCH_FAST_AUDIO
Definition config.h:57
ConfigDisplayModes
Display modes.
Definition config.h:42
@ CONFIG_DISPLAY_MODE_DEFAULT
Definition config.h:43
@ CONFIG_DISPLAY_MODE_FOLLOW_VIDEO_INTERLACED
Definition config.h:45
@ CONFIG_DISPLAY_MODE_FOLLOW_VIDEO
Definition config.h:44
@ CONFIG_DISPLAY_MODE_MANUAL
Definition config.h:46
Holds possible display configurations.
Definition config.h:30
int width
display width
Definition config.h:31
bool interlaced
is this an interlaced mode?
Definition config.h:34
int height
display height
Definition config.h:32
double refreshRateHz
display refresh rate
Definition config.h:33