Skip to content
  • Andreas Pehrson's avatar
    Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt · 8028758d
    Andreas Pehrson authored
    This change mainly removes the `mTracks` member from MediaStream and moves all
    associated members up a level, so that a MediaStream in practice represents a
    single track.
    
    Classes will be renamed in a future patch to reflect this.
    
    Other changes include:
    
    The new `mEnded` member of MediaStream changes meaning to only become true when
    all data in the stream has been processed. It stems from
    StreamTracks::Track::mEnded which used to become true as soon as the last bit of
    data had been added to a track, and there could still be data in the track that
    would get processed in future iterations. We are moving towards not having any
    future data in tracks, which is why this change is ok to make -- keeping the old
    behavior will soon not make sense.
    
    TrackUnionStream is changed to no longer take a list of streams as input and
    forward the union of their tracks to itself. Instead it's limited to having one
    track as input at a time.
    
    The autofinishing functionality that TrackUnionStream had before has been
    transformed into an autoending functionality to allow it to defer ending until
    its been told that it's ok to end through the control API. This lets a single
    TrackUnionStream span the lifetime of multiple inputs, which will be useful for
    making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
    for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
    a few potential use cases.
    
    AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
    EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
    a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
    however only used with data if the EXTERNAL_OUTPUT flag is enabled.
    
    Differential Revision: https://phabricator.services.mozilla.com/D45821
    
    --HG--
    extra : moz-landing-system : lando
    8028758d