Shaka Packager SDK
Public Member Functions | List of all members
shaka::hls::MasterPlaylist Class Reference

#include <master_playlist.h>

Public Member Functions

 MasterPlaylist (const std::filesystem::path &file_name, const std::string &default_audio_language, const std::string &default_text_language, const bool is_independent_segments, const bool create_session_keys=false)
 
virtual bool WriteMasterPlaylist (const std::string &base_url, const std::string &output_dir, const std::list< MediaPlaylist * > &playlists)
 

Detailed Description

Class to generate HLS Master Playlist. Methods are virtual for mocking.

Definition at line 21 of file master_playlist.h.

Constructor & Destructor Documentation

◆ MasterPlaylist()

shaka::hls::MasterPlaylist::MasterPlaylist ( const std::filesystem::path &  file_name,
const std::string &  default_audio_language,
const std::string &  default_text_language,
const bool  is_independent_segments,
const bool  create_session_keys = false 
)
Parameters
file_nameis the file name of the master playlist.
default_audio_languagedetermines the audio rendition that should be tagged with 'DEFAULT'.
default_text_languagedetermines the text rendition that should be tagged with 'DEFAULT'.

Definition at line 550 of file master_playlist.cc.

Member Function Documentation

◆ WriteMasterPlaylist()

bool shaka::hls::MasterPlaylist::WriteMasterPlaylist ( const std::string &  base_url,
const std::string &  output_dir,
const std::list< MediaPlaylist * > &  playlists 
)
virtual

Writes Master Playlist to output_dir + <name of playlist>. This assumes that base_url is used as the prefix for Media Playlists.

Parameters
base_urlis the prefix for the Media Playlist files. This should be in URI form such that base_url+file_name is a valid HLS URI.
output_diris where the playlist files are written. This is not necessarily the same as base_url. It must be in a form that File interface can open.
Returns
true if the playlist is updated successfully or there is no difference since the last write, false otherwise.

Definition at line 563 of file master_playlist.cc.


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