Re: Clarification of addSourceBuffer() method

Le 20/10/2014 03:27, Silvia Pfeiffer a écrit :
> I'm just taking a look at the MSE spec (writing a book chapter about
> it, actually).
>
> I'm looking at MediaSource.addSourceBuffer() which to me seems to be
> the key method to add chunks of a media resource to a MediaSource
> object.
>
> I'm reading the following in the spec:
>
> ``
> addSourceBuffer
>
> Adds a new SourceBuffer to sourceBuffers.
>
> Implementations must support at least 1 MediaSource object with the
> following SourceBuffer configurations. MediaSource objects must
> support each of the configurations below, but they are only required
> to support one configuration at a time. Supporting multiple
> configurations at once or additional configurations is a quality of
> implementation issue.
>
> * A single SourceBuffer with 1 audio track and/or 1 video track.
>
> * Two SourceBuffers with one handling a single audio track and the
> other handling a single video track.
> ``
>
> It seems that a SourceBuffer can only have either an interleaved
> audio/video track, or just audio or just video. I'm a bit confused
> about that, because SourceBuffer clearly talks about multiple audio
> and video tracks, and also about text tracks.
In theory, a SourceBuffer may indeed correspond to many multiplexed 
streams (audio(s)+video(s)+text track(s)+metadata track(s)). The text 
you quoted indicates minimal implementation requirements. 
Implementations are free to support more than that.

HTH,
Cyril

>
> Is this text left-over from the early days of the specification? Does
> it actually mean that you can either provide tracks in an interleaved
> manner or as separate SourceBuffers? OR do you really mean what is
> written there? If the latter, how then do you get multiple tracks and
> in particular text tracks into MediaSource ?
>
> Thanks for any clarification you can provide!
>
> Cheers,
> Silvia.
>


-- 
Cyril Concolato
Multimedia Group / Telecom ParisTech
http://concolato.wp.mines-telecom.fr/
@cconcolato

Received on Monday, 20 October 2014 07:48:45 UTC