Commit 070ce589 authored by François Cartegnie's avatar François Cartegnie 🤞

stream_filter: dash: add segment duration

parent 6c8bc5c2
......@@ -41,7 +41,8 @@ ISegment::ISegment(const ICanonicalUrl *parent):
ICanonicalUrl( parent ),
startByte (0),
endByte (0),
startTime (VLC_TS_INVALID)
startTime (VLC_TS_INVALID),
duration (0)
{
debugName = "Segment";
classId = CLASSID_ISEGMENT;
......@@ -100,6 +101,16 @@ mtime_t ISegment::getStartTime() const
return startTime;
}
mtime_t ISegment::getDuration() const
{
return duration;
}
void ISegment::setDuration(mtime_t d)
{
duration = d;
}
size_t ISegment::getOffset() const
{
return startByte;
......
......@@ -55,6 +55,8 @@ namespace dash
virtual void setByteRange (size_t start, size_t end);
virtual void setStartTime (mtime_t ztime);
virtual mtime_t getStartTime () const;
virtual mtime_t getDuration () const;
virtual void setDuration (mtime_t);
virtual size_t getOffset () const;
virtual std::vector<ISegment*> subSegments () = 0;
virtual std::string toString () const;
......@@ -70,6 +72,7 @@ namespace dash
mtime_t startTime;
std::string debugName;
int classId;
mtime_t duration;
class SegmentChunk : public dash::http::Chunk
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment