Backed out 3 changesets (bug 1673007) for MinGW bustages on WMFDecoderModule.cpp

Backed out changeset 707208ad26de (bug 1673007)
Backed out changeset 3e4e0172f644 (bug 1673007)
Backed out changeset 31531b427014 (bug 1673007)
This commit is contained in:
Narcis Beleuzu 2020-11-02 19:40:50 +02:00
Родитель ce3b5c2dc4
Коммит 2b1c46b35c
4 изменённых файлов: 2 добавлений и 78 удалений

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

@ -42,15 +42,6 @@ mozilla::LazyLogModule gMediaDemuxerLog("MediaDemuxer");
DDMOZ_LOG(sFormatDecoderLog, mozilla::LogLevel::Verbose, "::%s: " arg, \
__func__, ##__VA_ARGS__)
#ifdef MOZ_GECKO_PROFILER
# include "ProfilerMarkerPayload.h"
# define MEDIA_FORMAT_READER_STATUS_MARKER(tag, text, markerTime) \
PROFILER_ADD_MARKER_WITH_PAYLOAD(tag, MEDIA_PLAYBACK, TextMarkerPayload, \
(text, markerTime))
#else
# define MEDIA_FORMAT_READER_STATUS_MARKER(tag, text, markerTime)
#endif
#define NS_DispatchToMainThread(...) CompileError_UseAbstractMainThreadInstead
namespace mozilla {
@ -1898,12 +1889,8 @@ void MediaFormatReader::HandleDemuxedSamples(
}
}
nsPrintfCString markerString(
"%s stream id changed from:%" PRIu32 " to:%" PRIu32,
TrackTypeToStr(aTrack), decoder.mLastStreamSourceID, info->GetID());
MEDIA_FORMAT_READER_STATUS_MARKER("StreamID Change", markerString,
TimeStamp::NowUnfuzzed());
LOG("%s", markerString.get());
LOG("%s stream id has changed from:%d to:%d.", TrackTypeToStr(aTrack),
decoder.mLastStreamSourceID, info->GetID());
if (aTrack == TrackInfo::kVideoTrack) {
// We are about to create a new decoder thus the benchmark,
@ -3120,6 +3107,5 @@ void MediaFormatReader::OnFirstDemuxFailed(TrackInfo::TrackType aType,
} // namespace mozilla
#undef NS_DispatchToMainThread
#undef MEDIA_FORMAT_READER_STATUS_MARKER
#undef LOGV
#undef LOG

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

@ -312,5 +312,3 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset, RefPtr<MediaData>& aOutData) {
void WMFAudioMFTManager::Shutdown() { mDecoder = nullptr; }
} // namespace mozilla
#undef LOG

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

@ -32,8 +32,6 @@
#include "nsWindowsHelpers.h"
#include "prsystem.h"
#define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
#ifdef MOZ_GECKO_PROFILER
# include "ProfilerMarkerPayload.h"
# define WFM_DECODER_MODULE_STATUS_MARKER(tag, text, markerTime) \
@ -47,18 +45,6 @@ extern const GUID CLSID_WebmMfVpxDec;
namespace mozilla {
// Helper function to add a profile marker and log at the same time.
static void WmfDeocderModuleMarkerAndLog(const char* aTag, const char* aFormat,
...) MOZ_FORMAT_PRINTF(1, 2) {
va_list ap;
va_start(ap, aFormat);
const nsVprintfCString markerString(aFormat, ap);
va_end(ap);
WFM_DECODER_MODULE_STATUS_MARKER(aTag, markerString,
TimeStamp::NowUnfuzzed());
LOG(markerString.get());
}
static Atomic<bool> sDXVAEnabled(false);
static Atomic<bool> sUsableVPXMFT(false);
@ -126,37 +112,14 @@ void WMFDecoderModule::Init() {
testForVPx = sDXVAEnabled = !mozilla::BrowserTabsRemoteAutostart();
}
// We have heavy logging below to help diagnose issue around hardware decoding
// failures. Due to these failures often relating to driver level problems
// they're hard to nail down, so we want lots of info. We may be able to relax
// this in future if we're not seeing such problems (see bug 1673007 for
// references to the bugs motivating this).
sDXVAEnabled = sDXVAEnabled && gfx::gfxVars::CanUseHardwareVideoDecoding();
testForVPx = testForVPx && gfx::gfxVars::CanUseHardwareVideoDecoding();
if (testForVPx && StaticPrefs::media_wmf_vp9_enabled_AtStartup()) {
gfx::WMFVPXVideoCrashGuard guard;
if (!guard.Crashed()) {
WmfDeocderModuleMarkerAndLog("WMFInit VPx Pending",
"Attempting to create MFT decoder for VPx");
sUsableVPXMFT = CanCreateMFTDecoder(CLSID_WebmMfVpxDec);
WmfDeocderModuleMarkerAndLog("WMFInit VPx Initialized",
"CanCreateMFTDecoder returned %s for VPx",
sUsableVPXMFT ? "true" : "false");
} else {
WmfDeocderModuleMarkerAndLog(
"WMFInit VPx Failure",
"Will not use MFT VPx due to crash guard reporting a crash");
}
}
WmfDeocderModuleMarkerAndLog(
"WMFInit Result",
"WMFDecoderModule::Init finishing with sDXVAEnabled=%s testForVPx=%s "
"sUsableVPXMFT=%s",
sDXVAEnabled ? "true" : "false", testForVPx ? "true" : "false",
sUsableVPXMFT ? "true" : "false");
}
/* static */
@ -324,6 +287,3 @@ bool WMFDecoderModule::Supports(const SupportDecoderParams& aParams,
}
} // namespace mozilla
#undef LOG
#undef WFM_DECODER_MODULE_STATUS_MARKER

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

@ -17,15 +17,6 @@
#include "mozilla/StaticPrefs_media.h"
#include "mozilla/TaskQueue.h"
#ifdef MOZ_GECKO_PROFILER
# include "ProfilerMarkerPayload.h"
# define MEDIA_CHANGE_MONITOR_STATUS_MARKER(tag, text, markerTime) \
PROFILER_ADD_MARKER_WITH_PAYLOAD(tag, MEDIA_PLAYBACK, TextMarkerPayload, \
(text, markerTime))
#else
# define MEDIA_CHANGE_MONITOR_STATUS_MARKER(tag, text, markerTime)
#endif
namespace mozilla {
// H264ChangeMonitor is used to ensure that only AVCC or AnnexB is fed to the
@ -99,11 +90,6 @@ class H264ChangeMonitor : public MediaChangeMonitor::CodecChangeMonitor {
mPreviousExtraData = aSample->mExtraData;
UpdateConfigFromExtraData(extra_data);
MEDIA_CHANGE_MONITOR_STATUS_MARKER(
"H264 Stream Change",
"H264ChangeMonitor::CheckForChange has detected a change in the "
"stream and will request a new decoder"_ns,
TimeStamp::NowUnfuzzed());
return NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER;
}
@ -204,12 +190,6 @@ class VPXChangeMonitor : public MediaChangeMonitor::CodecChangeMonitor {
mCurrentConfig.mDisplay = info.mDisplay;
mCurrentConfig.SetImageRect(
gfx::IntRect(0, 0, info.mImage.width, info.mImage.height));
MEDIA_CHANGE_MONITOR_STATUS_MARKER(
"VPX Stream Change",
"VPXChangeMonitor::CheckForChange has detected a change in the "
"stream and will request a new decoder"_ns,
TimeStamp::NowUnfuzzed());
rv = NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER;
}
mInfo = Some(info);