MythTV  master
Enumerations | Functions
DLNA Namespace Reference

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

Enumerations

enum  DLNA_Flags {
  ksp_flag = 0x80000000, klop_npt = 0x40000000, klop_bytes = 0x20000000, kplaycontainer_param = 0x10000000,
  ks0_increasing = 0x8000000, ksn_increasing = 0x4000000, krtsp_pause = 0x2000000, ktm_s = 0x1000000,
  ktm_i = 0x800000, ktm_b = 0x400000, khttp_stalling = 0x200000, kv1_5_flag = 0x100000,
  kLP_flag = 0x10000, kcleartextbyteseek_full = 0x8000, klop_cleartextbytes = 0x4000
}
 DLNA FLAGS. More...
 

Functions

QString DLNAProfileName (const QString &mimeType, QSize resolution=QSize(), 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, QSize resolution, 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, QSize resolution=QSize(), 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.

Enumeration Type Documentation

◆ DLNA_Flags

DLNA FLAGS.

DLNA Guidelines March 2014 Part 1.1 Architectures and Protocols Section 7.4.1.3.24 MM flags-param (flags parameter) Subsection 2

Binary bit flags

NOTE There are some interdependencies between certain flags and some are mutally exclusive. FlagsString() should account for these but care should still be taken. Read the DLNA documentation.

Enumerator
ksp_flag 
klop_npt 
klop_bytes 
kplaycontainer_param 
ks0_increasing 
ksn_increasing 
krtsp_pause 
ktm_s 
ktm_i 
ktm_b 
khttp_stalling 
kv1_5_flag 
kLP_flag 
kcleartextbyteseek_full 
klop_cleartextbytes 

Definition at line 224 of file upnphelpers.h.

Function Documentation

◆ DLNAProfileName()

UPNP_PUBLIC QString DLNA::DLNAProfileName ( const QString &  mimeType,
QSize  resolution = QSize(),
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 100 of file upnphelpers.cpp.

Referenced by DLNAFourthField().

◆ DLNAFourthField()

UPNP_PUBLIC QString DLNA::DLNAFourthField ( UPNPProtocol::TransferProtocol  protocol,
const QString &  mimeType,
QSize  resolution,
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 236 of file upnphelpers.cpp.

Referenced by ProtocolInfoString().

◆ ProtocolInfoString()

UPNP_PUBLIC QString DLNA::ProtocolInfoString ( UPNPProtocol::TransferProtocol  protocol,
const QString &  mimeType,
QSize  resolution = QSize(),
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 315 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 367 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 389 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 409 of file upnphelpers.cpp.

Referenced by DLNAFourthField().