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
15#include "packager/cea_caption.h"
16
17namespace shaka {
18namespace hls {
19
20class MediaPlaylist;
21
25 public:
31 MasterPlaylist(const std::filesystem::path& file_name,
32 const std::string& default_audio_language,
33 const std::string& default_text_language,
34 const std::vector<CeaCaption>& closed_captions,
35 const bool is_independent_segments,
36 const bool create_session_keys = false);
37 virtual ~MasterPlaylist();
38
48 virtual bool WriteMasterPlaylist(const std::string& base_url,
49 const std::string& output_dir,
50 const std::list<MediaPlaylist*>& playlists);
51
52 private:
53 MasterPlaylist(const MasterPlaylist&) = delete;
54 MasterPlaylist& operator=(const MasterPlaylist&) = delete;
55
56 std::string written_playlist_;
57 const std::filesystem::path file_name_;
58 const std::string default_audio_language_;
59 const std::string default_text_language_;
60 const std::vector<CeaCaption> closed_captions_;
61 bool is_independent_segments_;
62 bool create_session_keys_;
63};
64
65} // namespace hls
66} // namespace shaka
67
68#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.