Shaka Packager SDK
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 shaka {
18 
19 class MockMpdNotifier : public MpdNotifier {
20  public:
21  explicit MockMpdNotifier(const MpdOptions& mpd_options);
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_METHOD2(NotifyCueEvent, bool(uint32_t container_id, uint64_t timestamp));
35  MOCK_METHOD4(NotifyEncryptionUpdate,
36  bool(uint32_t container_id,
37  const std::string& drm_uuid,
38  const std::vector<uint8_t>& new_key_id,
39  const std::vector<uint8_t>& new_pssh));
40  MOCK_METHOD2(NotifyMediaInfoUpdate,
41  bool(uint32_t container_id, const MediaInfo& media_info));
42  MOCK_METHOD0(Flush, bool());
43 };
44 
45 } // namespace shaka
46 
47 #endif // MPD_BASE_MOCK_MPD_NOTIFIER_H_
virtual bool NotifyNewSegment(uint32_t container_id, uint64_t start_time, uint64_t duration, uint64_t size)=0
virtual bool NotifyMediaInfoUpdate(uint32_t container_id, const MediaInfo &media_info)=0
virtual bool NotifySampleDuration(uint32_t container_id, uint32_t sample_duration)=0
virtual bool NotifyCueEvent(uint32_t container_id, uint64_t timestamp)=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
virtual bool Init()=0
virtual bool NotifyNewContainer(const MediaInfo &media_info, uint32_t *container_id)=0
virtual bool Flush()=0
All the methods that are virtual are virtual for mocking.
Defines Mpd Options.
Definition: mpd_options.h:25