15 #ifndef SHAKA_EMBEDDED_MEDIA_STREAMS_H_ 16 #define SHAKA_EMBEDDED_MEDIA_STREAMS_H_ 19 #include <type_traits> 22 #include "../macros.h" 46 return start == other.
start && end == other.
end;
49 return !(*
this == other);
55 static_assert(std::is_pod<BufferedRange>::value,
"BufferedRange should be POD");
76 static constexpr
const double kMaxGapSize = 0.15;
96 size_t CountFramesBetween(
double start,
double end)
const;
106 std::vector<BufferedRange> GetBufferedRanges()
const;
112 size_t EstimateSize()
const;
127 void Remove(
double start,
double end);
138 void DebugPrint(
bool all_frames)
const;
150 std::shared_ptr<BaseFrame> GetFrameInternal(
double time,
163 void AddFrameInternal(std::shared_ptr<BaseFrame>
frame);
166 void AssertRangesSorted()
const;
169 std::unique_ptr<Impl> impl_;
181 template <
typename T,
bool OrderByDts>
188 AddFrameInternal(frame);
194 auto ret = GetFrameInternal(time, kind);
195 return std::shared_ptr<T>(ret,
static_cast<T*
>(ret.get()));
206 #endif // SHAKA_EMBEDDED_MEDIA_STREAMS_H_
std::shared_ptr< shaka::media::DecodedFrame > frame
#define SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE(Type)