Native Player  1.0
DashManifest Class Reference

This class is responsible for parsing DASH manifest file from the given URL. More...

#include <dash_manifest.h>

Public Member Functions

 ~DashManifest ()
 Destroys DashManifest object. More...
 
std::vector< AudioStreamGetAudioStreams () const
 
std::vector< VideoStreamGetVideoStreams () const
 
std::unique_ptr< MediaSegmentSequenceGetSequence (MediaStreamType type, uint32_t id)
 
std::unique_ptr< MediaSegmentSequenceGetAudioSequence (uint32_t id)
 
std::unique_ptr< MediaSegmentSequenceGetVideoSequence (uint32_t id)
 
const std::string & GetDuration () const
 

Static Public Member Functions

static std::unique_ptr< DashManifestParseMPD (const std::string &url, ContentProtectionVisitor *visitor=nullptr)
 

Friends

template<typename T , class... Args>
std::unique_ptr< T > MakeUnique (Args &&...args)
 

Detailed Description

This class is responsible for parsing DASH manifest file from the given URL.

This class provides information about the media streams available in the DASH manifest. This class allows to:

  • Parse the DASH manifest from the given URL
  • List available information about tracks (audio/video)
  • Set/switch representation of the media stream
  • Download an init segment of representation - needed to initialize demuxer
  • Download a next segment - next chunks of media container for defined period of time parsed from the DASH manifest
  • Seek - setting timestamp for a next segment to be downloaded
  • Download segment - download a segment for the given timestamp or any other special segment, e.g. IndexSegment

For more details please refer to:

See also
MediaSegmentSequence
AudioStream
VideoStream

Definition at line 74 of file dash_manifest.h.

Constructor & Destructor Documentation

DashManifest::~DashManifest ( )

Destroys DashManifest object.

Member Function Documentation

std::unique_ptr<MediaSegmentSequence> DashManifest::GetAudioSequence ( uint32_t  id)

Provides a segment sequence for the given parameter among audio stream representations.

Parameters
[in]idAn information about which audio stream representation MediaSegmentSequence is demanded.
Returns
A MediaSegmentSequence object for the given id.
std::vector<AudioStream> DashManifest::GetAudioStreams ( ) const

Provides information about available AudioStream representations.

Returns
A vector of AudioStream representations parsed from DASH manifest.
const std::string& DashManifest::GetDuration ( ) const

Provides duration of media content in text format parsed from DASH manifest.

Note
Format of duration is xs:duration which is in the following form "PnYnMnDTnHnMnS" where:
  • P indicates the period (required)
  • nY indicates the number of years
  • nM indicates the number of months
  • nD indicates the number of days
  • T indicates the start of a time section (required if you are going to specify hours, minutes, or seconds)
  • nH indicates the number of hours
  • nM indicates the number of minutes
  • nS indicates the number of seconds
Returns
A duration of the media content in string format provided in the DASH manifest.
std::unique_ptr<MediaSegmentSequence> DashManifest::GetSequence ( MediaStreamType  type,
uint32_t  id 
)

Provides a segment sequence for the given parameters. This method calls DashManifest::GetAudioSequence or DashManifest::GetVideoSequence depending of passed type.

Parameters
[in]typeAn information about MediaStreamType for which MediaSegmentSequence will be returned.
[in]idAn information about which media stream representation MediaSegmentSequence is demanded.
Returns
A MediaSegmentSequence object for the given type and id.
std::unique_ptr<MediaSegmentSequence> DashManifest::GetVideoSequence ( uint32_t  id)

Provides a segment sequence for the given parameter among video stream representations.

Parameters
[in]idAn information about which video stream representation MediaSegmentSequence is demanded.
Returns
A MediaSegmentSequence object for the given id.
std::vector<VideoStream> DashManifest::GetVideoStreams ( ) const

Provides information about available VideoStream representations.

Returns
A vector of VideoStream representations parsed from DASH manifest.
static std::unique_ptr<DashManifest> DashManifest::ParseMPD ( const std::string &  url,
ContentProtectionVisitor visitor = nullptr 
)
static

Parses DASH manifest and creates DashManifest object from given URL.

Parameters
[in]urlA localization of the DASH manifest file
[in]visitorA ContentProtectionVisitor which is used to extract content protection information from the DASH manifest
Returns
A DashManifest object created from the DASH manifest.
An empty unique_ptr in case of an error e.g. wrong URL.

Friends And Related Function Documentation

template<typename T , class... Args>
std::unique_ptr<T> MakeUnique ( Args &&...  args)
friend

Definition at line 46 of file common.h.


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