Bug 1305949 - Use the same path for passing on missed data to video sink, as during normal operation. r=ctai
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 13 Oct 2016 11:18:53 +0200
changeset 327605 ddfa37f89612ce5b686605587908634e8028d65e
parent 327604 49b90756985c403248cb9fc3ef9c2c10947098c7
child 327606 7b4edaa06578ad6cd4d21026e097c6010b3a445f
push id31139
push userryanvm@gmail.com
push dateFri, 30 Dec 2016 15:04:57 +0000
treeherdermozilla-central@9104708cc3ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersctai
bugs1305949
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1305949 - Use the same path for passing on missed data to video sink, as during normal operation. r=ctai MozReview-Commit-ID: FDKFf1skYVe
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -2911,30 +2911,29 @@ SourceMediaStream::AddDirectTrackListene
     MutexAutoLock lock(mMutex);
     updateData = FindDataForTrack(aTrackID);
     track = FindTrack(aTrackID);
     if (track) {
       isAudio = track->GetType() == MediaSegment::AUDIO;
       isVideo = track->GetType() == MediaSegment::VIDEO;
     }
 
-    MediaStreamVideoSink* videoSink = listener->AsMediaStreamVideoSink();
-    if (track && isVideo && videoSink) {
+    if (track && isVideo && listener->AsMediaStreamVideoSink()) {
       // Re-send missed VideoSegment to new added MediaStreamVideoSink.
       VideoSegment* trackSegment = static_cast<VideoSegment*>(track->GetSegment());
       VideoSegment videoSegment;
       if (mTracks.GetForgottenDuration() < trackSegment->GetDuration()) {
         videoSegment.AppendSlice(*trackSegment,
                                  mTracks.GetForgottenDuration(),
                                  trackSegment->GetDuration());
       }
       if (updateData) {
         videoSegment.AppendSlice(*updateData->mData, 0, updateData->mData->GetDuration());
       }
-      videoSink->SetCurrentFrames(videoSegment);
+      listener->NotifyRealtimeTrackData(Graph(), 0, videoSegment);
     }
 
     if (track && (isAudio || isVideo)) {
       for (auto entry : mDirectTrackListeners) {
         if (entry.mListener == listener &&
             (entry.mTrackID == TRACK_ANY || entry.mTrackID == aTrackID)) {
           listener->NotifyDirectListenerInstalled(
             DirectMediaStreamTrackListener::InstallationResult::ALREADY_EXISTS);