MythTV  master
Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MythVideoProfile Class Reference

#include <mythvideoprofile.h>

Inheritance diagram for MythVideoProfile:
Inheritance graph
[legend]
Collaboration diagram for MythVideoProfile:
Collaboration graph
[legend]

Signals

void DeinterlacersChanged (const QString &Single, const QString &Double)
 
void UpscalerChanged (const QString &Upscaler)
 

Public Member Functions

 MythVideoProfile ()
 
 ~MythVideoProfile () override=default
 
void SetInput (QSize Size, float Framerate=0, const QString &CodecName=QString(), const QStringList &DisallowedDecoders=QStringList())
 
void SetOutput (float Framerate)
 
float GetOutput () const
 
void SetVideoRenderer (const QString &VideoRenderer)
 
QString GetDecoder () const
 
bool IsDecoderCompatible (const QString &Decoder) const
 
uint GetMaxCPUs () const
 
bool IsSkipLoopEnabled () const
 
QString GetVideoRenderer () const
 
QString toString () const
 
QString GetSingleRatePreferences () const
 
QString GetDoubleRatePreferences () const
 
QString GetUpscaler () const
 

Static Public Member Functions

static void InitStatics (bool Reinit=false)
 
static const QList< QPair< QString, QString > > & GetDeinterlacers ()
 
static QStringList GetDecoders ()
 
static QStringList GetDecoderNames ()
 
static std::vector< std::pair< QString, QString > > GetUpscalers ()
 
static QString GetDecoderName (const QString &Decoder)
 
static QString GetDecoderHelp (const QString &Decoder=QString())
 
static QString GetVideoRendererName (const QString &Renderer)
 
static QString GetDefaultProfileName (const QString &HostName)
 
static void SetDefaultProfileName (const QString &ProfileName, const QString &HostName)
 
static uint GetProfileGroupID (const QString &ProfileName, const QString &HostName)
 
static QStringList GetProfiles (const QString &HostName)
 
static bool DeleteProfileGroup (const QString &GroupName, const QString &HostName)
 
static uint CreateProfileGroup (const QString &ProfileName, const QString &HostName)
 
static void CreateProfile (uint GroupId, uint Priority, const QString &Width, const QString &Height, const QString &Codecs, const QString &Decoder, uint MaxCpus, bool SkipLoop, const QString &VideoRenderer, const QString &Deint1, const QString &Deint2, const QString &Upscale=UPSCALE_DEFAULT)
 
static void CreateProfiles (const QString &HostName)
 
static QStringList GetVideoRenderers (const QString &Decoder)
 
static QString GetVideoRendererHelp (const QString &Renderer)
 
static QString GetPreferredVideoRenderer (const QString &Decoder)
 
static QStringList GetFilteredRenderers (const QString &Decoder, const QStringList &Renderers)
 
static QString GetBestVideoRenderer (const QStringList &Renderers)
 
static std::vector< MythVideoProfileItemLoadDB (uint GroupId)
 
static bool DeleteDB (uint GroupId, const std::vector< MythVideoProfileItem > &Items)
 
static bool SaveDB (uint GroupId, std::vector< MythVideoProfileItem > &Items)
 

Private Member Functions

std::vector< MythVideoProfileItem >::const_iterator FindMatch (QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
 
void LoadBestPreferences (QSize Size, float Framerate, const QString &CodecName, const QStringList &DisallowedDecoders=QStringList())
 
QString GetPreference (const QString &Key) const
 
void SetPreference (const QString &Key, const QString &Value)
 

Private Attributes

QRecursiveMutex m_lock
 
QSize m_lastSize { 0, 0 }
 
float m_lastRate { 0.0F }
 
QString m_lastCodecName { }
 
QMap< QString, QString > m_currentPreferences { }
 
std::vector< MythVideoProfileItemm_allowedPreferences { }
 

Static Private Attributes

static QRecursiveMutex kSafeLock
 
static bool kSafeInitialized = false
 
static QMap< QString, QStringList > kSafeRenderer = {}
 
static QMap< QString, QStringList > kSafeRendererGroup = {}
 
static QMap< QString, QStringList > kSafeEquivDec = {}
 
static QStringList kSafeCustom = {}
 
static QMap< QString, uintkSafeRendererPriority = {}
 
static QMap< QString, QString > kDecName = {}
 
static QMap< QString, QString > kRendName = {}
 
static QStringList kSafeDecoders = {}
 

Detailed Description

Definition at line 87 of file mythvideoprofile.h.

Constructor & Destructor Documentation

◆ MythVideoProfile()

MythVideoProfile::MythVideoProfile ( )

Definition at line 286 of file mythvideoprofile.cpp.

◆ ~MythVideoProfile()

MythVideoProfile::~MythVideoProfile ( )
overridedefault

Member Function Documentation

◆ DeinterlacersChanged

void MythVideoProfile::DeinterlacersChanged ( const QString &  Single,
const QString &  Double 
)
signal

Referenced by LoadBestPreferences().

◆ UpscalerChanged

void MythVideoProfile::UpscalerChanged ( const QString &  Upscaler)
signal

◆ SetInput()

void MythVideoProfile::SetInput ( QSize  Size,
float  Framerate = 0,
const QString &  CodecName = QString(),
const QStringList &  DisallowedDecoders = QStringList() 
)

Definition at line 309 of file mythvideoprofile.cpp.

Referenced by AvFormatDecoder::ScanStreams().

◆ SetOutput()

void MythVideoProfile::SetOutput ( float  Framerate)

Definition at line 334 of file mythvideoprofile.cpp.

◆ GetOutput()

float MythVideoProfile::GetOutput ( ) const

Definition at line 344 of file mythvideoprofile.cpp.

◆ SetVideoRenderer()

void MythVideoProfile::SetVideoRenderer ( const QString &  VideoRenderer)

Definition at line 384 of file mythvideoprofile.cpp.

◆ GetDecoder()

QString MythVideoProfile::GetDecoder ( ) const

Definition at line 349 of file mythvideoprofile.cpp.

Referenced by IsDecoderCompatible(), and AvFormatDecoder::ScanStreams().

◆ IsDecoderCompatible()

bool MythVideoProfile::IsDecoderCompatible ( const QString &  Decoder) const

Definition at line 397 of file mythvideoprofile.cpp.

◆ GetMaxCPUs()

uint MythVideoProfile::GetMaxCPUs ( ) const

◆ IsSkipLoopEnabled()

bool MythVideoProfile::IsSkipLoopEnabled ( ) const

Definition at line 374 of file mythvideoprofile.cpp.

Referenced by AvFormatDecoder::ScanStreams().

◆ GetVideoRenderer()

QString MythVideoProfile::GetVideoRenderer ( ) const

Definition at line 379 of file mythvideoprofile.cpp.

Referenced by SetVideoRenderer().

◆ toString()

QString MythVideoProfile::toString ( ) const

Definition at line 1287 of file mythvideoprofile.cpp.

Referenced by SetVideoRenderer().

◆ GetSingleRatePreferences()

QString MythVideoProfile::GetSingleRatePreferences ( ) const

Definition at line 354 of file mythvideoprofile.cpp.

Referenced by MythNVDECContext::SetDeinterlacing().

◆ GetDoubleRatePreferences()

QString MythVideoProfile::GetDoubleRatePreferences ( ) const

Definition at line 359 of file mythvideoprofile.cpp.

Referenced by MythNVDECContext::SetDeinterlacing().

◆ GetUpscaler()

QString MythVideoProfile::GetUpscaler ( ) const

Definition at line 364 of file mythvideoprofile.cpp.

◆ InitStatics()

void MythVideoProfile::InitStatics ( bool  Reinit = false)
static

◆ GetDeinterlacers()

const QList< QPair< QString, QString > > & MythVideoProfile::GetDeinterlacers ( )
static

◆ GetDecoders()

QStringList MythVideoProfile::GetDecoders ( )
static

◆ GetDecoderNames()

QStringList MythVideoProfile::GetDecoderNames ( )
static

Definition at line 711 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::Load().

◆ GetUpscalers()

std::vector< std::pair< QString, QString > > MythVideoProfile::GetUpscalers ( )
static

◆ GetDecoderName()

QString MythVideoProfile::GetDecoderName ( const QString &  Decoder)
static

◆ GetDecoderHelp()

QString MythVideoProfile::GetDecoderHelp ( const QString &  Decoder = QString())
static

◆ GetVideoRendererName()

QString MythVideoProfile::GetVideoRendererName ( const QString &  Renderer)
static

◆ GetDefaultProfileName()

QString MythVideoProfile::GetDefaultProfileName ( const QString &  HostName)
static

◆ SetDefaultProfileName()

void MythVideoProfile::SetDefaultProfileName ( const QString &  ProfileName,
const QString &  HostName 
)
static

◆ GetProfileGroupID()

uint MythVideoProfile::GetProfileGroupID ( const QString &  ProfileName,
const QString &  HostName 
)
static

◆ GetProfiles()

QStringList MythVideoProfile::GetProfiles ( const QString &  HostName)
static

◆ DeleteProfileGroup()

bool MythVideoProfile::DeleteProfileGroup ( const QString &  GroupName,
const QString &  HostName 
)
static

Definition at line 1020 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ CreateProfileGroup()

uint MythVideoProfile::CreateProfileGroup ( const QString &  ProfileName,
const QString &  HostName 
)
static

◆ CreateProfile()

void MythVideoProfile::CreateProfile ( uint  GroupId,
uint  Priority,
const QString &  Width,
const QString &  Height,
const QString &  Codecs,
const QString &  Decoder,
uint  MaxCpus,
bool  SkipLoop,
const QString &  VideoRenderer,
const QString &  Deint1,
const QString &  Deint2,
const QString &  Upscale = UPSCALE_DEFAULT 
)
static

Definition at line 927 of file mythvideoprofile.cpp.

Referenced by CreateProfiles().

◆ CreateProfiles()

void MythVideoProfile::CreateProfiles ( const QString &  HostName)
static

Definition at line 1072 of file mythvideoprofile.cpp.

Referenced by CurrentPlaybackProfile().

◆ GetVideoRenderers()

QStringList MythVideoProfile::GetVideoRenderers ( const QString &  Decoder)
static

◆ GetVideoRendererHelp()

QString MythVideoProfile::GetVideoRendererHelp ( const QString &  Renderer)
static

Definition at line 1217 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::vrenderChanged().

◆ GetPreferredVideoRenderer()

QString MythVideoProfile::GetPreferredVideoRenderer ( const QString &  Decoder)
static

Definition at line 1250 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::decoderChanged().

◆ GetFilteredRenderers()

QStringList MythVideoProfile::GetFilteredRenderers ( const QString &  Decoder,
const QStringList &  Renderers 
)
static

Definition at line 1255 of file mythvideoprofile.cpp.

Referenced by MythVideoOutputGPU::Create().

◆ GetBestVideoRenderer()

QString MythVideoProfile::GetBestVideoRenderer ( const QStringList &  Renderers)
static

Definition at line 1268 of file mythvideoprofile.cpp.

Referenced by MythVideoOutputGPU::Create(), and GetPreferredVideoRenderer().

◆ LoadDB()

vector< MythVideoProfileItem > MythVideoProfile::LoadDB ( uint  GroupId)
static

◆ DeleteDB()

bool MythVideoProfile::DeleteDB ( uint  GroupId,
const std::vector< MythVideoProfileItem > &  Items 
)
static

Definition at line 545 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ SaveDB()

bool MythVideoProfile::SaveDB ( uint  GroupId,
std::vector< MythVideoProfileItem > &  Items 
)
static

Definition at line 571 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ FindMatch()

vector< MythVideoProfileItem >::const_iterator MythVideoProfile::FindMatch ( QSize  Size,
float  Framerate,
const QString &  CodecName,
const QStringList &  DisallowedDecoders = QStringList() 
)
private

Definition at line 429 of file mythvideoprofile.cpp.

Referenced by LoadBestPreferences().

◆ LoadBestPreferences()

void MythVideoProfile::LoadBestPreferences ( QSize  Size,
float  Framerate,
const QString &  CodecName,
const QStringList &  DisallowedDecoders = QStringList() 
)
private

Definition at line 437 of file mythvideoprofile.cpp.

Referenced by SetInput(), and SetOutput().

◆ GetPreference()

QString MythVideoProfile::GetPreference ( const QString &  Key) const
private

◆ SetPreference()

void MythVideoProfile::SetPreference ( const QString &  Key,
const QString &  Value 
)
private

Definition at line 421 of file mythvideoprofile.cpp.

Referenced by LoadBestPreferences(), and SetVideoRenderer().

Member Data Documentation

◆ m_lock

QRecursiveMutex MythVideoProfile::m_lock
mutableprivate

◆ m_lastSize

QSize MythVideoProfile::m_lastSize { 0, 0 }
private

Definition at line 160 of file mythvideoprofile.h.

Referenced by SetInput(), and SetOutput().

◆ m_lastRate

float MythVideoProfile::m_lastRate { 0.0F }
private

Definition at line 161 of file mythvideoprofile.h.

Referenced by GetOutput(), SetInput(), and SetOutput().

◆ m_lastCodecName

QString MythVideoProfile::m_lastCodecName { }
private

Definition at line 162 of file mythvideoprofile.h.

Referenced by SetInput(), and SetOutput().

◆ m_currentPreferences

QMap<QString,QString> MythVideoProfile::m_currentPreferences { }
private

Definition at line 163 of file mythvideoprofile.h.

Referenced by GetPreference(), LoadBestPreferences(), and SetPreference().

◆ m_allowedPreferences

std::vector<MythVideoProfileItem> MythVideoProfile::m_allowedPreferences { }
private

Definition at line 164 of file mythvideoprofile.h.

Referenced by LoadBestPreferences(), and MythVideoProfile().

◆ kSafeLock

QRecursiveMutex MythVideoProfile::kSafeLock
inlinestaticprivate

◆ kSafeInitialized

bool MythVideoProfile::kSafeInitialized = false
inlinestaticprivate

Definition at line 171 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeRenderer

QMap<QString,QStringList> MythVideoProfile::kSafeRenderer = {}
inlinestaticprivate

Definition at line 172 of file mythvideoprofile.h.

Referenced by GetVideoRenderers(), and InitStatics().

◆ kSafeRendererGroup

QMap<QString,QStringList> MythVideoProfile::kSafeRendererGroup = {}
inlinestaticprivate

Definition at line 173 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeEquivDec

QMap<QString,QStringList> MythVideoProfile::kSafeEquivDec = {}
inlinestaticprivate

Definition at line 174 of file mythvideoprofile.h.

Referenced by InitStatics(), and IsDecoderCompatible().

◆ kSafeCustom

QStringList MythVideoProfile::kSafeCustom = {}
inlinestaticprivate

Definition at line 175 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeRendererPriority

QMap<QString,uint> MythVideoProfile::kSafeRendererPriority = {}
inlinestaticprivate

Definition at line 176 of file mythvideoprofile.h.

Referenced by GetBestVideoRenderer(), and InitStatics().

◆ kDecName

QMap<QString,QString> MythVideoProfile::kDecName = {}
inlinestaticprivate

Definition at line 177 of file mythvideoprofile.h.

Referenced by GetDecoderName().

◆ kRendName

QMap<QString,QString> MythVideoProfile::kRendName = {}
inlinestaticprivate

Definition at line 178 of file mythvideoprofile.h.

Referenced by GetVideoRendererName().

◆ kSafeDecoders

QStringList MythVideoProfile::kSafeDecoders = {}
inlinestaticprivate

Definition at line 179 of file mythvideoprofile.h.

Referenced by GetDecoderNames(), GetDecoders(), and InitStatics().


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