Shaka Packager SDK
Loading...
Searching...
No Matches
master_playlist.h
1// Copyright 2016 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#ifndef PACKAGER_HLS_BASE_MASTER_PLAYLIST_H_
8#define PACKAGER_HLS_BASE_MASTER_PLAYLIST_H_
9
10#include <filesystem>
11#include <list>
12#include <string>
13#include <vector>
14
15namespace shaka {
16namespace hls {
17
18class MediaPlaylist;
19
20struct CeaCaption {
21 std::string name;
22 std::string language;
23 std::string channel;
24 bool is_default = false;
25 bool autoselect = true;
26};
27
31 public:
37 MasterPlaylist(const std::filesystem::path& file_name,
38 const std::string& default_audio_language,
39 const std::string& default_text_language,
40 const std::vector<CeaCaption>& closed_captions,
41 const bool is_independent_segments,
42 const bool create_session_keys = false);
43 virtual ~MasterPlaylist();
44
54 virtual bool WriteMasterPlaylist(const std::string& base_url,
55 const std::string& output_dir,
56 const std::list<MediaPlaylist*>& playlists);
57
58 private:
59 MasterPlaylist(const MasterPlaylist&) = delete;
60 MasterPlaylist& operator=(const MasterPlaylist&) = delete;
61
62 std::string written_playlist_;
63 const std::filesystem::path file_name_;
64 const std::string default_audio_language_;
65 const std::string default_text_language_;
66 const std::vector<CeaCaption> closed_captions_;
67 bool is_independent_segments_;
68 bool create_session_keys_;
69};
70
71} // namespace hls
72} // namespace shaka
73
74#endif // PACKAGER_HLS_BASE_MASTER_PLAYLIST_H_
virtual bool WriteMasterPlaylist(const std::string &base_url, const std::string &output_dir, const std::list< MediaPlaylist * > &playlists)
All the methods that are virtual are virtual for mocking.