]> git.sesse.net Git - vlc/blobdiff - modules/demux/dash/Streams.hpp
demux: dash: simplify MPD set/getters
[vlc] / modules / demux / dash / Streams.hpp
index 387ad97285bdaf3a8e05a86b53fb717b7c1385ef..10404f43580704060f8d5a9751f6d62ba0c61dd4 100644 (file)
 #include <string>
 #include <vlc_common.h>
 #include "StreamsType.hpp"
-#include "adaptationlogic/IAdaptationLogic.h"
+#include "adaptationlogic/AbstractAdaptationLogic.h"
 #include "http/HTTPConnectionManager.h"
 #include "http/Chunk.h"
 
 namespace dash
 {
+    class SegmentTracker;
+
     namespace Streams
     {
         class AbstractStreamOutput;
@@ -46,12 +48,14 @@ namespace dash
                 bool operator==(const Stream &) const;
                 static Type mimeToType(const std::string &mime);
                 static Format mimeToFormat(const std::string &mime);
-                void create(demux_t *, logic::IAdaptationLogic *);
+                void create(demux_t *, logic::AbstractAdaptationLogic *, SegmentTracker *);
                 bool isEOF() const;
                 mtime_t getPCR() const;
                 int getGroup() const;
                 int esCount() const;
+                bool seekAble() const;
                 size_t read(http::HTTPConnectionManager *);
+                bool setPosition(mtime_t, bool);
 
             private:
                 http::Chunk *getChunk();
@@ -59,7 +63,8 @@ namespace dash
                 Type type;
                 Format format;
                 AbstractStreamOutput *output;
-                logic::IAdaptationLogic *adaptationLogic;
+                logic::AbstractAdaptationLogic *adaptationLogic;
+                SegmentTracker *segmentTracker;
                 http::Chunk *currentChunk;
                 bool eof;
         };
@@ -74,6 +79,8 @@ namespace dash
                 mtime_t getPCR() const;
                 int getGroup() const;
                 int esCount() const;
+                bool seekAble() const;
+                void setPosition(mtime_t);
 
             protected:
                 mtime_t   pcr;
@@ -81,6 +88,7 @@ namespace dash
                 int       escount;
                 es_out_t *fakeesout; /* to intercept/proxy what is sent from demuxstream */
                 stream_t *demuxstream;
+                bool      seekable;
 
             private:
                 demux_t  *realdemux;