27 #ifndef SRC_PLAYER_ES_DASH_PLAYER_DASH_MEDIA_SEGMENT_SEQUENCE_H_ 28 #define SRC_PLAYER_ES_DASH_PLAYER_DASH_MEDIA_SEGMENT_SEQUENCE_H_ 42 class SequenceIterator;
53 static constexpr
double kInvalidSegmentDuration = -1.0;
54 static constexpr
double kInvalidSegmentTimestamp = -1.0;
71 explicit Iterator(std::unique_ptr<SequenceIterator>&&);
108 bool operator==(
const Iterator&)
const;
112 bool operator!=(
const Iterator&)
const;
120 std::unique_ptr<dash::mpd::ISegment> operator*()
const;
133 std::unique_ptr<SequenceIterator> pimpl_;
145 virtual Iterator MediaSegmentForTime(
double time)
const = 0;
150 virtual std::unique_ptr<dash::mpd::ISegment> GetInitSegment()
const = 0;
155 virtual std::unique_ptr<dash::mpd::ISegment> GetBitstreamSwitchingSegment()
160 virtual std::unique_ptr<dash::mpd::ISegment> GetRepresentationIndexSegment()
165 virtual std::unique_ptr<dash::mpd::ISegment> GetIndexSegment()
const = 0;
171 virtual double AverageSegmentDuration()
const = 0;
177 virtual double SegmentDuration(
const Iterator& it)
const;
183 virtual double SegmentTimestamp(
const Iterator& it)
const;
193 bool DownloadSegment(dash::mpd::ISegment* seg, std::vector<uint8_t>* data);
205 std::vector<uint8_t>* data) {
209 #endif // SRC_PLAYER_ES_DASH_PLAYER_DASH_MEDIA_SEGMENT_SEQUENCE_H_