7 #ifndef MPD_BASE_MOCK_MPD_BUILDER_H_
8 #define MPD_BASE_MOCK_MPD_BUILDER_H_
10 #include <absl/synchronization/mutex.h>
11 #include <gmock/gmock.h>
13 #include <packager/macros/classes.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));
37 bool content_protection_in_adaptation_set));
41 uint32_t sequence_counter_ = 0;
55 void(
const std::string& drm_uuid,
const std::string& pssh));
56 MOCK_METHOD1(
AddRole,
void(AdaptationSet::Role role));
65 uint32_t sequence_counter_ = 0;
77 void(
const std::string& drm_uuid,
const std::string& pssh));
79 void(int64_t start_time,
82 int64_t segment_number));
virtual Representation * AddRepresentation(const MediaInfo &media_info)
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
virtual void ForceSetSegmentAlignment(bool segment_alignment)
virtual Representation * CopyRepresentation(const Representation &representation)
virtual void AddTrickPlayReference(const AdaptationSet *adaptation_set)
virtual void AddAdaptationSetSwitching(const AdaptationSet *adaptation_set)
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
virtual void AddRole(Role role)
This class generates DASH MPDs (Media Presentation Descriptions).
virtual Period * GetOrCreatePeriod(double start_time_in_seconds)
virtual bool ToString(std::string *output)
virtual AdaptationSet * GetOrCreateAdaptationSet(const MediaInfo &media_info, bool content_protection_in_adaptation_set)
double start_time_in_seconds() const
virtual void AddContentProtectionElement(const ContentProtectionElement &element)
virtual void AddNewSegment(int64_t start_time, int64_t duration, uint64_t size, int64_t segment_number)
virtual void UpdateContentProtectionPssh(const std::string &drm_uuid, const std::string &pssh)
virtual const MediaInfo & GetMediaInfo() const
void SetAvailabilityTimeOffset()
virtual void SetSampleDuration(int32_t sample_duration)
void SetSegmentDuration()
All the methods that are virtual are virtual for mocking.