Commit a7754051 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: adaptative: tag first chunk block

parent 1e4a17c3
......@@ -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);
}
......
......@@ -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 */
......
Supports Markdown
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