Shaka Packager SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
hls_notifier.h
1 // Copyright 2016 Google Inc. 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_HLS_NOTIFIER_H_
8 #define PACKAGER_HLS_BASE_HLS_NOTIFIER_H_
9 
10 #include <string>
11 #include <vector>
12 
13 #include "packager/hls/public/hls_params.h"
14 #include "packager/mpd/base/media_info.pb.h"
15 
16 namespace shaka {
17 namespace hls {
18 
19 // TODO(rkuroiwa): Consider merging this with MpdNotifier.
20 class HlsNotifier {
21  public:
23  : playlist_type_(playlist_type) {}
24  virtual ~HlsNotifier() {}
25 
28  virtual bool Init() = 0;
29 
39  virtual bool NotifyNewStream(const MediaInfo& media_info,
40  const std::string& playlist_name,
41  const std::string& stream_name,
42  const std::string& group_id,
43  uint32_t* stream_id) = 0;
44 
53  virtual bool NotifyNewSegment(uint32_t stream_id,
54  const std::string& segment_name,
55  uint64_t start_time,
56  uint64_t duration,
57  uint64_t start_byte_offset,
58  uint64_t size) = 0;
59 
68  virtual bool NotifyEncryptionUpdate(
69  uint32_t stream_id,
70  const std::vector<uint8_t>& key_id,
71  const std::vector<uint8_t>& system_id,
72  const std::vector<uint8_t>& iv,
73  const std::vector<uint8_t>& protection_system_specific_data) = 0;
74 
77  virtual bool Flush() = 0;
78 
80  HlsPlaylistType playlist_type() const { return playlist_type_; }
81 
82  private:
83  HlsPlaylistType playlist_type_;
84 };
85 
86 } // namespace hls
87 } // namespace shaka
88 
89 #endif // PACKAGER_HLS_BASE_HLS_NOTIFIER_H_
virtual bool Init()=0
HlsPlaylistType
Definition: hls_params.h:16
virtual bool Flush()=0
virtual bool NotifyNewSegment(uint32_t stream_id, const std::string &segment_name, uint64_t start_time, uint64_t duration, uint64_t start_byte_offset, uint64_t size)=0
virtual bool NotifyNewStream(const MediaInfo &media_info, const std::string &playlist_name, const std::string &stream_name, const std::string &group_id, uint32_t *stream_id)=0
HlsPlaylistType playlist_type() const
Definition: hls_notifier.h:80
virtual bool NotifyEncryptionUpdate(uint32_t stream_id, const std::vector< uint8_t > &key_id, const std::vector< uint8_t > &system_id, const std::vector< uint8_t > &iv, const std::vector< uint8_t > &protection_system_specific_data)=0