diff --git a/dom/media/platforms/wmf/WMFDecoderModule.cpp b/dom/media/platforms/wmf/WMFDecoderModule.cpp index fd4cc5e0962b..30ec70978e17 100644 --- a/dom/media/platforms/wmf/WMFDecoderModule.cpp +++ b/dom/media/platforms/wmf/WMFDecoderModule.cpp @@ -32,15 +32,6 @@ #include "nsWindowsHelpers.h" #include "prsystem.h" -#ifdef MOZ_GECKO_PROFILER -# include "ProfilerMarkerPayload.h" -# define WFM_DECODER_MODULE_STATUS_MARKER(tag, text, markerTime) \ - PROFILER_ADD_MARKER_WITH_PAYLOAD(tag, MEDIA_PLAYBACK, TextMarkerPayload, \ - (text, markerTime)) -#else -# define WFM_DECODER_MODULE_STATUS_MARKER(tag, text, markerTime) -#endif - extern const GUID CLSID_WebmMfVpxDec; namespace mozilla { @@ -142,25 +133,11 @@ already_AddRefed WMFDecoderModule::CreateVideoDecoder( if (aParams.mError) { *aParams.mError = result; } - nsPrintfCString markerString( - "WMFDecoderModule::CreateVideoDecoder failed for manager with " - "description %s with result: %s", - manager->GetDescriptionName().get(), result.Description().get()); - LOG(markerString.get()); - WFM_DECODER_MODULE_STATUS_MARKER("WMFVDecoderCreation Failure", - markerString, TimeStamp::NowUnfuzzed()); return nullptr; } - nsPrintfCString markerString( - "WMFDecoderModule::CreateVideoDecoder success for manager with " - "description %s", - manager->GetDescriptionName().get()); - LOG(markerString.get()); - WFM_DECODER_MODULE_STATUS_MARKER("WMFVDecoderCreation Success", markerString, - TimeStamp::NowUnfuzzed()); - RefPtr decoder = new WMFMediaDataDecoder(manager.release()); + return decoder.forget(); } @@ -170,24 +147,9 @@ already_AddRefed WMFDecoderModule::CreateAudioDecoder( new WMFAudioMFTManager(aParams.AudioConfig())); if (!manager->Init()) { - nsPrintfCString markerString( - "WMFDecoderModule::CreateAudioDecoder failed for manager with " - "description %s", - manager->GetDescriptionName().get()); - LOG(markerString.get()); - WFM_DECODER_MODULE_STATUS_MARKER("WMFADecoderCreation Failure", - markerString, TimeStamp::NowUnfuzzed()); return nullptr; } - nsPrintfCString markerString( - "WMFDecoderModule::CreateAudioDecoder success for manager with " - "description %s", - manager->GetDescriptionName().get()); - LOG(markerString.get()); - WFM_DECODER_MODULE_STATUS_MARKER("WMFADecoderCreation Success", markerString, - TimeStamp::NowUnfuzzed()); - RefPtr decoder = new WMFMediaDataDecoder(manager.release()); return decoder.forget(); } diff --git a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp index 7b84f2a71d63..8587c0daa50a 100644 --- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp +++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp @@ -16,15 +16,6 @@ #define LOG(...) MOZ_LOG(sPDMLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) -#ifdef MOZ_GECKO_PROFILER -# include "ProfilerMarkerPayload.h" -# define WFM_MEDIA_DATA_DECODER_STATUS_MARKER(tag, text, markerTime) \ - PROFILER_ADD_MARKER_WITH_PAYLOAD(tag, MEDIA_PLAYBACK, TextMarkerPayload, \ - (text, markerTime)) -#else -# define WFM_MEDIA_DATA_DECODER_STATUS_MARKER(tag, text, markerTime) -#endif - namespace mozilla { WMFMediaDataDecoder::WMFMediaDataDecoder(MFTManager* aMFTManager) @@ -97,14 +88,6 @@ RefPtr WMFMediaDataDecoder::ProcessError( mRecordedError = true; } - nsPrintfCString markerString( - "WMFMediaDataDecoder::ProcessError for decoder with description %s with " - "reason: %s", - GetDescriptionName().get(), aReason); - LOG(markerString.get()); - WFM_MEDIA_DATA_DECODER_STATUS_MARKER("WMFDecoder Error", markerString, - TimeStamp::NowUnfuzzed()); - // TODO: For the error DXGI_ERROR_DEVICE_RESET, we could return // NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER to get the latest device. Maybe retry // up to 3 times. diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index 100dd0e97328..e1058fc8a3bf 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -1088,7 +1088,7 @@ WMFVideoMFTManager::Output(int64_t aStreamOffset, RefPtr& aOutData) { } break; } - // Else unexpected error so bail. + // Else unexpected error, assert, and bail. NS_WARNING("WMFVideoMFTManager::Output() unexpected error"); return hr; } @@ -1133,8 +1133,8 @@ bool WMFVideoMFTManager::IsHardwareAccelerated( nsCString WMFVideoMFTManager::GetDescriptionName() const { nsCString failureReason; bool hw = IsHardwareAccelerated(failureReason); - return nsPrintfCString("wmf %s codec %s video decoder - %s", - StreamTypeString(), hw ? "hardware" : "software", + return nsPrintfCString("wmf %s video decoder - %s", + hw ? "hardware" : "software", hw ? StaticPrefs::media_wmf_use_nv12_format() && gfx::DeviceManagerDx::Get()->CanUseNV12() ? "nv12" diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.h b/dom/media/platforms/wmf/WMFVideoMFTManager.h index 1a7007ed38c1..b55059b3ce61 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.h +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.h @@ -88,21 +88,6 @@ class WMFVideoMFTManager : public MFTManager { StreamType mStreamType; - // Get a string representation of the stream type. Useful for logging. - inline const char* StreamTypeString() const { - switch (mStreamType) { - case StreamType::H264: - return "H264"; - case StreamType::VP8: - return "VP8"; - case StreamType::VP9: - return "VP9"; - default: - MOZ_ASSERT(mStreamType == StreamType::Unknown); - return "Unknown"; - } - } - const GUID& GetMFTGUID(); const GUID& GetMediaSubtypeGUID();