Bug 1145411: Reduce Apple audio decoder verbosity. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 23 Mar 2015 21:09:05 +1100
changeset 263893 0046e9225bbdf76c8d00b81cef1094d964b9614a
parent 263892 1fadcc2735db6a4791f5dbba144fb864523308ec
child 263894 b5d1278ee01b0d09ad76e523c324901973f94d8f
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1145411
milestone39.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 1145411: Reduce Apple audio decoder verbosity. r=mattwoodrow
dom/media/fmp4/apple/AppleATDecoder.cpp
--- a/dom/media/fmp4/apple/AppleATDecoder.cpp
+++ b/dom/media/fmp4/apple/AppleATDecoder.cpp
@@ -150,18 +150,16 @@ static OSStatus
                               void* aUserData)
 {
   PassthroughUserData* userData = (PassthroughUserData*)aUserData;
   if (!userData->mDataSize) {
     *aNumDataPackets = 0;
     return kNoMoreDataErr;
   }
 
-  LOG("AudioConverter wants %u packets of audio data\n", *aNumDataPackets);
-
   if (aPacketDesc) {
     userData->mPacket.mStartOffset = 0;
     userData->mPacket.mVariableFramesInPacket = 0;
     userData->mPacket.mDataByteSize = userData->mDataSize;
     *aPacketDesc = &userData->mPacket;
   }
 
   aData->mBuffers[0].mNumberChannels = userData->mChannels;
@@ -248,40 +246,40 @@ AppleATDecoder::DecodeSample(mp4_demuxer
 
     if (rv && rv != kNoMoreDataErr) {
       LOG("Error decoding audio stream: %d\n", rv);
       return NS_ERROR_FAILURE;
     }
 
     if (numFrames) {
       outputData.AppendElements(decoded.get(), numFrames * channels);
-      LOG("%d frames decoded", numFrames);
     }
 
     if (rv == kNoMoreDataErr) {
-      LOG("done processing compressed packet");
       break;
     }
   } while (true);
 
   if (outputData.IsEmpty()) {
     return NS_OK;
   }
 
   size_t numFrames = outputData.Length() / channels;
   int rate = mOutputFormat.mSampleRate;
   CheckedInt<Microseconds> duration = FramesToUsecs(numFrames, rate);
   if (!duration.isValid()) {
     NS_WARNING("Invalid count of accumulated audio samples");
     return NS_ERROR_FAILURE;
   }
 
+#ifdef LOG_SAMPLE_DECODE
   LOG("pushed audio at time %lfs; duration %lfs\n",
       (double)aSample->composition_timestamp / USECS_PER_S,
       (double)duration.value() / USECS_PER_S);
+#endif
 
   nsAutoArrayPtr<AudioDataValue> data(new AudioDataValue[outputData.Length()]);
   PodCopy(data.get(), &outputData[0], outputData.Length());
   nsRefPtr<AudioData> audio = new AudioData(aSample->byte_offset,
                                             aSample->composition_timestamp,
                                             duration.value(),
                                             numFrames,
                                             data.forget(),