diff options
Diffstat (limited to 'dom/media')
-rw-r--r-- | dom/media/android/AndroidMediaPluginHost.cpp | 4 | ||||
-rw-r--r-- | dom/media/gmp/GMPChild.cpp | 15 | ||||
-rw-r--r-- | dom/media/gmp/GMPChild.h | 3 | ||||
-rw-r--r-- | dom/media/gmp/GMPParent.cpp | 18 | ||||
-rw-r--r-- | dom/media/gmp/GMPParent.h | 3 | ||||
-rw-r--r-- | dom/media/gmp/PGMP.ipdl | 3 | ||||
-rw-r--r-- | dom/media/ipc/VideoDecoderChild.cpp | 1 | ||||
-rw-r--r-- | dom/media/ipc/VideoDecoderManagerParent.cpp | 2 | ||||
-rw-r--r-- | dom/media/mediasource/ContainerParser.cpp | 6 | ||||
-rw-r--r-- | dom/media/ogg/OggCodecState.cpp | 7 | ||||
-rw-r--r-- | dom/media/platforms/wmf/DXVA2Manager.cpp | 9 |
11 files changed, 9 insertions, 62 deletions
diff --git a/dom/media/android/AndroidMediaPluginHost.cpp b/dom/media/android/AndroidMediaPluginHost.cpp index cc3adbbd3..d4c4fc59e 100644 --- a/dom/media/android/AndroidMediaPluginHost.cpp +++ b/dom/media/android/AndroidMediaPluginHost.cpp @@ -12,7 +12,6 @@ #include "nsXPCOMStrings.h" #include "nsISeekableStream.h" #include "nsIGfxInfo.h" -#include "gfxCrashReporterUtils.h" #include "prmem.h" #include "prlink.h" #include "AndroidMediaResourceServer.h" @@ -109,8 +108,6 @@ static bool IsOmxSupported() return false; } - ScopedGfxFeatureReporter reporter("Stagefright", forceEnabled); - if (!forceEnabled) { nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo(); if (gfxInfo) { @@ -125,7 +122,6 @@ static bool IsOmxSupported() } } - reporter.SetSuccessful(); return true; } diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index f83a927ca..14b06cc72 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -18,7 +18,6 @@ #include "gmp-video-decode.h" #include "gmp-video-encode.h" #include "GMPPlatform.h" -#include "mozilla/dom/CrashReporterChild.h" #include "mozilla/ipc/ProcessChild.h" #include "GMPUtils.h" #include "prio.h" @@ -26,7 +25,6 @@ #include "widevine-adapter/WidevineAdapter.h" using namespace mozilla::ipc; -using mozilla::dom::CrashReporterChild; static const int MAX_VOUCHER_LENGTH = 500000; @@ -331,19 +329,6 @@ GMPChild::ProcessingError(Result aCode, const char* aReason) } } -mozilla::dom::PCrashReporterChild* -GMPChild::AllocPCrashReporterChild(const NativeThreadId& aThread) -{ - return new CrashReporterChild(); -} - -bool -GMPChild::DeallocPCrashReporterChild(PCrashReporterChild* aCrashReporter) -{ - delete aCrashReporter; - return true; -} - PGMPTimerChild* GMPChild::AllocPGMPTimerChild() { diff --git a/dom/media/gmp/GMPChild.h b/dom/media/gmp/GMPChild.h index a4f688901..722e4c7a9 100644 --- a/dom/media/gmp/GMPChild.h +++ b/dom/media/gmp/GMPChild.h @@ -52,9 +52,6 @@ private: bool AnswerStartPlugin(const nsString& aAdapter) override; bool RecvPreloadLibs(const nsCString& aLibs) override; - PCrashReporterChild* AllocPCrashReporterChild(const NativeThreadId& aThread) override; - bool DeallocPCrashReporterChild(PCrashReporterChild*) override; - PGMPTimerChild* AllocPGMPTimerChild() override; bool DeallocPGMPTimerChild(PGMPTimerChild* aActor) override; diff --git a/dom/media/gmp/GMPParent.cpp b/dom/media/gmp/GMPParent.cpp index 851634ce7..40c3e5141 100644 --- a/dom/media/gmp/GMPParent.cpp +++ b/dom/media/gmp/GMPParent.cpp @@ -22,8 +22,6 @@ #include "MediaPrefs.h" #include "VideoUtils.h" -#include "mozilla/dom/CrashReporterParent.h" -using mozilla::dom::CrashReporterParent; using mozilla::ipc::GeckoChildProcessHost; #include "mozilla/Telemetry.h" @@ -580,22 +578,6 @@ GMPParent::ActorDestroy(ActorDestroyReason aWhy) } } -mozilla::dom::PCrashReporterParent* -GMPParent::AllocPCrashReporterParent(const NativeThreadId& aThread) -{ - MOZ_ASSERT(false, "Should only be sent if crash reporting is enabled."); - CrashReporterParent* cr = new CrashReporterParent(); - cr->SetChildData(aThread, GeckoProcessType_GMPlugin); - return cr; -} - -bool -GMPParent::DeallocPCrashReporterParent(PCrashReporterParent* aCrashReporter) -{ - delete aCrashReporter; - return true; -} - PGMPStorageParent* GMPParent::AllocPGMPStorageParent() { diff --git a/dom/media/gmp/GMPParent.h b/dom/media/gmp/GMPParent.h index 4f91ec5ba..dacd6feeb 100644 --- a/dom/media/gmp/GMPParent.h +++ b/dom/media/gmp/GMPParent.h @@ -168,9 +168,6 @@ private: RefPtr<GenericPromise> ReadChromiumManifestFile(nsIFile* aFile); // GMP thread. void ActorDestroy(ActorDestroyReason aWhy) override; - PCrashReporterParent* AllocPCrashReporterParent(const NativeThreadId& aThread) override; - bool DeallocPCrashReporterParent(PCrashReporterParent* aCrashReporter) override; - bool RecvPGMPStorageConstructor(PGMPStorageParent* actor) override; PGMPStorageParent* AllocPGMPStorageParent() override; bool DeallocPGMPStorageParent(PGMPStorageParent* aActor) override; diff --git a/dom/media/gmp/PGMP.ipdl b/dom/media/gmp/PGMP.ipdl index b421f0280..e1738d010 100644 --- a/dom/media/gmp/PGMP.ipdl +++ b/dom/media/gmp/PGMP.ipdl @@ -3,7 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -include protocol PCrashReporter; include protocol PGMPContent; include protocol PGMPTimer; include protocol PGMPStorage; @@ -17,12 +16,10 @@ intr protocol PGMP { parent opens PGMPContent; - manages PCrashReporter; manages PGMPTimer; manages PGMPStorage; parent: - async PCrashReporter(NativeThreadId tid); async PGMPTimer(); async PGMPStorage(); diff --git a/dom/media/ipc/VideoDecoderChild.cpp b/dom/media/ipc/VideoDecoderChild.cpp index d1b1d23fc..f01d3c659 100644 --- a/dom/media/ipc/VideoDecoderChild.cpp +++ b/dom/media/ipc/VideoDecoderChild.cpp @@ -238,6 +238,7 @@ VideoDecoderChild::Shutdown() SendShutdown(); } mInitialized = false; + mCallback = nullptr; } bool diff --git a/dom/media/ipc/VideoDecoderManagerParent.cpp b/dom/media/ipc/VideoDecoderManagerParent.cpp index a111b5e53..4ff9acf19 100644 --- a/dom/media/ipc/VideoDecoderManagerParent.cpp +++ b/dom/media/ipc/VideoDecoderManagerParent.cpp @@ -194,7 +194,7 @@ VideoDecoderManagerParent::RecvReadback(const SurfaceDescriptorGPUVideo& aSD, Su } RefPtr<SourceSurface> source = image->GetAsSourceSurface(); - if (!image) { + if (!source) { *aResult = null_t(); return true; } diff --git a/dom/media/mediasource/ContainerParser.cpp b/dom/media/mediasource/ContainerParser.cpp index 5267e9315..4ae37d7e9 100644 --- a/dom/media/mediasource/ContainerParser.cpp +++ b/dom/media/mediasource/ContainerParser.cpp @@ -390,7 +390,7 @@ private: "ftyp", "moov", // init segment "pdin", "free", "sidx", // optional prior moov box "styp", "moof", "mdat", // media segment - "mfra", "skip", "meta", "meco", "ssix", "prft" // others. + "mfra", "skip", "meta", "meco", "ssix", "prft", // others. "pssh", // optional with encrypted EME, though ignored. "emsg", // ISO23009-1:2014 Section 5.10.3.3 "bloc", "uuid" // boxes accepted by chrome. @@ -588,8 +588,8 @@ public: return false; } size_t header_length = have_crc ? 9 : 7; - size_t data_length = (((*aData)[3] & 0x03) << 11) || - (((*aData)[4] & 0xff) << 3) || + size_t data_length = (((*aData)[3] & 0x03) << 11) | + (((*aData)[4] & 0xff) << 3) | (((*aData)[5] & 0xe0) >> 5); uint8_t frames = ((*aData)[6] & 0x03) + 1; MOZ_ASSERT(frames > 0); diff --git a/dom/media/ogg/OggCodecState.cpp b/dom/media/ogg/OggCodecState.cpp index e7e1ca4a3..d03508411 100644 --- a/dom/media/ogg/OggCodecState.cpp +++ b/dom/media/ogg/OggCodecState.cpp @@ -1229,12 +1229,13 @@ already_AddRefed<MediaRawData> OpusState::PacketOutAsMediaRawData() { ogg_packet* packet = PacketPeek(); - uint32_t frames = 0; - const int64_t endFrame = packet->granulepos; - if (!packet) { return nullptr; } + + uint32_t frames = 0; + const int64_t endFrame = packet->granulepos; + if (packet->e_o_s) { frames = GetOpusDeltaGP(packet); } diff --git a/dom/media/platforms/wmf/DXVA2Manager.cpp b/dom/media/platforms/wmf/DXVA2Manager.cpp index 9fdb0fa20..0c1734c54 100644 --- a/dom/media/platforms/wmf/DXVA2Manager.cpp +++ b/dom/media/platforms/wmf/DXVA2Manager.cpp @@ -21,7 +21,6 @@ #include "MFTDecoder.h" #include "DriverCrashGuard.h" #include "nsPrintfCString.h" -#include "gfxCrashReporterUtils.h" #include "VideoUtils.h" const CLSID CLSID_VideoProcessorMFT = @@ -271,8 +270,6 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, { MOZ_ASSERT(NS_IsMainThread()); - ScopedGfxFeatureReporter reporter("DXVA2D3D9"); - gfx::D3D9VideoCrashGuard crashGuard; if (crashGuard.Crashed()) { NS_WARNING("DXVA2D3D9 crash detected"); @@ -448,8 +445,6 @@ D3D9DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D9)); - reporter.SetSuccessful(); - return S_OK; } @@ -645,8 +640,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, { HRESULT hr; - ScopedGfxFeatureReporter reporter("DXVA2D3D11"); - gfx::D3D11VideoCrashGuard crashGuard; if (crashGuard.Crashed()) { NS_WARNING("DXVA2D3D11 crash detected"); @@ -785,8 +778,6 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor, Telemetry::Accumulate(Telemetry::MEDIA_DECODER_BACKEND_USED, uint32_t(media::MediaDecoderBackend::WMFDXVA2D3D11)); - reporter.SetSuccessful(); - return S_OK; } |