Bug 1749047 - Improve logging around encoder output callbacks. r=chunmin

This logs when new configuration is output, and also logs the timestamp, to be
able to better match encode calls and output callbacks when logging.

Differential Revision: https://phabricator.services.mozilla.com/D196211
This commit is contained in:
Paul Adenot 2023-12-22 21:39:14 +00:00
parent 3dde641a77
commit dbff9eb23a

View File

@ -314,7 +314,14 @@ void EncoderTemplate<EncoderType>::OutputEncodedData(
metadata.mDecoderConfig.Construct(EncoderConfigToDecoderConfig(
GetParentObject(), data, *mActiveConfig));
mOutputNewDecoderConfig = false;
LOGE("New config passed to output callback: %s",
NS_ConvertUTF16toUTF8(ConfigToString(EncoderConfigToDecoderConfig(
GetParentObject(), data, *mActiveConfig)))
.get());
}
LOG("EncoderTemplate:: output callback (ts: % " PRId64 " ), %s",
encodedData->Timestamp(),
metadata.mDecoderConfig.WasPassed() ? "new config" : "");
cb->Call((typename EncoderType::OutputType&)(*encodedData), metadata);
}
}
@ -404,8 +411,6 @@ void EncoderTemplate<EncoderType>::ScheduleOutputEncodedData(
MOZ_ASSERT(mState == CodecState::Configured);
MOZ_ASSERT(mAgent);
LOG("Outputing %zu encoded data", aData.Length());
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToCurrentThread(MakeAndAddRef<OutputRunnable>(
this, mAgent->mId, aLabel, std::move(aData))));
}