2022-08-26 15:44:59 +00:00
|
|
|
// Copyright 2015 Google LLC. All rights reserved.
|
2015-09-14 19:53:32 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
|
|
|
#ifndef MPD_BASE_MOCK_MPD_NOTIFIER_H_
|
|
|
|
#define MPD_BASE_MOCK_MPD_NOTIFIER_H_
|
|
|
|
|
2023-10-10 23:51:11 +00:00
|
|
|
#include <packager/mpd/base/mpd_notifier.h>
|
2015-09-14 19:53:32 +00:00
|
|
|
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
|
2023-10-10 23:51:11 +00:00
|
|
|
#include <packager/mpd/base/content_protection_element.h>
|
|
|
|
#include <packager/mpd/base/media_info.pb.h>
|
2015-09-14 19:53:32 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2015-09-14 19:53:32 +00:00
|
|
|
|
|
|
|
class MockMpdNotifier : public MpdNotifier {
|
|
|
|
public:
|
2016-12-21 23:28:56 +00:00
|
|
|
explicit MockMpdNotifier(const MpdOptions& mpd_options);
|
2015-09-22 23:17:22 +00:00
|
|
|
virtual ~MockMpdNotifier();
|
2015-09-14 19:53:32 +00:00
|
|
|
|
|
|
|
MOCK_METHOD0(Init, bool());
|
|
|
|
MOCK_METHOD2(NotifyNewContainer,
|
|
|
|
bool(const MediaInfo& media_info, uint32_t* container_id));
|
|
|
|
MOCK_METHOD2(NotifySampleDuration,
|
2021-08-04 18:56:44 +00:00
|
|
|
bool(uint32_t container_id, int32_t sample_duration));
|
2015-09-14 19:53:32 +00:00
|
|
|
MOCK_METHOD4(NotifyNewSegment,
|
|
|
|
bool(uint32_t container_id,
|
2021-08-04 18:56:44 +00:00
|
|
|
int64_t start_time,
|
|
|
|
int64_t duration,
|
2015-09-14 19:53:32 +00:00
|
|
|
uint64_t size));
|
2021-09-03 16:57:43 +00:00
|
|
|
MOCK_METHOD3(NotifyCompletedSegment,
|
|
|
|
bool(uint32_t container_id, int64_t duration, uint64_t size));
|
2021-08-25 15:38:05 +00:00
|
|
|
MOCK_METHOD1(NotifyAvailabilityTimeOffset, bool(uint32_t container_id));
|
|
|
|
MOCK_METHOD1(NotifySegmentDuration, bool(uint32_t container_id));
|
2021-08-04 18:56:44 +00:00
|
|
|
MOCK_METHOD2(NotifyCueEvent, bool(uint32_t container_id, int64_t timestamp));
|
2015-09-24 22:03:52 +00:00
|
|
|
MOCK_METHOD4(NotifyEncryptionUpdate,
|
2015-09-14 19:53:32 +00:00
|
|
|
bool(uint32_t container_id,
|
2015-09-24 22:03:52 +00:00
|
|
|
const std::string& drm_uuid,
|
2015-09-14 19:53:32 +00:00
|
|
|
const std::vector<uint8_t>& new_key_id,
|
|
|
|
const std::vector<uint8_t>& new_pssh));
|
2018-05-22 00:39:21 +00:00
|
|
|
MOCK_METHOD2(NotifyMediaInfoUpdate,
|
|
|
|
bool(uint32_t container_id, const MediaInfo& media_info));
|
2015-09-14 19:53:32 +00:00
|
|
|
MOCK_METHOD0(Flush, bool());
|
|
|
|
};
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2015-09-14 19:53:32 +00:00
|
|
|
|
|
|
|
#endif // MPD_BASE_MOCK_MPD_NOTIFIER_H_
|