MythTV  master
Functions
DLNA Namespace Reference

Helpers for building DLNA flag, strings and profiles. More...

Functions

QString DLNAProfileName (const QString &mimeType, const QSize &resolution=QSize(), const double videoFrameRate=0.0, const QString &container="", const QString &vidCodec="", const QString &audioCodec="")
 Try to determine a valid DLNA profile name for the file based on the supplied metadata. More...
 
QString DLNAFourthField (UPNPProtocol::TransferProtocol protocol, const QString &mimeType, const QSize &resolution, const double videoFrameRate, const QString &container, const QString &vidCodec, const QString &audioCodec, bool isTranscoded)
 Create a properly formatted string for the 4th field of res@protocolInfo. More...
 
QString ProtocolInfoString (UPNPProtocol::TransferProtocol protocol, const QString &mimeType, const QSize &resolution=QSize(), const double videoFrameRate=0.0, const QString &container="", const QString &vidCodec="", const QString &audioCodec="", bool isTranscoded=false)
 Create a properly formatted string for the 4th field of res@protocolInfo. More...
 
QString FlagsString (uint32_t flags)
 Convert an integer composed of DNLA_Flags to a properly formatted string for use in XML. More...
 
QString OpParamString (UPNPProtocol::TransferProtocol protocol)
 Create a properly formatted Operations Parameter (op-param) string for the given transport protocol based on what is supported by MythTV. More...
 
QString ConversionIndicatorString (bool wasConverted)
 Create a properly formatted Conversion Indicator (ci-param) String. More...
 

Detailed Description

Helpers for building DLNA flag, strings and profiles.

NOTE These are for formatting to the DLNA related specs or extracting data from DLNA formatted strings ONLY.

Function Documentation

◆ DLNAProfileName()

UPNP_PUBLIC QString DLNA::DLNAProfileName ( const QString &  mimeType,
const QSize &  resolution = QSize(),
const double  videoFrameRate = 0.0,
const QString &  container = "",
const QString &  vidCodec = "",
const QString &  audioCodec = "" 
)

Try to determine a valid DLNA profile name for the file based on the supplied metadata.

MM protocolInfo values: 4th field

Section 7.4.1.3.17

Definition at line 111 of file upnphelpers.cpp.

Referenced by DLNAFourthField().

◆ DLNAFourthField()

UPNP_PUBLIC QString DLNA::DLNAFourthField ( UPNPProtocol::TransferProtocol  protocol,
const QString &  mimeType,
const QSize &  resolution,
const double  videoFrameRate,
const QString &  container,
const QString &  vidCodec,
const QString &  audioCodec,
bool  isTranscoded 
)

Create a properly formatted string for the 4th field of res@protocolInfo.

MM protocolInfo values: 4th field

Section 7.4.1.3.17

The order of values in the string is mandatory, so using this helper will ensure compliance

Definition at line 247 of file upnphelpers.cpp.

Referenced by ProtocolInfoString().

◆ ProtocolInfoString()

UPNP_PUBLIC QString DLNA::ProtocolInfoString ( UPNPProtocol::TransferProtocol  protocol,
const QString &  mimeType,
const QSize &  resolution = QSize(),
const double  videoFrameRate = 0.0,
const QString &  container = "",
const QString &  vidCodec = "",
const QString &  audioCodec = "",
bool  isTranscoded = false 
)

Create a properly formatted string for the 4th field of res@protocolInfo.

MM protocolInfo values: 4th field

Section 7.4.1.3.17

The order of values in the string is mandatory, so using this helper will ensure compliance

Definition at line 326 of file upnphelpers.cpp.

Referenced by UPnpCDSTv::LoadRecordings(), UPnpCDSMusic::LoadTracks(), UPnpCDSVideo::LoadVideos(), UPnpCDSVideo::PopulateArtworkURIS(), and UPnpCDSTv::PopulateArtworkURIS().

◆ FlagsString()

UPNP_PUBLIC QString DLNA::FlagsString ( uint32_t  flags)

Convert an integer composed of DNLA_Flags to a properly formatted string for use in XML.

DLNA.ORG_FLAGS - MM flags-param (flags parameter)

Section 7.4.1.3.24.1

Definition at line 376 of file upnphelpers.cpp.

Referenced by DLNAFourthField(), and GetSourceProtocolInfos().

◆ OpParamString()

UPNP_PUBLIC QString DLNA::OpParamString ( UPNPProtocol::TransferProtocol  protocol)

Create a properly formatted Operations Parameter (op-param) string for the given transport protocol based on what is supported by MythTV.

DLNA.ORG_OP - op-param (Operations Parameter for HTTP)

Section 7.4.1.3.20

DLNA.ORG_OP - op-param (Operations Parameter for RTP)

Section 7.4.1.3.21

Definition at line 398 of file upnphelpers.cpp.

Referenced by DLNAFourthField().

◆ ConversionIndicatorString()

UPNP_PUBLIC QString DLNA::ConversionIndicatorString ( bool  wasConverted)

Create a properly formatted Conversion Indicator (ci-param) String.

DLNA.ORG_CI - ci-param (conversion indicator flag)

Section 7.4.1.3.23

Indicates whether the file was converted from the original (transcoded) and is therefore of lower quality. It is used by clients to pick between two different versions of the same video when they exist. Currently this does not apply to MythTV but it may do in the future.

Definition at line 418 of file upnphelpers.cpp.

Referenced by DLNAFourthField().