DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
edash_packager::MpdBuilder Class Reference

This class generates DASH MPDs (Media Presentation Descriptions). More...

#include <mpd_builder.h>

Inheritance diagram for edash_packager::MpdBuilder:
edash_packager::MockMpdBuilder

Public Types

enum  MpdType { kStatic = 0, kDynamic }
 

Public Member Functions

 MpdBuilder (MpdType type, const MpdOptions &mpd_options)
 
void AddBaseUrl (const std::string &base_url)
 
virtual AdaptationSetAddAdaptationSet (const std::string &lang)
 
bool WriteMpdToFile (media::File *output_file)
 
virtual bool ToString (std::string *output)
 
MpdType type () const
 

Static Public Member Functions

static void MakePathsRelativeToMpd (const std::string &mpd_path, MediaInfo *media_info)
 

Friends

class DynamicMpdBuilderTest
 

Detailed Description

This class generates DASH MPDs (Media Presentation Descriptions).

Definition at line 56 of file mpd_builder.h.

Constructor & Destructor Documentation

edash_packager::MpdBuilder::MpdBuilder ( MpdType  type,
const MpdOptions mpd_options 
)

Constructs MpdBuilder.

Parameters
typeindicates whether the MPD should be for VOD or live content (kStatic for VOD profile, or kDynamic for live profile).

Definition at line 380 of file mpd_builder.cc.

Member Function Documentation

AdaptationSet * edash_packager::MpdBuilder::AddAdaptationSet ( const std::string &  lang)
virtual

Adds <AdaptationSet> to the MPD.

Parameters
langis the language of the AdaptationSet. This can be empty for videos, for example.
Returns
The new adaptation set, which is owned by this instance.

Definition at line 392 of file mpd_builder.cc.

void edash_packager::MpdBuilder::AddBaseUrl ( const std::string &  base_url)

Add <BaseURL> entry to the MPD.

Parameters
base_urlURL for <BaseURL> entry.

Definition at line 387 of file mpd_builder.cc.

void edash_packager::MpdBuilder::MakePathsRelativeToMpd ( const std::string &  mpd_path,
MediaInfo *  media_info 
)
static

Adjusts the fields of MediaInfo so that paths are relative to the specified MPD path.

Parameters
mpd_pathis the file path of the MPD file.
media_infois the MediaInfo object to be updated with relative paths.

Definition at line 608 of file mpd_builder.cc.

bool edash_packager::MpdBuilder::ToString ( std::string *  output)
virtual

Writes the MPD to the given string.

Parameters
[out]outputis an output string where the MPD gets written.
Returns
true on success, false otherwise.

Definition at line 410 of file mpd_builder.cc.

MpdType edash_packager::MpdBuilder::type ( ) const
inline
Returns
The mpd type.

Definition at line 91 of file mpd_builder.h.

bool edash_packager::MpdBuilder::WriteMpdToFile ( media::File output_file)

Write the MPD to specified file.

Parameters
[out]output_fileis MPD destination. output_file will be flushed but not closed.
Returns
true on success, false otherwise.

Definition at line 404 of file mpd_builder.cc.


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