Bug 1091304 - Improve fmp4 logging. r=kinetik
authorRalph Giles <giles@mozilla.com>
Wed, 29 Oct 2014 17:09:00 -0700
changeset 213048 3f30f2c16ccc8e3117f4a888d8f6c1cf103a8748
parent 213047 e1876b1938032664c1296d89ea6c03fe87e5bee9
child 213049 277f014132eb1132df4fcf67bbc0355fe679743d
push id27738
push usercbook@mozilla.com
push dateThu, 30 Oct 2014 13:46:07 +0000
treeherdermozilla-central@1aa1b23d799e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1091304
milestone36.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 1091304 - Improve fmp4 logging. r=kinetik The %#x format specifier for hex values doesn't work with our logging macros, and MacOS error codes are generally listed in decimal anyway. Also log the reason for a Drain() call to assist debugging.
dom/media/fmp4/MP4Reader.cpp
dom/media/fmp4/apple/AppleATDecoder.cpp
--- a/dom/media/fmp4/MP4Reader.cpp
+++ b/dom/media/fmp4/MP4Reader.cpp
@@ -526,16 +526,17 @@ MP4Reader::Decode(TrackType aTrack)
            (data.mInputExhausted ||
            (data.mNumSamplesInput - data.mNumSamplesOutput) < data.mDecodeAhead) &&
            !data.mEOS) {
       data.mMonitor.AssertCurrentThreadOwns();
       data.mMonitor.Unlock();
       nsAutoPtr<MP4Sample> compressed(PopSample(aTrack));
       if (!compressed) {
         // EOS, or error. Send the decoder a signal to drain.
+        LOG("MP4Reader: EOS or error - no samples available");
         LOG("Draining %s", TrackTypeToStr(aTrack));
         data.mMonitor.Lock();
         MOZ_ASSERT(!data.mEOS);
         data.mEOS = true;
         MOZ_ASSERT(!data.mDrainComplete);
         data.mDrainComplete = false;
         data.mMonitor.Unlock();
         data.mDecoder->Drain();
--- a/dom/media/fmp4/apple/AppleATDecoder.cpp
+++ b/dom/media/fmp4/apple/AppleATDecoder.cpp
@@ -267,17 +267,17 @@ AppleATDecoder::SampleCallback(uint32_t 
     OSStatus rv = AudioConverterFillComplexBuffer(mConverter,
                                                   _PassthroughInputDataCallback,
                                                   &userData,
                                                   &numFrames /* in/out */,
                                                   &decBuffer,
                                                   packets.get());
 
     if (rv && rv != kNeedMoreData) {
-      LOG("Error decoding audio stream: %#x\n", rv);
+      LOG("Error decoding audio stream: %d\n", rv);
       mCallback->Error();
       break;
     }
     LOG("%d frames decoded", numFrames);
 
     // If we decoded zero frames then AudioConverterFillComplexBuffer is out
     // of data to provide.  We drained its internal buffer completely on the
     // last pass.