vdr-plugin-softhddevice-drm-gles 1.6.8-daba64b
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;
122#ifdef USE_GLES
124#endif
126
127 //
128 // command line parameters
129 //
130 const char *ConfigAudioPCMDevice = nullptr;
131 const char *ConfigAudioMixerChannel = nullptr;
132 const char *ConfigDrmConnector = nullptr;
133 const char *ConfigDrmDevice = nullptr;
134 const char *ConfigDisplayResolution = nullptr;
135 const char *ConfigOsdResolution = nullptr;
136#ifdef USE_GLES
138#endif
139
140 //
141 // runtime stats
142 //
143 const char *CurrentDecoderName = "unknown";
144 const char *CurrentDecoderType = "unknown";
145 std::atomic<int> StatMaxShortTermAudioJitterMs = 0;
146 std::atomic<int> StatMaxLongTermAudioJitterMs = 0;
147 std::atomic<int> StatMaxShortTermVideoJitterMs = 0;
148 std::atomic<int> StatMaxLongTermVideoJitterMs = 0;
149 std::vector<sDrmMode> CollectedDrmModes;
155
156 cSoftHdConfig(void) = default;
157 bool SetupParse(const char *, const char *);
158 void PrintLogLevel(int);
162
163private:
165 std::mutex m_mutex;
166};
167
168#endif
Plugin Configuration.
Definition config.h:65
bool ConfigParseH264Dimensions
parse h264 stream for width and height for decoder init
Definition config.h:119
sDrmMode RequestedDrmMode
is set to the requested mode which should be changed to
Definition config.h:154
const char * ConfigDrmDevice
user requested drm device (e.g. "/dev/dri/card0")
Definition config.h:133
int ConfigVideoAudioDelayMs
config audio delay
Definition config.h:85
const char * ConfigDisplayResolution
display resolution (syntax: "1920x1080@50")
Definition config.h:134
std::atomic< int > StatMaxLongTermAudioJitterMs
logged max overall audio jitter since stream start
Definition config.h:146
void PrintLogLevel(int)
Definition config.cpp:113
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:123
int m_decoderNeedsMaxPackets
Definition config.h:164
std::atomic< int > StatMaxShortTermAudioJitterMs
logged max audio jitter of the last 1000 packets
Definition config.h:145
int ConfigParseH264StreamStart
log frames at stream start up to the given number of I-Frames
Definition config.h:120
int ConfigDecoderFallbackToSwNumPkts
maximum number of packets sent before fallback to sw decoder
Definition config.h:117
void SetDecoderNeedsMaxPackets(int)
Definition config.cpp:151
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:130
std::vector< sDrmMode > CollectedDrmModes
collected available drm modes on the current connector
Definition config.h:149
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:137
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:144
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:131
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:166
std::atomic< int > StatMaxShortTermVideoJitterMs
logged max video jitter of the last 1000 packets
Definition config.h:147
int ConfigShowChannelSwitchDurationMessage
let the skin show a short message about the channel switch duration
Definition config.h:125
const char * ConfigDrmConnector
user requested drm connector (e.g. "HDMI-A-1")
Definition config.h:132
int ConfigPipTopPercent
0 = aligned to top, 100 = aligned to bottom
Definition config.h:102
bool ConfigDecoderNeedsIFrame
start h264 decoder only when an I-Frame arrives
Definition config.h:118
sDrmMode AutoDetectedDrmMode
auto detected mode on the first startup (maybe equal to UserSetMode)
Definition config.h:150
const char * CurrentDecoderName
current decoder name
Definition config.h:143
bool ConfigDecoderFallbackToSw
fallback to software decoder if the hardware decoder fails
Definition config.h:116
int GetDecoderNeedsMaxPackets(void)
Definition config.cpp:157
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:135
std::mutex m_mutex
Definition config.h:165
std::atomic< int > StatMaxLongTermVideoJitterMs
logged max overall video jitter since stream start
Definition config.h:148
sDrmMode UserSetDrmMode
user requested drm mode on the current connector
Definition config.h:151
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:153
int ConfigAudioMaxNormalize
config max normalize factor
Definition config.h:87
sDrmMode CurrentDrmMode
currently used drm mode on the current connector
Definition config.h:152
int ConfigDropInvalidH264PFrames
drop P-Frames with invalid references on stream start up to the given number of I-Frames
Definition config.h:121
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