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 <libmythtv/mythvideoprofile.h>

Inheritance diagram for MythVideoProfile:
[legend]
Collaboration diagram for MythVideoProfile:
[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 83 of file mythvideoprofile.h.

Constructor & Destructor Documentation

◆ MythVideoProfile()

MythVideoProfile::MythVideoProfile ( )

Definition at line 298 of file mythvideoprofile.cpp.

◆ ~MythVideoProfile()

MythVideoProfile::~MythVideoProfile ( )
overridedefault

Member Function Documentation

◆ 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 939 of file mythvideoprofile.cpp.

Referenced by CreateProfiles().

◆ CreateProfileGroup()

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

◆ CreateProfiles()

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

Definition at line 1084 of file mythvideoprofile.cpp.

Referenced by CurrentPlaybackProfile().

◆ DeinterlacersChanged

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

Referenced by LoadBestPreferences().

◆ DeleteDB()

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

Definition at line 557 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ DeleteProfileGroup()

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

Definition at line 1032 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ FindMatch()

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

Definition at line 440 of file mythvideoprofile.cpp.

Referenced by LoadBestPreferences().

◆ GetBestVideoRenderer()

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

Definition at line 1280 of file mythvideoprofile.cpp.

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

◆ GetDecoder()

QString MythVideoProfile::GetDecoder ( void  ) const

◆ GetDecoderHelp()

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

◆ GetDecoderName()

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

◆ GetDecoderNames()

QStringList MythVideoProfile::GetDecoderNames ( )
static

Definition at line 723 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::Load().

◆ GetDecoders()

QStringList MythVideoProfile::GetDecoders ( )
static

◆ GetDefaultProfileName()

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

◆ GetDeinterlacers()

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

◆ GetDoubleRatePreferences()

QString MythVideoProfile::GetDoubleRatePreferences ( ) const

Definition at line 371 of file mythvideoprofile.cpp.

Referenced by MythNVDECContext::SetDeinterlacing().

◆ GetFilteredRenderers()

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

Definition at line 1267 of file mythvideoprofile.cpp.

Referenced by MythVideoOutputGPU::Create().

◆ GetMaxCPUs()

uint MythVideoProfile::GetMaxCPUs ( ) const

◆ GetOutput()

float MythVideoProfile::GetOutput ( ) const

Definition at line 356 of file mythvideoprofile.cpp.

◆ GetPreference()

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

◆ GetPreferredVideoRenderer()

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

Definition at line 1262 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::decoderChanged().

◆ GetProfileGroupID()

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

◆ GetProfiles()

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

◆ GetSingleRatePreferences()

QString MythVideoProfile::GetSingleRatePreferences ( ) const

Definition at line 366 of file mythvideoprofile.cpp.

Referenced by MythNVDECContext::SetDeinterlacing().

◆ GetUpscaler()

QString MythVideoProfile::GetUpscaler ( ) const

Definition at line 376 of file mythvideoprofile.cpp.

◆ GetUpscalers()

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

◆ GetVideoRenderer()

QString MythVideoProfile::GetVideoRenderer ( ) const

Definition at line 391 of file mythvideoprofile.cpp.

Referenced by SetVideoRenderer().

◆ GetVideoRendererHelp()

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

Definition at line 1229 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileItemConfig::vrenderChanged().

◆ GetVideoRendererName()

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

◆ GetVideoRenderers()

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

◆ InitStatics()

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

◆ IsDecoderCompatible()

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

Definition at line 409 of file mythvideoprofile.cpp.

◆ IsSkipLoopEnabled()

bool MythVideoProfile::IsSkipLoopEnabled ( ) const

Definition at line 386 of file mythvideoprofile.cpp.

Referenced by AvFormatDecoder::autoSelectVideoTrack().

◆ LoadBestPreferences()

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

Definition at line 449 of file mythvideoprofile.cpp.

Referenced by SetInput(), and SetOutput().

◆ LoadDB()

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

◆ SaveDB()

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

Definition at line 583 of file mythvideoprofile.cpp.

Referenced by PlaybackProfileConfig::Save().

◆ SetDefaultProfileName()

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

◆ SetInput()

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

Definition at line 321 of file mythvideoprofile.cpp.

Referenced by AvFormatDecoder::autoSelectVideoTrack().

◆ SetOutput()

void MythVideoProfile::SetOutput ( float  Framerate)

Definition at line 346 of file mythvideoprofile.cpp.

◆ SetPreference()

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

Definition at line 433 of file mythvideoprofile.cpp.

Referenced by LoadBestPreferences(), and SetVideoRenderer().

◆ SetVideoRenderer()

void MythVideoProfile::SetVideoRenderer ( const QString &  VideoRenderer)

Definition at line 396 of file mythvideoprofile.cpp.

◆ toString()

QString MythVideoProfile::toString ( void  ) const

Definition at line 1299 of file mythvideoprofile.cpp.

Referenced by SetVideoRenderer().

◆ UpscalerChanged

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

Member Data Documentation

◆ kDecName

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

Definition at line 165 of file mythvideoprofile.h.

Referenced by GetDecoderName().

◆ kRendName

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

Definition at line 166 of file mythvideoprofile.h.

Referenced by GetVideoRendererName().

◆ kSafeCustom

QStringList MythVideoProfile::kSafeCustom = {}
inlinestaticprivate

Definition at line 163 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeDecoders

QStringList MythVideoProfile::kSafeDecoders = {}
inlinestaticprivate

Definition at line 167 of file mythvideoprofile.h.

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

◆ kSafeEquivDec

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

Definition at line 162 of file mythvideoprofile.h.

Referenced by InitStatics(), and IsDecoderCompatible().

◆ kSafeInitialized

bool MythVideoProfile::kSafeInitialized = false
inlinestaticprivate

Definition at line 159 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeLock

QRecursiveMutex MythVideoProfile::kSafeLock
inlinestaticprivate

◆ kSafeRenderer

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

Definition at line 160 of file mythvideoprofile.h.

Referenced by GetVideoRenderers(), and InitStatics().

◆ kSafeRendererGroup

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

Definition at line 161 of file mythvideoprofile.h.

Referenced by InitStatics().

◆ kSafeRendererPriority

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

Definition at line 164 of file mythvideoprofile.h.

Referenced by GetBestVideoRenderer(), and InitStatics().

◆ m_allowedPreferences

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

Definition at line 156 of file mythvideoprofile.h.

Referenced by FindMatch(), LoadBestPreferences(), and MythVideoProfile().

◆ m_currentPreferences

QMap<QString,QString> MythVideoProfile::m_currentPreferences
private

Definition at line 155 of file mythvideoprofile.h.

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

◆ m_lastCodecName

QString MythVideoProfile::m_lastCodecName
private

Definition at line 154 of file mythvideoprofile.h.

Referenced by SetInput(), and SetOutput().

◆ m_lastRate

float MythVideoProfile::m_lastRate { 0.0F }
private

Definition at line 153 of file mythvideoprofile.h.

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

◆ m_lastSize

QSize MythVideoProfile::m_lastSize { 0, 0 }
private

Definition at line 152 of file mythvideoprofile.h.

Referenced by SetInput(), and SetOutput().

◆ m_lock

QRecursiveMutex MythVideoProfile::m_lock
mutableprivate

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