DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs
mock_mpd_notifier.h
1 // Copyright 2015 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 MPD_BASE_MOCK_MPD_NOTIFIER_H_
8 #define MPD_BASE_MOCK_MPD_NOTIFIER_H_
9 
10 #include "packager/mpd/base/mpd_notifier.h"
11 
12 #include <gmock/gmock.h>
13 
14 #include "packager/mpd/base/content_protection_element.h"
15 #include "packager/mpd/base/media_info.pb.h"
16 
17 namespace edash_packager {
18 
19 class MockMpdNotifier : public MpdNotifier {
20  public:
21  MockMpdNotifier(DashProfile profile);
22  virtual ~MockMpdNotifier();
23 
24  MOCK_METHOD0(Init, bool());
25  MOCK_METHOD2(NotifyNewContainer,
26  bool(const MediaInfo& media_info, uint32_t* container_id));
27  MOCK_METHOD2(NotifySampleDuration,
28  bool(uint32_t container_id, uint32_t sample_duration));
29  MOCK_METHOD4(NotifyNewSegment,
30  bool(uint32_t container_id,
31  uint64_t start_time,
32  uint64_t duration,
33  uint64_t size));
34  MOCK_METHOD4(NotifyEncryptionUpdate,
35  bool(uint32_t container_id,
36  const std::string& drm_uuid,
37  const std::vector<uint8_t>& new_key_id,
38  const std::vector<uint8_t>& new_pssh));
39  MOCK_METHOD2(
41  bool(uint32_t container_id,
42  const ContentProtectionElement& content_protection_element));
43  MOCK_METHOD0(Flush, bool());
44 };
45 
46 } // namespace edash_packager
47 
48 #endif // MPD_BASE_MOCK_MPD_NOTIFIER_H_
virtual bool AddContentProtectionElement(uint32_t container_id, const ContentProtectionElement &content_protection_element)=0
virtual bool NotifyNewContainer(const MediaInfo &media_info, uint32_t *container_id)=0
virtual bool NotifySampleDuration(uint32_t container_id, uint32_t sample_duration)=0
virtual bool NotifyNewSegment(uint32_t container_id, uint64_t start_time, uint64_t duration, uint64_t size)=0
virtual bool NotifyEncryptionUpdate(uint32_t container_id, const std::string &drm_uuid, const std::vector< uint8_t > &new_key_id, const std::vector< uint8_t > &new_pssh)=0