[vlc-commits] demux: adaptative: tag first chunk block

Francois Cartegnie git at videolan.org
Thu Jul 16 23:04:28 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 16 16:05:47 2015 +0200| [a77540512a1e48e78cb93c7fd7e7c0a12be1099e] | committer: Francois Cartegnie

demux: adaptative: tag first chunk block

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a77540512a1e48e78cb93c7fd7e7c0a12be1099e
---

 modules/demux/adaptative/Streams.cpp |    6 ++++--
 modules/demux/adaptative/Streams.hpp |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 6b86704..26120f4 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -174,6 +174,7 @@ size_t Stream::read(HTTPConnectionManager *connManager)
     }
 
     size_t readsize = 0;
+    bool b_segment_head_chunk = false;
 
     /* New chunk, do query */
     if(chunk->getBytesRead() == 0)
@@ -185,6 +186,7 @@ size_t Stream::read(HTTPConnectionManager *connManager)
             delete chunk;
             return 0;
         }
+        b_segment_head_chunk = true;
     }
 
     /* Because we don't know Chunk size at start, we need to get size
@@ -234,7 +236,7 @@ size_t Stream::read(HTTPConnectionManager *connManager)
     readsize = block->i_buffer;
 
     if(output)
-        output->pushBlock(block);
+        output->pushBlock(block, b_segment_head_chunk);
     else
         block_Release(block);
 
@@ -371,7 +373,7 @@ int BaseStreamOutput::esCount() const
     return queues.size();
 }
 
-void BaseStreamOutput::pushBlock(block_t *block)
+void BaseStreamOutput::pushBlock(block_t *block, bool)
 {
     stream_DemuxSend(demuxstream, block);
 }
diff --git a/modules/demux/adaptative/Streams.hpp b/modules/demux/adaptative/Streams.hpp
index d36317b..3a16587 100644
--- a/modules/demux/adaptative/Streams.hpp
+++ b/modules/demux/adaptative/Streams.hpp
@@ -102,7 +102,7 @@ namespace adaptative
         virtual ~AbstractStreamOutput();
 
         const StreamFormat & getStreamFormat() const;
-        virtual void pushBlock(block_t *) = 0;
+        virtual void pushBlock(block_t *, bool) = 0;
         virtual mtime_t getPCR() const;
         virtual mtime_t getFirstDTS() const = 0;
         virtual int getGroup() const;
@@ -134,7 +134,7 @@ namespace adaptative
     public:
         BaseStreamOutput(demux_t *, const StreamFormat &, const std::string &);
         virtual ~BaseStreamOutput();
-        virtual void pushBlock(block_t *); /* reimpl */
+        virtual void pushBlock(block_t *, bool); /* reimpl */
         virtual mtime_t getFirstDTS() const; /* reimpl */
         virtual int esCount() const; /* reimpl */
         virtual bool seekAble() const; /* reimpl */



More information about the vlc-commits mailing list