似乎 MediaSource 和 Progressive 播放使用不同的解复用器。ChunkDemuxer 用于 MediaSource,ShellDemuxer 用于 Progressive 播放。
在 ShellParser.cpp 实现中:
PipelineStatus ShellParser::Construct(
scoped_refptr<ShellDataSourceReader> reader,
scoped_refptr<ShellParser>* parser,
const scoped_refptr<MediaLog>& media_log) {
DCHECK(parser);
DCHECK(media_log);
*parser = NULL;
// download first 16 bytes of stream to determine file type and extract basic
// container-specific stream configuration information
uint8 header[kInitialHeaderSize];
int bytes_read = reader->BlockingRead(0, kInitialHeaderSize, header);
if (bytes_read != kInitialHeaderSize) {
return DEMUXER_ERROR_COULD_NOT_PARSE;
}
// attempt to construct mp4 parser from this header
return ShellMP4Parser::Construct(reader, header, parser, media_log);
}
似乎 Cobalt 只能对 MP4 容器(Only ShellMP4Parser)进行解复用以进行渐进式播放。
Cobalt 是已知状态吗?我们如何在设备上支持 webm 渐进式播放?