vdr-plugin-drmdevice 2.0.0-46418f1
cDeviceConfig Class Reference

Plugin Configuration. More...

#include <config.h>

Public Member Functions

 cDeviceConfig (void)=default
 
bool SetupParse (const char *, const char *)
 Parse setup parameters.
 
void PrintLogLevel (int)
 
void SetDecoderNeedsMaxPackets (int)
 
int GetDecoderNeedsMaxPackets (void)
 
bool CompareCurrentMode (sDrmMode *)
 Return true, if the given mode is equal to the current display mode.
 

Public Attributes

bool ConfigHideMainMenuEntry = false
 config hide main menu entry
 
int ConfigVideoEnableHDR = 0
 enable HDR
 
int ConfigVideoDisplayMode = CONFIG_DISPLAY_MODE_DEFAULT
 display mode (enum ConfigDisplayModes)
 
int ConfigVideoChannelSwitchMode = CHANNEL_SWITCH_AVSYNC
 channel switch mode (enum ChannelSwitchMode)
 
bool ConfigAudioSoftvol = false
 config use software volume
 
bool ConfigAudioDownmix = false
 config ffmpeg audio downmix
 
int ConfigAudioPassthroughMask = 0
 config audio pass-through mask
 
bool ConfigAudioPassthroughState = false
 flag audio-passthrough on/off
 
int ConfigAudioAutoAES = 0
 config automatic AES handling
 
int ConfigVideoAudioDelayMs = 0
 config audio delay
 
bool ConfigAudioNormalize = false
 config use normalize volume
 
int ConfigAudioMaxNormalize = 0
 config max normalize factor
 
bool ConfigAudioCompression = false
 config use volume compression
 
int ConfigAudioMaxCompression = 0
 config max volume compression
 
int ConfigAudioStereoDescent = 0
 config reduce stereo loudness
 
int ConfigAudioEq = 0
 config equalizer filter
 
int ConfigAudioEqBand [18]
 config equalizer filter bands
 
int ConfigPipScalePercent = 25
 scale factor of pip video
 
int ConfigPipLeftPercent = 100
 0 = aligned to left, 100 = aligned to right
 
int ConfigPipTopPercent = 0
 0 = aligned to top, 100 = aligned to bottom
 
int ConfigPipUseAlt = false
 
int ConfigPipAltScalePercent = 25
 alternative scale factor of pip video
 
int ConfigPipAltLeftPercent = 0
 0 = aligned to left, 100 = aligned to right
 
int ConfigPipAltTopPercent = 0
 0 = aligned to top, 100 = aligned to bottom
 
bool ConfigLogState = true
 flag logging on/off
 
int ConfigLogLevels = 0
 loglevel config
 
int ConfigAdditionalBufferLengthMs = 0
 config size ms of a/v buffer
 
bool ConfigDisableDeint = false
 disable deinterlacer
 
bool ConfigDecoderFallbackToSw = false
 fallback to software decoder if the hardware decoder fails
 
int ConfigDecoderFallbackToSwNumPkts = 22
 maximum number of packets sent before fallback to sw decoder
 
int ConfigParseH264StreamStart = 0
 log frames at stream start up to the given number of I-Frames
 
int ConfigDropInvalidH264PFrames = 0
 drop P-Frames with invalid references on stream start up to the given number of I-Frames
 
int ConfigMaxSizeGPUImageCache = 128
 config max gpu image cache size
 
int ConfigShowChannelSwitchDurationMessage = 0
 let the skin show a short message about the channel switch duration
 
const char * ConfigAudioPCMDevice = nullptr
 audio PCM device
 
const char * ConfigAudioMixerChannel = nullptr
 audio mixer channel name
 
const char * ConfigDrmConnector = nullptr
 user requested drm connector (e.g. "HDMI-A-1")
 
const char * ConfigDrmDevice = nullptr
 user requested drm device (e.g. "/dev/dri/card0")
 
const char * ConfigDisplayResolution = nullptr
 display resolution (syntax: "1920x1080@50")
 
const char * ConfigOsdResolution = nullptr
 osd resolution (syntax: "1920x1080")
 
int ConfigDisableOglOsd = 0
 config disable ogl osd
 
const char * CurrentDecoderName = "unknown"
 current decoder name
 
const char * CurrentDecoderType = "unknown"
 current decoder type: "hardware" or "software"
 
std::atomic< int > StatMaxShortTermAudioJitterMs = 0
 logged max audio jitter of the last 1000 packets
 
std::atomic< int > StatMaxLongTermAudioJitterMs = 0
 logged max overall audio jitter since stream start
 
std::atomic< int > StatMaxShortTermVideoJitterMs = 0
 logged max video jitter of the last 1000 packets
 
std::atomic< int > StatMaxLongTermVideoJitterMs = 0
 logged max overall video jitter since stream start
 
std::vector< sDrmMode > CollectedDrmModes
 collected available drm modes on the current connector
 
sDrmMode AutoDetectedDrmMode
 auto detected mode on the first startup (maybe equal to UserSetMode)
 
sDrmMode UserSetDrmMode
 user requested drm mode on the current connector
 
sDrmMode CurrentDrmMode
 currently used drm mode on the current connector
 
sDrmMode CurrentVideoDrmMode
 currently used video drm mode
 
sDrmMode RequestedDrmMode
 is set to the requested mode which should be changed to
 

Private Attributes

int m_decoderNeedsMaxPackets = 0
 
std::mutex m_mutex
 

Detailed Description

Plugin Configuration.

Definition at line 65 of file config.h.

Constructor & Destructor Documentation

◆ cDeviceConfig()

cDeviceConfig::cDeviceConfig ( void  )
default

Member Function Documentation

◆ CompareCurrentMode()

bool cDeviceConfig::CompareCurrentMode ( sDrmMode *  newMode)

Return true, if the given mode is equal to the current display mode.

Definition at line 164 of file config.cpp.

References CurrentDrmMode, sDrmMode::height, sDrmMode::interlaced, sDrmMode::refreshRateHz, and sDrmMode::width.

Referenced by cOutputDevice::SetDisplayMode().

◆ GetDecoderNeedsMaxPackets()

int cDeviceConfig::GetDecoderNeedsMaxPackets ( void  )

Definition at line 155 of file config.cpp.

References m_decoderNeedsMaxPackets, and m_mutex.

Referenced by cDeviceSetupMenu::Create(), and cVideoStream::DecodeInput().

◆ PrintLogLevel()

void cDeviceConfig::PrintLogLevel ( int  loglevel)

◆ SetDecoderNeedsMaxPackets()

void cDeviceConfig::SetDecoderNeedsMaxPackets ( int  num)

Definition at line 149 of file config.cpp.

References m_decoderNeedsMaxPackets, and m_mutex.

Referenced by cVideoStream::DecodeInput().

◆ SetupParse()

Member Data Documentation

◆ AutoDetectedDrmMode

sDrmMode cDeviceConfig::AutoDetectedDrmMode

auto detected mode on the first startup (maybe equal to UserSetMode)

Definition at line 148 of file config.h.

Referenced by cDeviceSetupMenu::BuildDisplayModeList(), cDrmDevice::FindMode(), and cOutputDevice::SetDisplayMode().

◆ CollectedDrmModes

std::vector<sDrmMode> cDeviceConfig::CollectedDrmModes

collected available drm modes on the current connector

Definition at line 147 of file config.h.

Referenced by cDeviceSetupMenu::BuildDisplayModeList(), cDrmDevice::CanHandleMode(), cDrmDevice::Init(), and cOutputDevice::SetDisplayMode().

◆ ConfigAdditionalBufferLengthMs

int cDeviceConfig::ConfigAdditionalBufferLengthMs = 0

◆ ConfigAudioAutoAES

int cDeviceConfig::ConfigAudioAutoAES = 0

config automatic AES handling

Definition at line 84 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioCompression

bool cDeviceConfig::ConfigAudioCompression = false

config use volume compression

Definition at line 88 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioDownmix

bool cDeviceConfig::ConfigAudioDownmix = false

config ffmpeg audio downmix

Definition at line 81 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cAudioStream::Setup(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioEq

int cDeviceConfig::ConfigAudioEq = 0

config equalizer filter

Definition at line 93 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioEqBand

int cDeviceConfig::ConfigAudioEqBand[18]
Initial value:
=
{ 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 }

config equalizer filter bands

Definition at line 94 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioMaxCompression

int cDeviceConfig::ConfigAudioMaxCompression = 0

config max volume compression

Definition at line 89 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioMaxNormalize

int cDeviceConfig::ConfigAudioMaxNormalize = 0

config max normalize factor

Definition at line 87 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioMixerChannel

const char* cDeviceConfig::ConfigAudioMixerChannel = nullptr

audio mixer channel name

Definition at line 129 of file config.h.

Referenced by cPluginDrmDevice::ProcessArgs().

◆ ConfigAudioNormalize

bool cDeviceConfig::ConfigAudioNormalize = false

config use normalize volume

Definition at line 86 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioPassthroughMask

int cDeviceConfig::ConfigAudioPassthroughMask = 0

config audio pass-through mask

Definition at line 82 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioPassthroughState

bool cDeviceConfig::ConfigAudioPassthroughState = false

flag audio-passthrough on/off

Definition at line 83 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioPCMDevice

const char* cDeviceConfig::ConfigAudioPCMDevice = nullptr

audio PCM device

Definition at line 128 of file config.h.

Referenced by cPluginDrmDevice::ProcessArgs().

◆ ConfigAudioSoftvol

bool cDeviceConfig::ConfigAudioSoftvol = false

config use software volume

Definition at line 80 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigAudioStereoDescent

int cDeviceConfig::ConfigAudioStereoDescent = 0

config reduce stereo loudness

Definition at line 90 of file config.h.

Referenced by cAudioStream::cAudioStream(), cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigDecoderFallbackToSw

bool cDeviceConfig::ConfigDecoderFallbackToSw = false

fallback to software decoder if the hardware decoder fails

Definition at line 116 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoStream::cVideoStream(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigDecoderFallbackToSwNumPkts

int cDeviceConfig::ConfigDecoderFallbackToSwNumPkts = 22

maximum number of packets sent before fallback to sw decoder

Definition at line 117 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoStream::cVideoStream(), cOutputDevice::SetDecoderFallbackToSw(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigDisableDeint

bool cDeviceConfig::ConfigDisableDeint = false

disable deinterlacer

Definition at line 115 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cOutputDevice::SetDisableDeint(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigDisableOglOsd

int cDeviceConfig::ConfigDisableOglOsd = 0

◆ ConfigDisplayResolution

const char* cDeviceConfig::ConfigDisplayResolution = nullptr

display resolution (syntax: "1920x1080@50")

Definition at line 132 of file config.h.

Referenced by cPluginDrmDevice::ProcessArgs().

◆ ConfigDrmConnector

const char* cDeviceConfig::ConfigDrmConnector = nullptr

user requested drm connector (e.g. "HDMI-A-1")

Definition at line 130 of file config.h.

Referenced by cPluginDrmDevice::ProcessArgs().

◆ ConfigDrmDevice

const char* cDeviceConfig::ConfigDrmDevice = nullptr

user requested drm device (e.g. "/dev/dri/card0")

Definition at line 131 of file config.h.

Referenced by cPluginDrmDevice::ProcessArgs().

◆ ConfigDropInvalidH264PFrames

int cDeviceConfig::ConfigDropInvalidH264PFrames = 0

drop P-Frames with invalid references on stream start up to the given number of I-Frames

Definition at line 119 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoStream::OpenDecoder(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigHideMainMenuEntry

bool cDeviceConfig::ConfigHideMainMenuEntry = false

config hide main menu entry

Definition at line 72 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cPluginDrmDevice::MainMenuEntry(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigLogLevels

int cDeviceConfig::ConfigLogLevels = 0

loglevel config

Definition at line 111 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigLogState

bool cDeviceConfig::ConfigLogState = true

flag logging on/off

Definition at line 110 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigMaxSizeGPUImageCache

int cDeviceConfig::ConfigMaxSizeGPUImageCache = 128

config max gpu image cache size

Definition at line 121 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cOutputDevice::MaxSizeGPUImageCache(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigOsdResolution

const char* cDeviceConfig::ConfigOsdResolution = nullptr

osd resolution (syntax: "1920x1080")

Definition at line 133 of file config.h.

Referenced by cDrmDevice::cDrmDevice(), and cPluginDrmDevice::ProcessArgs().

◆ ConfigParseH264StreamStart

int cDeviceConfig::ConfigParseH264StreamStart = 0

log frames at stream start up to the given number of I-Frames

Definition at line 118 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoStream::OpenDecoder(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipAltLeftPercent

int cDeviceConfig::ConfigPipAltLeftPercent = 0

0 = aligned to left, 100 = aligned to right

Definition at line 106 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipAltScalePercent

int cDeviceConfig::ConfigPipAltScalePercent = 25

alternative scale factor of pip video

Definition at line 105 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipAltTopPercent

int cDeviceConfig::ConfigPipAltTopPercent = 0

0 = aligned to top, 100 = aligned to bottom

Definition at line 107 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipLeftPercent

int cDeviceConfig::ConfigPipLeftPercent = 100

0 = aligned to left, 100 = aligned to right

Definition at line 101 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipScalePercent

int cDeviceConfig::ConfigPipScalePercent = 25

scale factor of pip video

Definition at line 100 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipTopPercent

int cDeviceConfig::ConfigPipTopPercent = 0

0 = aligned to top, 100 = aligned to bottom

Definition at line 102 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::SetPipSize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigPipUseAlt

◆ ConfigShowChannelSwitchDurationMessage

int cDeviceConfig::ConfigShowChannelSwitchDurationMessage = 0

let the skin show a short message about the channel switch duration

Definition at line 123 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cVideoRender::DisplayFrame(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigVideoAudioDelayMs

◆ ConfigVideoChannelSwitchMode

int cDeviceConfig::ConfigVideoChannelSwitchMode = CHANNEL_SWITCH_AVSYNC

channel switch mode (enum ChannelSwitchMode)

Definition at line 77 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), cOutputDevice::Initialize(), SetupParse(), and cDeviceSetupMenu::Store().

◆ ConfigVideoDisplayMode

int cDeviceConfig::ConfigVideoDisplayMode = CONFIG_DISPLAY_MODE_DEFAULT

◆ ConfigVideoEnableHDR

int cDeviceConfig::ConfigVideoEnableHDR = 0

enable HDR

Definition at line 75 of file config.h.

Referenced by cDeviceSetupMenu::cDeviceSetupMenu(), SetupParse(), and cDeviceSetupMenu::Store().

◆ CurrentDecoderName

const char* cDeviceConfig::CurrentDecoderName = "unknown"

current decoder name

Definition at line 141 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cVideoStream::OpenDecoder().

◆ CurrentDecoderType

const char* cDeviceConfig::CurrentDecoderType = "unknown"

current decoder type: "hardware" or "software"

Definition at line 142 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cVideoStream::OpenDecoder().

◆ CurrentDrmMode

sDrmMode cDeviceConfig::CurrentDrmMode

currently used drm mode on the current connector

Definition at line 150 of file config.h.

Referenced by cDeviceSetupMenu::BuildDisplayModeList(), CompareCurrentMode(), and cDrmDevice::FindMode().

◆ CurrentVideoDrmMode

sDrmMode cDeviceConfig::CurrentVideoDrmMode

currently used video drm mode

Definition at line 151 of file config.h.

Referenced by cVideoStream::RenderFrame(), and cOutputDevice::SetDisplayMode().

◆ m_decoderNeedsMaxPackets

int cDeviceConfig::m_decoderNeedsMaxPackets = 0
private

Definition at line 162 of file config.h.

Referenced by GetDecoderNeedsMaxPackets(), and SetDecoderNeedsMaxPackets().

◆ m_mutex

std::mutex cDeviceConfig::m_mutex
private

Definition at line 163 of file config.h.

Referenced by GetDecoderNeedsMaxPackets(), and SetDecoderNeedsMaxPackets().

◆ RequestedDrmMode

sDrmMode cDeviceConfig::RequestedDrmMode

is set to the requested mode which should be changed to

Definition at line 152 of file config.h.

Referenced by cDrmDevice::cDrmDevice(), cOutputDevice::HandleDisplayModeChange(), and cDrmDevice::ReInit().

◆ StatMaxLongTermAudioJitterMs

std::atomic<int> cDeviceConfig::StatMaxLongTermAudioJitterMs = 0

logged max overall audio jitter since stream start

Definition at line 144 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cOutputDevice::PlayAudio().

◆ StatMaxLongTermVideoJitterMs

std::atomic<int> cDeviceConfig::StatMaxLongTermVideoJitterMs = 0

logged max overall video jitter since stream start

Definition at line 146 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cOutputDevice::PlayVideoInternal().

◆ StatMaxShortTermAudioJitterMs

std::atomic<int> cDeviceConfig::StatMaxShortTermAudioJitterMs = 0

logged max audio jitter of the last 1000 packets

Definition at line 143 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cOutputDevice::PlayAudio().

◆ StatMaxShortTermVideoJitterMs

std::atomic<int> cDeviceConfig::StatMaxShortTermVideoJitterMs = 0

logged max video jitter of the last 1000 packets

Definition at line 145 of file config.h.

Referenced by cDeviceSetupMenu::Create(), and cOutputDevice::PlayVideoInternal().

◆ UserSetDrmMode

sDrmMode cDeviceConfig::UserSetDrmMode

user requested drm mode on the current connector

Definition at line 149 of file config.h.

Referenced by cDrmDevice::cDrmDevice(), cPluginDrmDevice::ProcessArgs(), and cDrmDevice::ReInit().


The documentation for this class was generated from the following files: