vdr-plugin-softhddevice-drm-gles 1.6.7
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
43
50public:
51 //
52 // setup.conf parameters
53 //
54
55 // General
57
58 // Video
61
62 // Audio
63 bool ConfigAudioSoftvol = false;
64 bool ConfigAudioDownmix = false;
69 bool ConfigAudioNormalize = false;
74
75 // Audio Equalizer
76 int ConfigAudioEq = 0;
78 { 0, 0, 0, 0, 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0, 0, 0, 0, 0 };
80
81 // PiP
82 // default position at right top, 25% scaled
86 int ConfigPipUseAlt = false;
87 // alternative position at left top, 25% scaled
91
92 // Logging
93 bool ConfigLogState = true;
95
96 // Expert Settings
98 bool ConfigDisableDeint = false;
105#ifdef USE_GLES
107#endif
109
110 //
111 // command line parameters
112 //
113 const char *ConfigAudioPCMDevice = nullptr;
114 const char *ConfigAudioMixerChannel = nullptr;
115 const char *ConfigDrmConnector = nullptr;
116 const char *ConfigDrmDevice = nullptr;
117 const char *ConfigDisplayResolution = nullptr;
118 const char *ConfigOsdResolution = nullptr;
119#ifdef USE_GLES
121#endif
122
123 //
124 // runtime stats
125 //
126 const char *CurrentDecoderName = "unknown";
127 const char *CurrentDecoderType = "unknown";
128 std::atomic<int> StatMaxShortTermAudioJitterMs = 0;
129 std::atomic<int> StatMaxLongTermAudioJitterMs = 0;
130 std::atomic<int> StatMaxShortTermVideoJitterMs = 0;
131 std::atomic<int> StatMaxLongTermVideoJitterMs = 0;
132 std::vector<sDrmMode> CollectedDrmModes;
138
139 cSoftHdConfig(void) = default;
140 bool SetupParse(const char *, const char *);
141 void PrintLogLevel(int);
145
146private:
148 std::mutex m_mutex;
149};
150
151#endif
Plugin Configuration.
Definition config.h:49
bool ConfigParseH264Dimensions
parse h264 stream for width and height for decoder init
Definition config.h:102
sDrmMode RequestedDrmMode
is set to the requested mode which should be changed to
Definition config.h:137
const char * ConfigDrmDevice
user requested drm device (e.g. "/dev/dri/card0")
Definition config.h:116
int ConfigVideoAudioDelayMs
config audio delay
Definition config.h:68
const char * ConfigDisplayResolution
display resolution (syntax: "1920x1080@50")
Definition config.h:117
std::atomic< int > StatMaxLongTermAudioJitterMs
logged max overall audio jitter since stream start
Definition config.h:129
void PrintLogLevel(int)
Definition config.cpp:112
int ConfigVideoDisplayMode
display mode (enum ConfigDisplayMode)
Definition config.h:60
bool ConfigLogState
flag logging on/off
Definition config.h:93
bool ConfigAudioNormalize
config use normalize volume
Definition config.h:69
int ConfigAudioAutoAES
config automatic AES handling
Definition config.h:67
int ConfigAudioStereoDescent
config reduce stereo loudness
Definition config.h:73
int ConfigMaxSizeGPUImageCache
config max gpu image cache size
Definition config.h:106
int m_decoderNeedsMaxPackets
Definition config.h:147
std::atomic< int > StatMaxShortTermAudioJitterMs
logged max audio jitter of the last 1000 packets
Definition config.h:128
int ConfigParseH264StreamStart
log frames at stream start up to the given number of I-Frames
Definition config.h:103
int ConfigDecoderFallbackToSwNumPkts
maximum number of packets sent before fallback to sw decoder
Definition config.h:100
void SetDecoderNeedsMaxPackets(int)
Definition config.cpp:150
bool ConfigAudioCompression
config use volume compression
Definition config.h:71
bool ConfigAudioPassthroughState
flag audio-passthrough on/off
Definition config.h:66
const char * ConfigAudioPCMDevice
audio PCM device
Definition config.h:113
std::vector< sDrmMode > CollectedDrmModes
collected available drm modes on the current connector
Definition config.h:132
bool ConfigAudioSoftvol
config use software volume
Definition config.h:63
bool ConfigDisableDeint
disable deinterlacer
Definition config.h:98
int ConfigVideoEnableHDR
enable HDR
Definition config.h:59
int ConfigDisableOglOsd
config disable ogl osd
Definition config.h:120
int ConfigPipAltTopPercent
0 = aligned to top, 100 = aligned to bottom
Definition config.h:90
const char * CurrentDecoderType
current decoder type: "hardware" or "software"
Definition config.h:127
int ConfigAudioEqBand[18]
config equalizer filter bands
Definition config.h:77
int ConfigPipLeftPercent
0 = aligned to left, 100 = aligned to right
Definition config.h:84
int ConfigAdditionalBufferLengthMs
config size ms of a/v buffer
Definition config.h:97
int ConfigAudioMaxCompression
config max volume compression
Definition config.h:72
cSoftHdConfig(void)=default
int ConfigPipAltLeftPercent
0 = aligned to left, 100 = aligned to right
Definition config.h:89
int ConfigLogLevels
loglevel config
Definition config.h:94
const char * ConfigAudioMixerChannel
audio mixer channel name
Definition config.h:114
int ConfigPipAltScalePercent
alternative scale factor of pip video
Definition config.h:88
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:165
std::atomic< int > StatMaxShortTermVideoJitterMs
logged max video jitter of the last 1000 packets
Definition config.h:130
int ConfigShowChannelSwitchDurationMessage
let the skin show a short message about the channel switch duration
Definition config.h:108
const char * ConfigDrmConnector
user requested drm connector (e.g. "HDMI-A-1")
Definition config.h:115
int ConfigPipTopPercent
0 = aligned to top, 100 = aligned to bottom
Definition config.h:85
bool ConfigDecoderNeedsIFrame
start h264 decoder only when an I-Frame arrives
Definition config.h:101
sDrmMode AutoDetectedDrmMode
auto detected mode on the first startup (maybe equal to UserSetMode)
Definition config.h:133
const char * CurrentDecoderName
current decoder name
Definition config.h:126
bool ConfigDecoderFallbackToSw
fallback to software decoder if the hardware decoder fails
Definition config.h:99
int GetDecoderNeedsMaxPackets(void)
Definition config.cpp:156
int ConfigAudioEq
config equalizer filter
Definition config.h:76
int ConfigPipScalePercent
scale factor of pip video
Definition config.h:83
int ConfigPipUseAlt
Definition config.h:86
int ConfigAudioPassthroughMask
config audio pass-through mask
Definition config.h:65
const char * ConfigOsdResolution
osd resolution (syntax: "1920x1080")
Definition config.h:118
std::mutex m_mutex
Definition config.h:148
std::atomic< int > StatMaxLongTermVideoJitterMs
logged max overall video jitter since stream start
Definition config.h:131
sDrmMode UserSetDrmMode
user requested drm mode on the current connector
Definition config.h:134
bool ConfigHideMainMenuEntry
config hide main menu entry
Definition config.h:56
bool ConfigAudioDownmix
config ffmpeg audio downmix
Definition config.h:64
sDrmMode CurrentVideoDrmMode
currently used video drm mode
Definition config.h:136
int ConfigAudioMaxNormalize
config max normalize factor
Definition config.h:70
sDrmMode CurrentDrmMode
currently used drm mode on the current connector
Definition config.h:135
int ConfigDropInvalidH264PFrames
drop P-Frames with invalid references on stream start up to the given number of I-Frames
Definition config.h:104
ConfigDisplayModes
Definition config.h:37
@ CONFIG_DISPLAY_MODE_DEFAULT
Definition config.h:38
@ CONFIG_DISPLAY_MODE_FOLLOW_VIDEO_INTERLACED
Definition config.h:40
@ CONFIG_DISPLAY_MODE_FOLLOW_VIDEO
Definition config.h:39
@ CONFIG_DISPLAY_MODE_MANUAL
Definition config.h:41
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