WIP: add extra logging to diagnose recorder test race draft
authorBryce Van Dyk <bvandyk@mozilla.com>
Fri, 20 Oct 2017 09:15:38 +1300
changeset 687043 4c1c406bae80ff5a287797c3962b9d884748d7f3
parent 680599 d418c3e7535042d22ce9a336a9bb50af88bf6599
child 687044 6d3df3f964aff12d8ad0b0bf04f5321a8f1407e7
push id86394
push userbvandyk@mozilla.com
push dateThu, 26 Oct 2017 19:32:54 +0000
milestone58.0a1
WIP: add extra logging to diagnose recorder test race MozReview-Commit-ID: BSDt25MeKSu
dom/media/encoder/MediaEncoder.cpp
--- a/dom/media/encoder/MediaEncoder.cpp
+++ b/dom/media/encoder/MediaEncoder.cpp
@@ -86,16 +86,18 @@ public:
 
   void NotifyQueuedChanges(MediaStreamGraph* aGraph,
                            StreamTime aTrackOffset,
                            const MediaSegment& aQueuedMedia) override
   {
     MOZ_ASSERT(mEncoder);
     MOZ_ASSERT(mEncoderThread);
 
+    LOG(LogLevel::Verbose, ("AudioTrackListener.NotifyQueuedChanges %p", this));
+
     if (mShutdown) {
       return;
     }
 
     if (!mInitialized) {
       mEncoderThread->Dispatch(
         NewRunnableMethod<StreamTime>(
           "mozilla::AudioTrackEncoder::SetStartOffset",
@@ -125,16 +127,18 @@ public:
 
   void NotifyRealtimeTrackData(MediaStreamGraph* aGraph,
                                StreamTime aTrackOffset,
                                const MediaSegment& aMedia) override
   {
     MOZ_ASSERT(mEncoder);
     MOZ_ASSERT(mEncoderThread);
 
+    LOG(LogLevel::Verbose, ("AudioTrackListener.NotifyRealtimeTrackData %p", this));
+
     if (mShutdown) {
       return;
     }
 
     const AudioSegment& audio = static_cast<const AudioSegment&>(aMedia);
 
     AudioSegment copy;
     copy.AppendSlice(audio, 0, audio.GetDuration());
@@ -228,16 +232,18 @@ public:
 
   void NotifyQueuedChanges(MediaStreamGraph* aGraph,
                            StreamTime aTrackOffset,
                            const MediaSegment& aQueuedMedia) override
   {
     MOZ_ASSERT(mEncoder);
     MOZ_ASSERT(mEncoderThread);
 
+    LOG(LogLevel::Verbose, ("VideoTrackListener.NotifyQueuedChanges %p", this));
+
     if (mShutdown) {
       return;
     }
 
     if (!mInitialized) {
       mEncoderThread->Dispatch(
         NewRunnableMethod<StreamTime>(
           "mozilla::VideoTrackEncoder::SetStartOffset",
@@ -261,16 +267,18 @@ public:
         aQueuedMedia.GetDuration()));
   }
 
   void SetCurrentFrames(const VideoSegment& aMedia) override
   {
     MOZ_ASSERT(mEncoder);
     MOZ_ASSERT(mEncoderThread);
 
+    LOG(LogLevel::Verbose, ("VideoTrackListener.SetCurrentFrames %p", this));
+
     if (mShutdown) {
       return;
     }
 
     VideoSegment copy;
     copy.AppendSlice(aMedia, 0, aMedia.GetDuration());
 
     mEncoderThread->Dispatch(