Skip to content
  • Andreas Pehrson's avatar
    Bug 1601034 - Add a ProcessedMediaTrack layer in MediaPipelineTransmit to... · d03a022c
    Andreas Pehrson authored
    Bug 1601034 - Add a ProcessedMediaTrack layer in MediaPipelineTransmit to handle replaceTrack of ended tracks. r=dminor,padenot
    
    Before this patch, if a send audio MediaStreamTrack ended, we ended up not
    sending anything over the network. If replaceTrack() at that point replaced the
    ended track with a live one, we'd start sending data again, but the rtp stream
    would continue from where the previous track ended.
    
    Having a gap in audio like that would confuse a receiver's *video* jitter
    buffer, because it's trying to sync to an audio track that just had a massive
    amount of "jitter" (it can't tell the difference).
    
    This patch fixes this by adding a track layer in MediaPipelineTransmit that
    remains active for as long as the MediaPipeline is active. Thus if the send
    audio MediaStreamTrack ends, we continue sending silence over the network, which
    the receiver can understand. If later replaced, the receiver sees real audio
    instead of silence and continues gracefully.
    
    Differential Revision: https://phabricator.services.mozilla.com/D56619
    
    --HG--
    extra : moz-landing-system : lando
    d03a022c