7 #ifndef MPD_BASE_MOCK_MPD_BUILDER_H_ 8 #define MPD_BASE_MOCK_MPD_BUILDER_H_ 10 #include <gmock/gmock.h> 12 #include "packager/base/compiler_specific.h" 13 #include "packager/base/synchronization/lock.h" 14 #include "packager/mpd/base/adaptation_set.h" 15 #include "packager/mpd/base/content_protection_element.h" 16 #include "packager/mpd/base/mpd_builder.h" 17 #include "packager/mpd/base/period.h" 18 #include "packager/mpd/base/representation.h" 28 MOCK_METHOD1(
ToString,
bool(std::string* output));
33 MockPeriod(uint32_t period_id,
double start_time_in_seconds);
35 MOCK_METHOD2(GetOrCreateAdaptationSet,
37 bool content_protection_in_adaptation_set));
41 base::AtomicSequenceNumber sequence_counter_;
49 MOCK_METHOD1(AddRepresentation,
Representation*(
const MediaInfo& media_info));
50 MOCK_METHOD1(CopyRepresentation,
52 MOCK_METHOD1(AddContentProtectionElement,
54 MOCK_METHOD2(UpdateContentProtectionPssh,
55 void(
const std::string& drm_uuid,
const std::string& pssh));
56 MOCK_METHOD1(AddRole,
void(AdaptationSet::Role role));
57 MOCK_METHOD1(ForceSetSegmentAlignment,
void(
bool segment_alignment));
58 MOCK_METHOD1(AddAdaptationSetSwitching,
60 MOCK_METHOD1(AddTrickPlayReference,
65 base::AtomicSequenceNumber sequence_counter_;
74 MOCK_METHOD1(AddContentProtectionElement,
76 MOCK_METHOD2(UpdateContentProtectionPssh,
77 void(
const std::string& drm_uuid,
const std::string& pssh));
78 MOCK_METHOD3(AddNewSegment,
79 void(uint64_t start_time, uint64_t duration, uint64_t size));
80 MOCK_METHOD1(SetSampleDuration,
void(uint32_t sample_duration));
81 MOCK_CONST_METHOD0(GetMediaInfo,
const MediaInfo&());
86 #endif // MPD_BASE_MOCK_MPD_BUILDER_H_
This class generates DASH MPDs (Media Presentation Descriptions).
All the methods that are virtual are virtual for mocking.
virtual Period * GetOrCreatePeriod(double start_time_in_seconds)
virtual bool ToString(std::string *output)