Shaka Packager SDK
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 
14 namespace shaka {
15 namespace hls {
16 
17 class MediaPlaylist;
18 
22  public:
28  MasterPlaylist(const std::filesystem::path& file_name,
29  const std::string& default_audio_language,
30  const std::string& default_text_language,
31  const bool is_independent_segments,
32  const bool create_session_keys = false);
33  virtual ~MasterPlaylist();
34 
44  virtual bool WriteMasterPlaylist(const std::string& base_url,
45  const std::string& output_dir,
46  const std::list<MediaPlaylist*>& playlists);
47 
48  private:
49  MasterPlaylist(const MasterPlaylist&) = delete;
50  MasterPlaylist& operator=(const MasterPlaylist&) = delete;
51 
52  std::string written_playlist_;
53  const std::filesystem::path file_name_;
54  const std::string default_audio_language_;
55  const std::string default_text_language_;
56  bool is_independent_segments_;
57  bool create_session_keys_;
58 };
59 
60 } // namespace hls
61 } // namespace shaka
62 
63 #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)
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)
All the methods that are virtual are virtual for mocking.
Definition: crypto_flags.cc:66