endByte (0)
{
debugName = "Segment";
+ classId = CLASSID_ISEGMENT;
}
dash::http::Chunk * ISegment::getChunk()
return ss.str();
}
+int ISegment::getClassId() const
+{
+ return classId;
+}
+
ISegment::SegmentChunk::SegmentChunk(ISegment *segment_) :
dash::http::Chunk()
{
this->size = parent->getBandwidth() * parent->getSegmentInfo()->getDuration();
else
this->size = -1;
+ classId = CLASSID_SEGMENT;
}
Segment::~Segment()
Segment(parent)
{
debugName = "InitSegment";
+ classId = CLASSID_INITSEGMENT;
}
IndexSegment::IndexSegment(Representation *parent) :
Segment(parent)
{
debugName = "IndexSegment";
+ classId = CLASSID_INDEXSEGMENT;
}
dash::http::Chunk * IndexSegment::getChunk()
{
setByteRange(start, end);
debugName = "SubSegment";
+ classId = CLASSID_SUBSEGMENT;
}
std::string SubSegment::getUrlSegment() const
virtual std::vector<ISegment*> subSegments () = 0;
virtual std::string toString () const;
virtual Representation* getRepresentation() const = 0;
+ int getClassId () const;
+
+ static const int CLASSID_ISEGMENT = 0;
protected:
size_t startByte;
size_t endByte;
std::string debugName;
+ int classId;
class SegmentChunk : public dash::http::Chunk
{
virtual dash::http::Chunk* toChunk();
virtual std::vector<ISegment*> subSegments();
virtual Representation* getRepresentation() const;
+ static const int CLASSID_SEGMENT = 1;
protected:
Representation* parentRepresentation;
{
public:
InitSegment( Representation *parent );
+ static const int CLASSID_INITSEGMENT = 2;
};
class IndexSegment : public Segment
{
public:
IndexSegment( Representation *parent );
+ static const int CLASSID_INDEXSEGMENT = 3;
protected:
class IndexSegmentChunk : public SegmentChunk
virtual std::string getUrlSegment() const; /* impl */
virtual std::vector<ISegment*> subSegments();
virtual Representation* getRepresentation() const;
+ static const int CLASSID_SUBSEGMENT = 4;
private:
Segment *parent;
};