Bug 1768409 - Don't log mType everywhere in TrackBuffersManager. r=alwu

Only log mType when we're updating it or using it.

Differential Revision: https://phabricator.services.mozilla.com/D145928
This commit is contained in:
Bryce Seager van Dyk 2022-05-11 19:15:22 +00:00
Родитель 52501f82b5
Коммит 36ec87d3bc
1 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -27,21 +27,20 @@
extern mozilla::LogModule* GetMediaSourceLog();
#define MSE_DEBUG(arg, ...) \
DDMOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, "(%s)::%s: " arg, \
mType.OriginalString().Data(), __func__, ##__VA_ARGS__)
#define MSE_DEBUGV(arg, ...) \
DDMOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, "(%s)::%s: " arg, \
mType.OriginalString().Data(), __func__, ##__VA_ARGS__)
#define MSE_DEBUG(arg, ...) \
DDMOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, "::%s: " arg, \
__func__, ##__VA_ARGS__)
#define MSE_DEBUGV(arg, ...) \
DDMOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, "::%s: " arg, \
__func__, ##__VA_ARGS__)
mozilla::LogModule* GetMediaSourceSamplesLog() {
static mozilla::LazyLogModule sLogModule("MediaSourceSamples");
return sLogModule;
}
#define SAMPLE_DEBUG(arg, ...) \
DDMOZ_LOG(GetMediaSourceSamplesLog(), mozilla::LogLevel::Debug, \
"(%s)::%s: " arg, mType.OriginalString().Data(), __func__, \
##__VA_ARGS__)
#define SAMPLE_DEBUG(arg, ...) \
DDMOZ_LOG(GetMediaSourceSamplesLog(), mozilla::LogLevel::Debug, \
"::%s: " arg, __func__, ##__VA_ARGS__)
namespace mozilla {
@ -273,6 +272,9 @@ void TrackBuffersManager::ProcessTasks() {
return;
case Type::ChangeType:
MOZ_RELEASE_ASSERT(!mCurrentTask);
MSE_DEBUG("Processing type change from %s -> %s",
mType.OriginalString().get(),
task->As<ChangeTypeTask>()->mType.OriginalString().get());
mType = task->As<ChangeTypeTask>()->mType;
mChangeTypeReceived = true;
mInitData = nullptr;
@ -1023,6 +1025,8 @@ void TrackBuffersManager::ShutdownDemuxers() {
}
void TrackBuffersManager::CreateDemuxerforMIMEType() {
MOZ_ASSERT(OnTaskQueue());
MSE_DEBUG("mType.OriginalString=%s", mType.OriginalString().get());
ShutdownDemuxers();
if (mType.Type() == MEDIAMIMETYPE(VIDEO_WEBM) ||