Bug 1329543 - Remove PGMPAudioDecoder. r=gerald
authorChris Pearce <cpearce@mozilla.com>
Sat, 14 Jan 2017 16:14:32 +0800
changeset 374847 8b358c1267b2f770ec2bdbdf1ce23989a2cbf8a4
parent 374846 58e504f4afdc59bda4af3c8d7ef061dee95b7f4b
child 374848 c4594994e460ba77ac186032297480eb1f52f4e1
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1329543
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1329543 - Remove PGMPAudioDecoder. r=gerald MozReview-Commit-ID: nwW4s4MtJX
dom/media/eme/MediaKeySystemAccess.cpp
dom/media/gmp/GMPAudioDecoderChild.cpp
dom/media/gmp/GMPAudioDecoderChild.h
dom/media/gmp/GMPAudioDecoderParent.cpp
dom/media/gmp/GMPAudioDecoderParent.h
dom/media/gmp/GMPAudioDecoderProxy.h
dom/media/gmp/GMPAudioHost.cpp
dom/media/gmp/GMPAudioHost.h
dom/media/gmp/GMPChild.cpp
dom/media/gmp/GMPContentChild.cpp
dom/media/gmp/GMPContentChild.h
dom/media/gmp/GMPContentParent.cpp
dom/media/gmp/GMPContentParent.h
dom/media/gmp/GMPMessageUtils.h
dom/media/gmp/GMPParent.h
dom/media/gmp/GMPService.cpp
dom/media/gmp/GMPService.h
dom/media/gmp/GMPServiceParent.cpp
dom/media/gmp/GMPTypes.ipdlh
dom/media/gmp/PGMPAudioDecoder.ipdl
dom/media/gmp/PGMPContent.ipdl
dom/media/gmp/gmp-api/gmp-audio-codec.h
dom/media/gmp/gmp-api/gmp-audio-decode.h
dom/media/gmp/gmp-api/gmp-audio-host.h
dom/media/gmp/gmp-api/gmp-audio-samples.h
dom/media/gmp/moz.build
dom/media/gmp/mozIGeckoMediaPluginService.idl
dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -22,18 +22,16 @@
 #include "mozilla/Services.h"
 #include "nsIObserverService.h"
 #include "mozilla/EMEUtils.h"
 #include "GMPUtils.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsXULAppAPI.h"
-#include "gmp-audio-decode.h"
-#include "gmp-video-decode.h"
 #include "DecoderDoctorDiagnostics.h"
 #include "WebMDecoder.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "nsUnicharUtils.h"
 #include "mozilla/dom/MediaSource.h"
 #ifdef MOZ_WIDGET_ANDROID
 #include "FennecJNIWrappers.h"
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioDecoderChild.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 "GMPAudioDecoderChild.h"
-#include "GMPContentChild.h"
-#include "GMPAudioHost.h"
-#include "mozilla/Unused.h"
-#include <stdio.h>
-
-namespace mozilla {
-namespace gmp {
-
-GMPAudioDecoderChild::GMPAudioDecoderChild(GMPContentChild* aPlugin)
-  : mPlugin(aPlugin)
-  , mAudioDecoder(nullptr)
-{
-  MOZ_ASSERT(mPlugin);
-}
-
-GMPAudioDecoderChild::~GMPAudioDecoderChild()
-{
-}
-
-void
-GMPAudioDecoderChild::Init(GMPAudioDecoder* aDecoder)
-{
-  MOZ_ASSERT(aDecoder, "Cannot initialize Audio decoder child without a Audio decoder!");
-  mAudioDecoder = aDecoder;
-}
-
-GMPAudioHostImpl&
-GMPAudioDecoderChild::Host()
-{
-  return mAudioHost;
-}
-
-void
-GMPAudioDecoderChild::Decoded(GMPAudioSamples* aDecodedSamples)
-{
-  MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
-
-  if (!aDecodedSamples) {
-    MOZ_CRASH("Not given decoded audio samples!");
-  }
-
-  GMPAudioDecodedSampleData samples;
-  samples.mData().AppendElements((int16_t*)aDecodedSamples->Buffer(),
-                                 aDecodedSamples->Size() / sizeof(int16_t));
-  samples.mTimeStamp() = aDecodedSamples->TimeStamp();
-  samples.mChannelCount() = aDecodedSamples->Channels();
-  samples.mSamplesPerSecond() = aDecodedSamples->Rate();
-
-  Unused << SendDecoded(samples);
-
-  aDecodedSamples->Destroy();
-}
-
-void
-GMPAudioDecoderChild::InputDataExhausted()
-{
-  MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
-
-  Unused << SendInputDataExhausted();
-}
-
-void
-GMPAudioDecoderChild::DrainComplete()
-{
-  MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
-
-  Unused << SendDrainComplete();
-}
-
-void
-GMPAudioDecoderChild::ResetComplete()
-{
-  MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
-
-  Unused << SendResetComplete();
-}
-
-void
-GMPAudioDecoderChild::Error(GMPErr aError)
-{
-  MOZ_ASSERT(mPlugin->GMPMessageLoop() == MessageLoop::current());
-
-  Unused << SendError(aError);
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderChild::RecvInitDecode(const GMPAudioCodecData& a)
-{
-  MOZ_ASSERT(mAudioDecoder);
-  if (!mAudioDecoder) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  GMPAudioCodec codec;
-  codec.mCodecType = a.mCodecType();
-  codec.mChannelCount = a.mChannelCount();
-  codec.mBitsPerChannel = a.mBitsPerChannel();
-  codec.mSamplesPerSecond = a.mSamplesPerSecond();
-  codec.mExtraData = a.mExtraData().Elements();
-  codec.mExtraDataLen = a.mExtraData().Length();
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mAudioDecoder->InitDecode(codec, this);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderChild::RecvDecode(const GMPAudioEncodedSampleData& aEncodedSamples)
-{
-  if (!mAudioDecoder) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  GMPAudioSamples* samples = new GMPAudioSamplesImpl(aEncodedSamples);
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mAudioDecoder->Decode(samples);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderChild::RecvReset()
-{
-  if (!mAudioDecoder) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mAudioDecoder->Reset();
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderChild::RecvDrain()
-{
-  if (!mAudioDecoder) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mAudioDecoder->Drain();
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderChild::RecvDecodingComplete()
-{
-  if (mAudioDecoder) {
-    // Ignore any return code. It is OK for this to fail without killing the process.
-    mAudioDecoder->DecodingComplete();
-    mAudioDecoder = nullptr;
-  }
-
-  mPlugin = nullptr;
-
-  Unused << Send__delete__(this);
-
-  return IPC_OK();
-}
-
-} // namespace gmp
-} // namespace mozilla
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioDecoderChild.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#ifndef GMPAudioDecoderChild_h_
-#define GMPAudioDecoderChild_h_
-
-#include "mozilla/gmp/PGMPAudioDecoderChild.h"
-#include "gmp-audio-decode.h"
-#include "GMPAudioHost.h"
-
-namespace mozilla {
-namespace gmp {
-
-class GMPContentChild;
-
-class GMPAudioDecoderChild : public PGMPAudioDecoderChild,
-                             public GMPAudioDecoderCallback
-{
-public:
-  explicit GMPAudioDecoderChild(GMPContentChild* aPlugin);
-  virtual ~GMPAudioDecoderChild();
-
-  void Init(GMPAudioDecoder* aDecoder);
-  GMPAudioHostImpl& Host();
-
-  // GMPAudioDecoderCallback
-  void Decoded(GMPAudioSamples* aEncodedSamples) override;
-  void InputDataExhausted() override;
-  void DrainComplete() override;
-  void ResetComplete() override;
-  void Error(GMPErr aError) override;
-
-private:
-  // PGMPAudioDecoderChild
-  mozilla::ipc::IPCResult RecvInitDecode(const GMPAudioCodecData& codecSettings) override;
-  mozilla::ipc::IPCResult RecvDecode(const GMPAudioEncodedSampleData& input) override;
-  mozilla::ipc::IPCResult RecvReset() override;
-  mozilla::ipc::IPCResult RecvDrain() override;
-  mozilla::ipc::IPCResult RecvDecodingComplete() override;
-
-  GMPContentChild* mPlugin;
-  GMPAudioDecoder* mAudioDecoder;
-  GMPAudioHostImpl mAudioHost;
-};
-
-} // namespace gmp
-} // namespace mozilla
-
-#endif // GMPAudioDecoderChild_h_
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioDecoderParent.cpp
+++ /dev/null
@@ -1,369 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 "GMPAudioDecoderParent.h"
-#include "GMPContentParent.h"
-#include <stdio.h>
-#include "mozilla/Unused.h"
-#include "GMPMessageUtils.h"
-#include "nsThreadUtils.h"
-#include "mozilla/Logging.h"
-
-namespace mozilla {
-
-#ifdef LOG
-#undef LOG
-#endif
-
-extern LogModule* GetGMPLog();
-
-#define LOGV(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Verbose, msg)
-#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
-#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
-
-namespace gmp {
-
-GMPAudioDecoderParent::GMPAudioDecoderParent(GMPContentParent* aPlugin)
-  : mIsOpen(false)
-  , mShuttingDown(false)
-  , mActorDestroyed(false)
-  , mIsAwaitingResetComplete(false)
-  , mIsAwaitingDrainComplete(false)
-  , mPlugin(aPlugin)
-  , mCallback(nullptr)
-{
-  MOZ_ASSERT(mPlugin);
-}
-
-GMPAudioDecoderParent::~GMPAudioDecoderParent()
-{
-}
-
-nsresult
-GMPAudioDecoderParent::InitDecode(GMPAudioCodecType aCodecType,
-                                  uint32_t aChannelCount,
-                                  uint32_t aBitsPerChannel,
-                                  uint32_t aSamplesPerSecond,
-                                  nsTArray<uint8_t>& aExtraData,
-                                  GMPAudioDecoderCallbackProxy* aCallback)
-{
-  LOGD(("GMPAudioDecoderParent[%p]::InitDecode()", this));
-
-  if (mIsOpen) {
-    NS_WARNING("Trying to re-init an in-use GMP audio decoder!");
-    return NS_ERROR_FAILURE;
-  }
-
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  if (!aCallback) {
-    return NS_ERROR_FAILURE;
-  }
-  mCallback = aCallback;
-
-  GMPAudioCodecData data;
-  data.mCodecType() = aCodecType;
-  data.mChannelCount() = aChannelCount;
-  data.mBitsPerChannel() = aBitsPerChannel;
-  data.mSamplesPerSecond() = aSamplesPerSecond;
-  data.mExtraData() = aExtraData;
-  if (!SendInitDecode(data)) {
-    return NS_ERROR_FAILURE;
-  }
-  mIsOpen = true;
-
-  // Async IPC, we don't have access to a return value.
-  return NS_OK;
-}
-
-nsresult
-GMPAudioDecoderParent::Decode(GMPAudioSamplesImpl& aEncodedSamples)
-{
-  LOGV(("GMPAudioDecoderParent[%p]::Decode() timestamp=%lld",
-        this, aEncodedSamples.TimeStamp()));
-
-  if (!mIsOpen) {
-    NS_WARNING("Trying to use a dead GMP Audio decoder!");
-    return NS_ERROR_FAILURE;
-  }
-
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  GMPAudioEncodedSampleData samples;
-  aEncodedSamples.RelinquishData(samples);
-
-  if (!SendDecode(samples)) {
-    return NS_ERROR_FAILURE;
-  }
-
-  // Async IPC, we don't have access to a return value.
-  return NS_OK;
-}
-
-nsresult
-GMPAudioDecoderParent::Reset()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::Reset()", this));
-
-  if (!mIsOpen) {
-    NS_WARNING("Trying to use a dead GMP Audio decoder!");
-    return NS_ERROR_FAILURE;
-  }
-
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  if (!SendReset()) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mIsAwaitingResetComplete = true;
-
-  // Async IPC, we don't have access to a return value.
-  return NS_OK;
-}
-
-nsresult
-GMPAudioDecoderParent::Drain()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::Drain()", this));
-
-  if (!mIsOpen) {
-    NS_WARNING("Trying to use a dead GMP Audio decoder!");
-    return NS_ERROR_FAILURE;
-  }
-
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  if (!SendDrain()) {
-    return NS_ERROR_FAILURE;
-  }
-
-  mIsAwaitingDrainComplete = true;
-
-  // Async IPC, we don't have access to a return value.
-  return NS_OK;
-}
-
-// Note: Consider keeping ActorDestroy sync'd up when making changes here.
-nsresult
-GMPAudioDecoderParent::Close()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::Close()", this));
-  MOZ_ASSERT(!mPlugin || mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  // Ensure if we've received a Close while waiting for a ResetComplete
-  // or DrainComplete notification, we'll unblock the caller before processing
-  // the close. This seems unlikely to happen, but better to be careful.
-  UnblockResetAndDrain();
-
-  // Consumer is done with us; we can shut down.  No more callbacks should
-  // be made to mCallback.  Note: do this before Shutdown()!
-  mCallback = nullptr;
-  // Let Shutdown mark us as dead so it knows if we had been alive
-
-  // In case this is the last reference
-  RefPtr<GMPAudioDecoderParent> kungfudeathgrip(this);
-  Release();
-  Shutdown();
-
-  return NS_OK;
-}
-
-// Note: Consider keeping ActorDestroy sync'd up when making changes here.
-nsresult
-GMPAudioDecoderParent::Shutdown()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::Shutdown()", this));
-  MOZ_ASSERT(!mPlugin || mPlugin->GMPThread() == NS_GetCurrentThread());
-
-  if (mShuttingDown) {
-    return NS_OK;
-  }
-  mShuttingDown = true;
-
-  // Ensure if we've received a shutdown while waiting for a ResetComplete
-  // or DrainComplete notification, we'll unblock the caller before processing
-  // the shutdown.
-  UnblockResetAndDrain();
-
-  // Notify client we're gone!  Won't occur after Close()
-  if (mCallback) {
-    mCallback->Terminated();
-    mCallback = nullptr;
-  }
-
-  mIsOpen = false;
-  if (!mActorDestroyed) {
-    Unused << SendDecodingComplete();
-  }
-
-  return NS_OK;
-}
-
-// Note: Keep this sync'd up with DecodingComplete
-void
-GMPAudioDecoderParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  LOGD(("GMPAudioDecoderParent[%p]::ActorDestroy(reason=%d)", this, aWhy));
-
-  mIsOpen = false;
-  mActorDestroyed = true;
-
-  // Ensure if we've received a destroy while waiting for a ResetComplete
-  // or DrainComplete notification, we'll unblock the caller before processing
-  // the error.
-  UnblockResetAndDrain();
-
-  if (mCallback) {
-    // May call Close() (and Shutdown()) immediately or with a delay
-    mCallback->Terminated();
-    mCallback = nullptr;
-  }
-  if (mPlugin) {
-    // Ignore any return code. It is OK for this to fail without killing the process.
-    mPlugin->AudioDecoderDestroyed(this);
-    mPlugin = nullptr;
-  }
-  MaybeDisconnect(aWhy == AbnormalShutdown);
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvDecoded(const GMPAudioDecodedSampleData& aDecoded)
-{
-  LOGV(("GMPAudioDecoderParent[%p]::RecvDecoded() timestamp=%lld",
-        this, aDecoded.mTimeStamp()));
-
-  if (!mCallback) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  mCallback->Decoded(aDecoded.mData(),
-                     aDecoded.mTimeStamp(),
-                     aDecoded.mChannelCount(),
-                     aDecoded.mSamplesPerSecond());
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvInputDataExhausted()
-{
-  LOGV(("GMPAudioDecoderParent[%p]::RecvInputDataExhausted()", this));
-
-  if (!mCallback) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mCallback->InputDataExhausted();
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvDrainComplete()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::RecvDrainComplete()", this));
-
-  if (!mCallback) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  if (!mIsAwaitingDrainComplete) {
-    return IPC_OK();
-  }
-  mIsAwaitingDrainComplete = false;
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mCallback->DrainComplete();
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvResetComplete()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::RecvResetComplete()", this));
-
-  if (!mCallback) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  if (!mIsAwaitingResetComplete) {
-    return IPC_OK();
-  }
-  mIsAwaitingResetComplete = false;
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mCallback->ResetComplete();
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvError(const GMPErr& aError)
-{
-  LOGD(("GMPAudioDecoderParent[%p]::RecvError(error=%d)", this, aError));
-
-  if (!mCallback) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  // Ensure if we've received an error while waiting for a ResetComplete
-  // or DrainComplete notification, we'll unblock the caller before processing
-  // the error.
-  UnblockResetAndDrain();
-
-  // Ignore any return code. It is OK for this to fail without killing the process.
-  mCallback->Error(aError);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::RecvShutdown()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::RecvShutdown()", this));
-
-  Shutdown();
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
-GMPAudioDecoderParent::Recv__delete__()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::Recv__delete__()", this));
-
-  if (mPlugin) {
-    // Ignore any return code. It is OK for this to fail without killing the process.
-    mPlugin->AudioDecoderDestroyed(this);
-    mPlugin = nullptr;
-  }
-
-  return IPC_OK();
-}
-
-void
-GMPAudioDecoderParent::UnblockResetAndDrain()
-{
-  LOGD(("GMPAudioDecoderParent[%p]::UnblockResetAndDrain()", this));
-
-  if (!mCallback) {
-    MOZ_ASSERT(!mIsAwaitingResetComplete);
-    MOZ_ASSERT(!mIsAwaitingDrainComplete);
-    return;
-  }
-  if (mIsAwaitingResetComplete) {
-    mIsAwaitingResetComplete = false;
-    mCallback->ResetComplete();
-  }
-  if (mIsAwaitingDrainComplete) {
-    mIsAwaitingDrainComplete = false;
-    mCallback->DrainComplete();
-  }
-}
-
-} // namespace gmp
-} // namespace mozilla
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioDecoderParent.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#ifndef GMPAudioDecoderParent_h_
-#define GMPAudioDecoderParent_h_
-
-#include "mozilla/RefPtr.h"
-#include "gmp-audio-decode.h"
-#include "gmp-audio-codec.h"
-#include "mozilla/gmp/PGMPAudioDecoderParent.h"
-#include "GMPMessageUtils.h"
-#include "GMPAudioDecoderProxy.h"
-#include "GMPCrashHelperHolder.h"
-
-namespace mozilla {
-namespace gmp {
-
-class GMPContentParent;
-
-class GMPAudioDecoderParent final : public GMPAudioDecoderProxy
-                                  , public PGMPAudioDecoderParent
-                                  , public GMPCrashHelperHolder
-{
-public:
-  NS_INLINE_DECL_REFCOUNTING(GMPAudioDecoderParent)
-
-  explicit GMPAudioDecoderParent(GMPContentParent *aPlugin);
-
-  nsresult Shutdown();
-
-  // GMPAudioDecoderProxy
-  nsresult InitDecode(GMPAudioCodecType aCodecType,
-                      uint32_t aChannelCount,
-                      uint32_t aBitsPerChannel,
-                      uint32_t aSamplesPerSecond,
-                      nsTArray<uint8_t>& aExtraData,
-                      GMPAudioDecoderCallbackProxy* aCallback) override;
-  nsresult Decode(GMPAudioSamplesImpl& aInput) override;
-  nsresult Reset() override;
-  nsresult Drain() override;
-  nsresult Close() override;
-
-private:
-  ~GMPAudioDecoderParent();
-
-  // PGMPAudioDecoderParent
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-  mozilla::ipc::IPCResult RecvDecoded(const GMPAudioDecodedSampleData& aDecoded) override;
-  mozilla::ipc::IPCResult RecvInputDataExhausted() override;
-  mozilla::ipc::IPCResult RecvDrainComplete() override;
-  mozilla::ipc::IPCResult RecvResetComplete() override;
-  mozilla::ipc::IPCResult RecvError(const GMPErr& aError) override;
-  mozilla::ipc::IPCResult RecvShutdown() override;
-  mozilla::ipc::IPCResult Recv__delete__() override;
-
-  void UnblockResetAndDrain();
-
-  bool mIsOpen;
-  bool mShuttingDown;
-  bool mActorDestroyed;
-  bool mIsAwaitingResetComplete;
-  bool mIsAwaitingDrainComplete;
-  RefPtr<GMPContentParent> mPlugin;
-  GMPAudioDecoderCallbackProxy* mCallback;
-};
-
-} // namespace gmp
-} // namespace mozilla
-
-#endif // GMPAudioDecoderParent_h_
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioDecoderProxy.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#ifndef GMPAudioDecoderProxy_h_
-#define GMPAudioDecoderProxy_h_
-
-#include "GMPCallbackBase.h"
-#include "gmp-audio-codec.h"
-#include "GMPAudioHost.h"
-#include "nsTArray.h"
-#include "mozilla/gmp/GMPTypes.h"
-
-class GMPAudioDecoderCallbackProxy : public GMPCallbackBase {
-public:
-  virtual ~GMPAudioDecoderCallbackProxy() {}
-  // Note: aChannelCount and aSamplesPerSecond may not be consistent from
-  // one invocation to the next.
-  virtual void Decoded(const nsTArray<int16_t>& aPCM,
-                       uint64_t aTimeStamp,
-                       uint32_t aChannelCount,
-                       uint32_t aSamplesPerSecond) = 0;
-  virtual void InputDataExhausted() = 0;
-  virtual void DrainComplete() = 0;
-  virtual void ResetComplete() = 0;
-  virtual void Error(GMPErr aError) = 0;
-};
-
-class GMPAudioDecoderProxy {
-public:
-  virtual ~GMPAudioDecoderProxy() {}
-
-  virtual nsresult InitDecode(GMPAudioCodecType aCodecType,
-                              uint32_t aChannelCount,
-                              uint32_t aBitsPerChannel,
-                              uint32_t aSamplesPerSecond,
-                              nsTArray<uint8_t>& aExtraData,
-                              GMPAudioDecoderCallbackProxy* aCallback) = 0;
-  virtual nsresult Decode(mozilla::gmp::GMPAudioSamplesImpl& aSamples) = 0;
-  virtual nsresult Reset() = 0;
-  virtual nsresult Drain() = 0;
-  // Call to tell GMP/plugin the consumer will no longer use this
-  // interface/codec.
-  virtual nsresult Close() = 0;
-};
-
-#endif // GMPAudioDecoderProxy_h_
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioHost.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 "GMPAudioHost.h"
-#include "gmp-audio-samples.h"
-#include "gmp-errors.h"
-#include "GMPEncryptedBufferDataImpl.h"
-#include "MediaData.h"
-
-namespace mozilla {
-namespace gmp {
-
-GMPAudioSamplesImpl::GMPAudioSamplesImpl(GMPAudioFormat aFormat)
-  : mFormat(aFormat)
-  , mTimeStamp(0)
-  , mChannels(0)
-  , mRate(0)
-{
-}
-
-GMPAudioSamplesImpl::GMPAudioSamplesImpl(const GMPAudioEncodedSampleData& aData)
-  : mFormat(kGMPAudioEncodedSamples)
-  , mBuffer(aData.mData())
-  , mTimeStamp(aData.mTimeStamp())
-  , mChannels(aData.mChannelCount())
-  , mRate(aData.mSamplesPerSecond())
-{
-  if (aData.mDecryptionData().mKeyId().Length() > 0) {
-    mCrypto = new GMPEncryptedBufferDataImpl(aData.mDecryptionData());
-  }
-}
-
-GMPAudioSamplesImpl::GMPAudioSamplesImpl(MediaRawData* aSample,
-                                         uint32_t aChannels,
-                                         uint32_t aRate)
- : mFormat(kGMPAudioEncodedSamples)
- , mTimeStamp(aSample->mTime)
- , mChannels(aChannels)
- , mRate(aRate)
-{
-  mBuffer.AppendElements(aSample->Data(), aSample->Size());
-  if (aSample->mCrypto.mValid) {
-    mCrypto = new GMPEncryptedBufferDataImpl(aSample->mCrypto);
-  }
-}
-
-GMPAudioSamplesImpl::~GMPAudioSamplesImpl()
-{
-}
-
-GMPAudioFormat
-GMPAudioSamplesImpl::GetFormat()
-{
-  return mFormat;
-}
-
-void
-GMPAudioSamplesImpl::Destroy()
-{
-  delete this;
-}
-
-GMPErr
-GMPAudioSamplesImpl::SetBufferSize(uint32_t aSize)
-{
-  mBuffer.SetLength(aSize);
-  return GMPNoErr;
-}
-
-uint32_t
-GMPAudioSamplesImpl::Size()
-{
-  return mBuffer.Length();
-}
-
-void
-GMPAudioSamplesImpl::SetTimeStamp(uint64_t aTimeStamp)
-{
-  mTimeStamp = aTimeStamp;
-}
-
-uint64_t
-GMPAudioSamplesImpl::TimeStamp()
-{
-  return mTimeStamp;
-}
-
-const uint8_t*
-GMPAudioSamplesImpl::Buffer() const
-{
-  return mBuffer.Elements();
-}
-
-uint8_t*
-GMPAudioSamplesImpl::Buffer()
-{
-  return mBuffer.Elements();
-}
-
-const GMPEncryptedBufferMetadata*
-GMPAudioSamplesImpl::GetDecryptionData() const
-{
-  return mCrypto;
-}
-
-void
-GMPAudioSamplesImpl::InitCrypto(const CryptoSample& aCrypto)
-{
-  if (!aCrypto.mValid) {
-    return;
-  }
-  mCrypto = new GMPEncryptedBufferDataImpl(aCrypto);
-}
-
-void
-GMPAudioSamplesImpl::RelinquishData(GMPAudioEncodedSampleData& aData)
-{
-  aData.mData() = Move(mBuffer);
-  aData.mTimeStamp() = TimeStamp();
-  if (mCrypto) {
-    mCrypto->RelinquishData(aData.mDecryptionData());
-  }
-}
-
-uint32_t
-GMPAudioSamplesImpl::Channels() const
-{
-  return mChannels;
-}
-
-void
-GMPAudioSamplesImpl::SetChannels(uint32_t aChannels)
-{
-  mChannels = aChannels;
-}
-
-uint32_t
-GMPAudioSamplesImpl::Rate() const
-{
-  return mRate;
-}
-
-void
-GMPAudioSamplesImpl::SetRate(uint32_t aRate)
-{
-  mRate = aRate;
-}
-
-
-GMPErr
-GMPAudioHostImpl::CreateSamples(GMPAudioFormat aFormat,
-                                GMPAudioSamples** aSamples)
-{
-
-  *aSamples = new GMPAudioSamplesImpl(aFormat);
-  return GMPNoErr;
-}
-
-} // namespace gmp
-} // namespace mozilla
deleted file mode 100644
--- a/dom/media/gmp/GMPAudioHost.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#ifndef GMPAudioHost_h_
-#define GMPAudioHost_h_
-
-#include "gmp-audio-host.h"
-#include "gmp-audio-samples.h"
-#include "nsTArray.h"
-#include "gmp-decryption.h"
-#include "nsAutoPtr.h"
-#include "GMPEncryptedBufferDataImpl.h"
-#include "mozilla/gmp/GMPTypes.h"
-
-namespace mozilla {
-class CryptoSample;
-class MediaRawData;
-
-namespace gmp {
-
-class GMPAudioSamplesImpl : public GMPAudioSamples {
-public:
-  explicit GMPAudioSamplesImpl(GMPAudioFormat aFormat);
-  explicit GMPAudioSamplesImpl(const GMPAudioEncodedSampleData& aData);
-  GMPAudioSamplesImpl(MediaRawData* aSample,
-                      uint32_t aChannels,
-                      uint32_t aRate);
-  virtual ~GMPAudioSamplesImpl();
-
-  GMPAudioFormat GetFormat() override;
-  void Destroy() override;
-  GMPErr SetBufferSize(uint32_t aSize) override;
-  uint32_t Size() override;
-  void SetTimeStamp(uint64_t aTimeStamp) override;
-  uint64_t TimeStamp() override;
-  const uint8_t* Buffer() const override;
-  uint8_t* Buffer() override;
-  const GMPEncryptedBufferMetadata* GetDecryptionData() const override;
-
-  void InitCrypto(const CryptoSample& aCrypto);
-
-  void RelinquishData(GMPAudioEncodedSampleData& aData);
-
-  uint32_t Channels() const override;
-  void SetChannels(uint32_t aChannels) override;
-  uint32_t Rate() const override;
-  void SetRate(uint32_t aRate) override;
-
-private:
-  GMPAudioFormat mFormat;
-  nsTArray<uint8_t> mBuffer;
-  int64_t mTimeStamp;
-  nsAutoPtr<GMPEncryptedBufferDataImpl> mCrypto;
-  uint32_t mChannels;
-  uint32_t mRate;
-};
-
-class GMPAudioHostImpl : public GMPAudioHost
-{
-public:
-  GMPErr CreateSamples(GMPAudioFormat aFormat,
-                       GMPAudioSamples** aSamples) override;
-private:
-};
-
-} // namespace gmp
-} // namespace mozilla
-
-#endif // GMPAudioHost_h_
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "GMPChild.h"
 #include "GMPContentChild.h"
 #include "GMPProcessChild.h"
 #include "GMPLoader.h"
 #include "GMPVideoDecoderChild.h"
 #include "GMPVideoEncoderChild.h"
-#include "GMPAudioDecoderChild.h"
 #include "GMPDecryptorChild.h"
 #include "GMPVideoHost.h"
 #include "nsDebugImpl.h"
 #include "nsIFile.h"
 #include "nsXULAppAPI.h"
 #include "gmp-video-decode.h"
 #include "gmp-video-encode.h"
 #include "GMPPlatform.h"
--- a/dom/media/gmp/GMPContentChild.cpp
+++ b/dom/media/gmp/GMPContentChild.cpp
@@ -1,16 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "GMPContentChild.h"
 #include "GMPChild.h"
-#include "GMPAudioDecoderChild.h"
 #include "GMPDecryptorChild.h"
 #include "GMPVideoDecoderChild.h"
 #include "GMPVideoEncoderChild.h"
 #include "base/task.h"
 
 namespace mozilla {
 namespace gmp {
 
@@ -44,29 +43,16 @@ GMPContentChild::ActorDestroy(ActorDestr
 }
 
 void
 GMPContentChild::ProcessingError(Result aCode, const char* aReason)
 {
   mGMPChild->ProcessingError(aCode, aReason);
 }
 
-PGMPAudioDecoderChild*
-GMPContentChild::AllocPGMPAudioDecoderChild()
-{
-  return new GMPAudioDecoderChild(this);
-}
-
-bool
-GMPContentChild::DeallocPGMPAudioDecoderChild(PGMPAudioDecoderChild* aActor)
-{
-  delete aActor;
-  return true;
-}
-
 PGMPDecryptorChild*
 GMPContentChild::AllocPGMPDecryptorChild()
 {
   GMPDecryptorChild* actor = new GMPDecryptorChild(this,
                                                    mGMPChild->mPluginVoucher,
                                                    mGMPChild->mSandboxVoucher);
   actor->AddRef();
   return actor;
@@ -223,32 +209,16 @@ GMPContentChild::RecvPGMPDecryptorConstr
   }
 
   child->Init(decryptor);
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
-GMPContentChild::RecvPGMPAudioDecoderConstructor(PGMPAudioDecoderChild* aActor)
-{
-  auto vdc = static_cast<GMPAudioDecoderChild*>(aActor);
-
-  void* vd = nullptr;
-  GMPErr err = mGMPChild->GetAPI(GMP_API_AUDIO_DECODER, &vdc->Host(), &vd);
-  if (err != GMPNoErr || !vd) {
-    return IPC_FAIL_NO_REASON(this);
-  }
-
-  vdc->Init(static_cast<GMPAudioDecoder*>(vd));
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
 GMPContentChild::RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor,
                                                  const uint32_t& aDecryptorId)
 {
   auto vdc = static_cast<GMPVideoDecoderChild*>(aActor);
 
   void* vd = nullptr;
   GMPErr err = mGMPChild->GetAPI(GMP_API_VIDEO_DECODER, &vdc->Host(), &vd, aDecryptorId);
   if (err != GMPNoErr || !vd) {
@@ -277,22 +247,16 @@ GMPContentChild::RecvPGMPVideoEncoderCon
 
   return IPC_OK();
 }
 
 void
 GMPContentChild::CloseActive()
 {
   // Invalidate and remove any remaining API objects.
-  const ManagedContainer<PGMPAudioDecoderChild>& audioDecoders =
-    ManagedPGMPAudioDecoderChild();
-  for (auto iter = audioDecoders.ConstIter(); !iter.Done(); iter.Next()) {
-    iter.Get()->GetKey()->SendShutdown();
-  }
-
   const ManagedContainer<PGMPDecryptorChild>& decryptors =
     ManagedPGMPDecryptorChild();
   for (auto iter = decryptors.ConstIter(); !iter.Done(); iter.Next()) {
     iter.Get()->GetKey()->SendShutdown();
   }
 
   const ManagedContainer<PGMPVideoDecoderChild>& videoDecoders =
     ManagedPGMPVideoDecoderChild();
@@ -305,16 +269,15 @@ GMPContentChild::CloseActive()
   for (auto iter = videoEncoders.ConstIter(); !iter.Done(); iter.Next()) {
     iter.Get()->GetKey()->SendShutdown();
   }
 }
 
 bool
 GMPContentChild::IsUsed()
 {
-  return !ManagedPGMPAudioDecoderChild().IsEmpty() ||
-         !ManagedPGMPDecryptorChild().IsEmpty() ||
+  return !ManagedPGMPDecryptorChild().IsEmpty() ||
          !ManagedPGMPVideoDecoderChild().IsEmpty() ||
          !ManagedPGMPVideoEncoderChild().IsEmpty();
 }
 
 } // namespace gmp
 } // namespace mozilla
--- a/dom/media/gmp/GMPContentChild.h
+++ b/dom/media/gmp/GMPContentChild.h
@@ -18,24 +18,20 @@ class GMPContentChild : public PGMPConte
                       , public GMPSharedMem
 {
 public:
   explicit GMPContentChild(GMPChild* aChild);
   virtual ~GMPContentChild();
 
   MessageLoop* GMPMessageLoop();
 
-  mozilla::ipc::IPCResult RecvPGMPAudioDecoderConstructor(PGMPAudioDecoderChild* aActor) override;
   mozilla::ipc::IPCResult RecvPGMPDecryptorConstructor(PGMPDecryptorChild* aActor) override;
   mozilla::ipc::IPCResult RecvPGMPVideoDecoderConstructor(PGMPVideoDecoderChild* aActor, const uint32_t& aDecryptorId) override;
   mozilla::ipc::IPCResult RecvPGMPVideoEncoderConstructor(PGMPVideoEncoderChild* aActor) override;
 
-  PGMPAudioDecoderChild* AllocPGMPAudioDecoderChild() override;
-  bool DeallocPGMPAudioDecoderChild(PGMPAudioDecoderChild* aActor) override;
-
   PGMPDecryptorChild* AllocPGMPDecryptorChild() override;
   bool DeallocPGMPDecryptorChild(PGMPDecryptorChild* aActor) override;
 
   PGMPVideoDecoderChild* AllocPGMPVideoDecoderChild(const uint32_t& aDecryptorId) override;
   bool DeallocPGMPVideoDecoderChild(PGMPVideoDecoderChild* aActor) override;
 
   PGMPVideoEncoderChild* AllocPGMPVideoEncoderChild() override;
   bool DeallocPGMPVideoEncoderChild(PGMPVideoEncoderChild* aActor) override;
--- a/dom/media/gmp/GMPContentParent.cpp
+++ b/dom/media/gmp/GMPContentParent.cpp
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "GMPContentParent.h"
-#include "GMPAudioDecoderParent.h"
 #include "GMPDecryptorParent.h"
 #include "GMPParent.h"
 #include "GMPServiceChild.h"
 #include "GMPVideoDecoderParent.h"
 #include "GMPVideoEncoderParent.h"
 #include "mozIGeckoMediaPluginService.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Unused.h"
@@ -61,39 +60,29 @@ public:
 
 private:
   RefPtr<GMPContentParent> mToRelease;
 };
 
 void
 GMPContentParent::ActorDestroy(ActorDestroyReason aWhy)
 {
-  MOZ_ASSERT(mAudioDecoders.IsEmpty() &&
-             mDecryptors.IsEmpty() &&
+  MOZ_ASSERT(mDecryptors.IsEmpty() &&
              mVideoDecoders.IsEmpty() &&
              mVideoEncoders.IsEmpty());
   NS_DispatchToCurrentThread(new ReleaseGMPContentParent(this));
 }
 
 void
 GMPContentParent::CheckThread()
 {
   MOZ_ASSERT(mGMPThread == NS_GetCurrentThread());
 }
 
 void
-GMPContentParent::AudioDecoderDestroyed(GMPAudioDecoderParent* aDecoder)
-{
-  MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
-
-  MOZ_ALWAYS_TRUE(mAudioDecoders.RemoveElement(aDecoder));
-  CloseIfUnused();
-}
-
-void
 GMPContentParent::VideoDecoderDestroyed(GMPVideoDecoderParent* aDecoder)
 {
   MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
 
   // If the constructor fails, we'll get called before it's added
   Unused << NS_WARN_IF(!mVideoDecoders.RemoveElement(aDecoder));
   CloseIfUnused();
 }
@@ -130,18 +119,17 @@ GMPContentParent::RemoveCloseBlocker()
   MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
   --mCloseBlockerCount;
   CloseIfUnused();
 }
 
 void
 GMPContentParent::CloseIfUnused()
 {
-  if (mAudioDecoders.IsEmpty() &&
-      mDecryptors.IsEmpty() &&
+  if (mDecryptors.IsEmpty() &&
       mVideoDecoders.IsEmpty() &&
       mVideoEncoders.IsEmpty() &&
       mCloseBlockerCount == 0) {
     RefPtr<GMPContentParent> toClose;
     if (mParent) {
       toClose = mParent->ForgetGMPContentParent();
     } else {
       toClose = this;
@@ -188,33 +176,16 @@ GMPContentParent::GMPThread()
     mps->GetThread(getter_AddRefs(mGMPThread));
     MOZ_ASSERT(mGMPThread);
   }
 
   return mGMPThread;
 }
 
 nsresult
-GMPContentParent::GetGMPAudioDecoder(GMPAudioDecoderParent** aGMPAD)
-{
-  PGMPAudioDecoderParent* pvap = SendPGMPAudioDecoderConstructor();
-  if (!pvap) {
-    return NS_ERROR_FAILURE;
-  }
-  GMPAudioDecoderParent* vap = static_cast<GMPAudioDecoderParent*>(pvap);
-  // This addref corresponds to the Proxy pointer the consumer is returned.
-  // It's dropped by calling Close() on the interface.
-  NS_ADDREF(vap);
-  *aGMPAD = vap;
-  mAudioDecoders.AppendElement(vap);
-
-  return NS_OK;
-}
-
-nsresult
 GMPContentParent::GetGMPVideoDecoder(GMPVideoDecoderParent** aGMPVD,
                                      uint32_t aDecryptorId)
 {
   // returned with one anonymous AddRef that locks it until Destroy
   PGMPVideoDecoderParent* pvdp = SendPGMPVideoDecoderConstructor(aDecryptorId);
   if (!pvdp) {
     return NS_ERROR_FAILURE;
   }
@@ -289,26 +260,10 @@ GMPContentParent::AllocPGMPDecryptorPare
 bool
 GMPContentParent::DeallocPGMPDecryptorParent(PGMPDecryptorParent* aActor)
 {
   GMPDecryptorParent* ksp = static_cast<GMPDecryptorParent*>(aActor);
   NS_RELEASE(ksp);
   return true;
 }
 
-PGMPAudioDecoderParent*
-GMPContentParent::AllocPGMPAudioDecoderParent()
-{
-  GMPAudioDecoderParent* vdp = new GMPAudioDecoderParent(this);
-  NS_ADDREF(vdp);
-  return vdp;
-}
-
-bool
-GMPContentParent::DeallocPGMPAudioDecoderParent(PGMPAudioDecoderParent* aActor)
-{
-  GMPAudioDecoderParent* vdp = static_cast<GMPAudioDecoderParent*>(aActor);
-  NS_RELEASE(vdp);
-  return true;
-}
-
 } // namespace gmp
 } // namespace mozilla
--- a/dom/media/gmp/GMPContentParent.h
+++ b/dom/media/gmp/GMPContentParent.h
@@ -8,17 +8,16 @@
 
 #include "mozilla/gmp/PGMPContentParent.h"
 #include "GMPSharedMemManager.h"
 #include "nsISupportsImpl.h"
 
 namespace mozilla {
 namespace gmp {
 
-class GMPAudioDecoderParent;
 class GMPDecryptorParent;
 class GMPParent;
 class GMPVideoDecoderParent;
 class GMPVideoEncoderParent;
 
 class GMPContentParent final : public PGMPContentParent,
                                public GMPSharedMem
 {
@@ -32,19 +31,16 @@ public:
   void VideoDecoderDestroyed(GMPVideoDecoderParent* aDecoder);
 
   nsresult GetGMPVideoEncoder(GMPVideoEncoderParent** aGMPVE);
   void VideoEncoderDestroyed(GMPVideoEncoderParent* aEncoder);
 
   nsresult GetGMPDecryptor(GMPDecryptorParent** aGMPKS);
   void DecryptorDestroyed(GMPDecryptorParent* aSession);
 
-  nsresult GetGMPAudioDecoder(GMPAudioDecoderParent** aGMPAD);
-  void AudioDecoderDestroyed(GMPAudioDecoderParent* aDecoder);
-
   nsIThread* GMPThread();
 
   // GMPSharedMem
   void CheckThread() override;
 
   void SetDisplayName(const nsCString& aDisplayName)
   {
     mDisplayName = aDisplayName;
@@ -91,31 +87,27 @@ private:
   bool DeallocPGMPVideoDecoderParent(PGMPVideoDecoderParent* aActor) override;
 
   PGMPVideoEncoderParent* AllocPGMPVideoEncoderParent() override;
   bool DeallocPGMPVideoEncoderParent(PGMPVideoEncoderParent* aActor) override;
 
   PGMPDecryptorParent* AllocPGMPDecryptorParent() override;
   bool DeallocPGMPDecryptorParent(PGMPDecryptorParent* aActor) override;
 
-  PGMPAudioDecoderParent* AllocPGMPAudioDecoderParent() override;
-  bool DeallocPGMPAudioDecoderParent(PGMPAudioDecoderParent* aActor) override;
-
   void CloseIfUnused();
   // Needed because NewRunnableMethod tried to use the class that the method
   // lives on to store the receiver, but PGMPContentParent isn't refcounted.
   void Close()
   {
     PGMPContentParent::Close();
   }
 
   nsTArray<RefPtr<GMPVideoDecoderParent>> mVideoDecoders;
   nsTArray<RefPtr<GMPVideoEncoderParent>> mVideoEncoders;
   nsTArray<RefPtr<GMPDecryptorParent>> mDecryptors;
-  nsTArray<RefPtr<GMPAudioDecoderParent>> mAudioDecoders;
   nsCOMPtr<nsIThread> mGMPThread;
   RefPtr<GMPParent> mParent;
   nsCString mDisplayName;
   uint32_t mPluginId;
   uint32_t mCloseBlockerCount = 0;
 };
 
 } // namespace gmp
--- a/dom/media/gmp/GMPMessageUtils.h
+++ b/dom/media/gmp/GMPMessageUtils.h
@@ -3,17 +3,16 @@
  * 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/. */
 
 #ifndef GMPMessageUtils_h_
 #define GMPMessageUtils_h_
 
 #include "gmp-video-codec.h"
 #include "gmp-video-frame-encoded.h"
-#include "gmp-audio-codec.h"
 #include "gmp-decryption.h"
 
 namespace IPC {
 
 template <>
 struct ParamTraits<GMPErr>
 : public ContiguousEnumSerializer<GMPErr,
                                   GMPNoErr,
@@ -71,23 +70,16 @@ struct ParamTraits<GMPMediaKeyStatus>
 template <>
 struct ParamTraits<GMPSessionType>
 : public ContiguousEnumSerializer<GMPSessionType,
                                   kGMPTemporySession,
                                   kGMPSessionInvalid>
 {};
 
 template <>
-struct ParamTraits<GMPAudioCodecType>
-: public ContiguousEnumSerializer<GMPAudioCodecType,
-                                  kGMPAudioCodecAAC,
-                                  kGMPAudioCodecInvalid>
-{};
-
-template <>
 struct ParamTraits<GMPVideoCodecComplexity>
 : public ContiguousEnumSerializer<GMPVideoCodecComplexity,
                                   kGMPComplexityNormal,
                                   kGMPComplexityInvalid>
 {};
 
 template <>
 struct ParamTraits<GMPVP8ResilienceMode>
--- a/dom/media/gmp/GMPParent.h
+++ b/dom/media/gmp/GMPParent.h
@@ -3,17 +3,16 @@
  * 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/. */
 
 #ifndef GMPParent_h_
 #define GMPParent_h_
 
 #include "GMPProcessParent.h"
 #include "GMPServiceParent.h"
-#include "GMPAudioDecoderParent.h"
 #include "GMPDecryptorParent.h"
 #include "GMPVideoDecoderParent.h"
 #include "GMPVideoEncoderParent.h"
 #include "GMPTimerParent.h"
 #include "GMPStorageParent.h"
 #include "mozilla/gmp/PGMPParent.h"
 #include "nsCOMPtr.h"
 #include "nscore.h"
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -17,17 +17,16 @@
 #include "mozilla/SyncRunnable.h"
 #include "nsXPCOMPrivate.h"
 #include "mozilla/Services.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsIXULAppInfo.h"
 #include "nsIConsoleService.h"
 #include "mozilla/Unused.h"
 #include "GMPDecryptorParent.h"
-#include "GMPAudioDecoderParent.h"
 #include "nsComponentManagerUtils.h"
 #include "runnable_utils.h"
 #include "VideoUtils.h"
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
 #include "mozilla/SandboxInfo.h"
 #endif
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
@@ -303,52 +302,16 @@ GeckoMediaPluginService::GetThread(nsITh
 RefPtr<AbstractThread>
 GeckoMediaPluginService::GetAbstractGMPThread()
 {
   MutexAutoLock lock(mMutex);
   return mAbstractGMPThread;
 }
 
 NS_IMETHODIMP
-GeckoMediaPluginService::GetGMPAudioDecoder(GMPCrashHelper* aHelper,
-                                            nsTArray<nsCString>* aTags,
-                                            const nsACString& aNodeId,
-                                            UniquePtr<GetGMPAudioDecoderCallback>&& aCallback)
-{
-  MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
-  NS_ENSURE_ARG(aTags && aTags->Length() > 0);
-  NS_ENSURE_ARG(aCallback);
-
-  if (mShuttingDownOnGMPThread) {
-    return NS_ERROR_FAILURE;
-  }
-
-  GetGMPAudioDecoderCallback* rawCallback = aCallback.release();
-  RefPtr<AbstractThread> thread(GetAbstractGMPThread());
-  RefPtr<GMPCrashHelper> helper(aHelper);
-  GetContentParent(aHelper, aNodeId, NS_LITERAL_CSTRING(GMP_API_AUDIO_DECODER), *aTags)
-    ->Then(thread, __func__,
-      [rawCallback, helper](RefPtr<GMPContentParent::CloseBlocker> wrapper) {
-        RefPtr<GMPContentParent> parent = wrapper->mParent;
-        UniquePtr<GetGMPAudioDecoderCallback> callback(rawCallback);
-        GMPAudioDecoderParent* actor = nullptr;
-        if (parent && NS_SUCCEEDED(parent->GetGMPAudioDecoder(&actor))) {
-          actor->SetCrashHelper(helper);
-        }
-        callback->Done(actor);
-      },
-      [rawCallback] {
-        UniquePtr<GetGMPAudioDecoderCallback> callback(rawCallback);
-        callback->Done(nullptr);
-      });
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 GeckoMediaPluginService::GetDecryptingGMPVideoDecoder(GMPCrashHelper* aHelper,
                                                       nsTArray<nsCString>* aTags,
                                                       const nsACString& aNodeId,
                                                       UniquePtr<GetGMPVideoDecoderCallback>&& aCallback,
                                                       uint32_t aDecryptorId)
 {
   MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
   NS_ENSURE_ARG(aTags && aTags->Length() > 0);
--- a/dom/media/gmp/GMPService.h
+++ b/dom/media/gmp/GMPService.h
@@ -54,21 +54,16 @@ public:
                                           UniquePtr<GetGMPVideoDecoderCallback>&& aCallback,
                                           uint32_t aDecryptorId)
     override;
   NS_IMETHOD GetGMPVideoEncoder(GMPCrashHelper* aHelper,
                                 nsTArray<nsCString>* aTags,
                                 const nsACString& aNodeId,
                                 UniquePtr<GetGMPVideoEncoderCallback>&& aCallback)
     override;
-  NS_IMETHOD GetGMPAudioDecoder(GMPCrashHelper* aHelper,
-                                nsTArray<nsCString>* aTags,
-                                const nsACString& aNodeId,
-                                UniquePtr<GetGMPAudioDecoderCallback>&& aCallback)
-    override;
   NS_IMETHOD GetGMPDecryptor(GMPCrashHelper* aHelper,
                              nsTArray<nsCString>* aTags,
                              const nsACString& aNodeId,
                              UniquePtr<GetGMPDecryptorCallback>&& aCallback)
     override;
 
   // Helper for backwards compatibility with WebRTC/tests.
   NS_IMETHOD
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -18,17 +18,16 @@
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/SyncRunnable.h"
 #include "nsXPCOMPrivate.h"
 #include "mozilla/Services.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsIConsoleService.h"
 #include "mozilla/Unused.h"
 #include "GMPDecryptorParent.h"
-#include "GMPAudioDecoderParent.h"
 #include "nsComponentManagerUtils.h"
 #include "runnable_utils.h"
 #include "VideoUtils.h"
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
 #include "mozilla/SandboxInfo.h"
 #endif
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
--- a/dom/media/gmp/GMPTypes.ipdlh
+++ b/dom/media/gmp/GMPTypes.ipdlh
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 using GMPBufferType from "gmp-video-codec.h";
-using GMPAudioCodecType from "gmp-audio-codec.h";
 using GMPMediaKeyStatus from "gmp-decryption.h";
 
 namespace mozilla {
 namespace gmp {
 
 struct GMPDecryptionData {
   uint8_t[] mKeyId;
   uint8_t[] mIV;
@@ -45,42 +44,15 @@ struct GMPVideoi420FrameData
   GMPPlaneData mUPlane;
   GMPPlaneData mVPlane;
   int32_t mWidth;
   int32_t mHeight;
   uint64_t mTimestamp; // microseconds
   uint64_t mDuration; // microseconds
 };
 
-struct GMPAudioCodecData
-{
-  GMPAudioCodecType mCodecType;
-  uint32_t mChannelCount;
-  uint32_t mBitsPerChannel;
-  uint32_t mSamplesPerSecond;
-
-  uint8_t[] mExtraData;
-};
-
-struct GMPAudioEncodedSampleData
-{
-  uint8_t[] mData;
-  uint64_t mTimeStamp; // microseconds.
-  GMPDecryptionData mDecryptionData;
-  uint32_t mChannelCount;
-  uint32_t mSamplesPerSecond;
-};
-
-struct GMPAudioDecodedSampleData
-{
-  int16_t[] mData;
-  uint64_t mTimeStamp; // microseconds.
-  uint32_t mChannelCount;
-  uint32_t mSamplesPerSecond;
-};
-
 struct GMPKeyInformation {
   uint8_t[] keyId;
   GMPMediaKeyStatus status;
 };
 
 }
 }
deleted file mode 100644
--- a/dom/media/gmp/PGMPAudioDecoder.ipdl
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 PGMPContent;
-include GMPTypes;
-
-using GMPCodecSpecificInfo from "gmp-audio-codec.h";
-using GMPErr from "gmp-errors.h";
-
-include "GMPMessageUtils.h";
-
-namespace mozilla {
-namespace gmp {
-
-async protocol PGMPAudioDecoder
-{
-  manager PGMPContent;
-child:
-  async InitDecode(GMPAudioCodecData aCodecSettings);
-  async Decode(GMPAudioEncodedSampleData aInput);
-  async Reset();
-  async Drain();
-  async DecodingComplete();
-parent:
-  async __delete__();
-  async Decoded(GMPAudioDecodedSampleData aDecoded);
-  async InputDataExhausted();
-  async DrainComplete();
-  async ResetComplete();
-  async Error(GMPErr aErr);
-  async Shutdown();
-};
-
-} // namespace gmp
-} // namespace mozilla
--- a/dom/media/gmp/PGMPContent.ipdl
+++ b/dom/media/gmp/PGMPContent.ipdl
@@ -3,31 +3,28 @@
  * 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 PGMP;
 include protocol PGMPService;
 include protocol PGMPVideoDecoder;
 include protocol PGMPVideoEncoder;
 include protocol PGMPDecryptor;
-include protocol PGMPAudioDecoder;
 
 namespace mozilla {
 namespace gmp {
 
 intr protocol PGMPContent
 {
   bridges PGMPService, PGMP;
 
-  manages PGMPAudioDecoder;
   manages PGMPDecryptor;
   manages PGMPVideoDecoder;
   manages PGMPVideoEncoder;
 
 child:
-  async PGMPAudioDecoder();
   async PGMPDecryptor();
   async PGMPVideoDecoder(uint32_t aDecryptorId);
   async PGMPVideoEncoder();
 };
 
 } // namespace gmp
 } // namespace mozilla
deleted file mode 100644
--- a/dom/media/gmp/gmp-api/gmp-audio-codec.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-* Copyright 2013, Mozilla Foundation and contributors
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#ifndef GMP_AUDIO_CODEC_h_
-#define GMP_AUDIO_CODEC_h_
-
-#include <stdint.h>
-
-enum GMPAudioCodecType
-{
-  kGMPAudioCodecAAC,
-  kGMPAudioCodecVorbis,
-  kGMPAudioCodecInvalid // Should always be last.
-};
-
-struct GMPAudioCodec
-{
-  GMPAudioCodecType mCodecType;
-  uint32_t mChannelCount;
-  uint32_t mBitsPerChannel;
-  uint32_t mSamplesPerSecond;
-
-  // Codec extra data, such as vorbis setup header, or
-  // AAC AudioSpecificConfig.
-  // These are null/0 if not externally negotiated
-  const uint8_t* mExtraData;
-  uint32_t       mExtraDataLen;
-};
-
-#endif // GMP_AUDIO_CODEC_h_
deleted file mode 100644
--- a/dom/media/gmp/gmp-api/gmp-audio-decode.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-* Copyright 2013, Mozilla Foundation and contributors
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#ifndef GMP_AUDIO_DECODE_h_
-#define GMP_AUDIO_DECODE_h_
-
-#include "gmp-errors.h"
-#include "gmp-audio-samples.h"
-#include "gmp-audio-codec.h"
-#include <stdint.h>
-
-// ALL METHODS MUST BE CALLED ON THE MAIN THREAD
-class GMPAudioDecoderCallback
-{
-public:
-  virtual ~GMPAudioDecoderCallback() {}
-
-  virtual void Decoded(GMPAudioSamples* aDecodedSamples) = 0;
-
-  virtual void InputDataExhausted() = 0;
-
-  virtual void DrainComplete() = 0;
-
-  virtual void ResetComplete() = 0;
-
-  // Called when the decoder encounters a catestrophic error and cannot
-  // continue. Gecko will not send any more input for decoding.
-  virtual void Error(GMPErr aError) = 0;
-};
-
-#define GMP_API_AUDIO_DECODER "decode-audio"
-
-// Audio decoding for a single stream. A GMP may be asked to create multiple
-// decoders concurrently.
-//
-// API name macro: GMP_API_AUDIO_DECODER
-// Host API: GMPAudioHost
-//
-// ALL METHODS MUST BE CALLED ON THE MAIN THREAD
-class GMPAudioDecoder
-{
-public:
-  virtual ~GMPAudioDecoder() {}
-
-  // aCallback: Subclass should retain reference to it until DecodingComplete
-  //            is called. Do not attempt to delete it, host retains ownership.
-  // TODO: Pass AudioHost so decoder can create GMPAudioEncodedFrame objects?
-  virtual void InitDecode(const GMPAudioCodec& aCodecSettings,
-                          GMPAudioDecoderCallback* aCallback) = 0;
-
-  // Decode encoded audio frames (as a part of an audio stream). The decoded
-  // frames must be returned to the user through the decode complete callback.
-  virtual void Decode(GMPAudioSamples* aEncodedSamples) = 0;
-
-  // Reset decoder state and prepare for a new call to Decode(...).
-  // Flushes the decoder pipeline.
-  // The decoder should enqueue a task to run ResetComplete() on the main
-  // thread once the reset has finished.
-  virtual void Reset() = 0;
-
-  // Output decoded frames for any data in the pipeline, regardless of ordering.
-  // All remaining decoded frames should be immediately returned via callback.
-  // The decoder should enqueue a task to run DrainComplete() on the main
-  // thread once the reset has finished.
-  virtual void Drain() = 0;
-
-  // May free decoder memory.
-  virtual void DecodingComplete() = 0;
-};
-
-#endif // GMP_VIDEO_DECODE_h_
deleted file mode 100644
--- a/dom/media/gmp/gmp-api/gmp-audio-host.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright 2013, Mozilla Foundation and contributors
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#ifndef GMP_AUDIO_HOST_h_
-#define GMP_AUDIO_HOST_h_
-
-#include "gmp-errors.h"
-#include "gmp-audio-samples.h"
-
-class GMPAudioHost
-{
-public:
-  // Construct various Audio API objects. Host does not retain reference,
-  // caller is owner and responsible for deleting.
-  virtual GMPErr CreateSamples(GMPAudioFormat aFormat,
-                               GMPAudioSamples** aSamples) = 0;
-};
-
-#endif // GMP_AUDIO_HOST_h_
deleted file mode 100644
--- a/dom/media/gmp/gmp-api/gmp-audio-samples.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-* Copyright 2013, Mozilla Foundation and contributors
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#ifndef GMP_AUDIO_FRAME_h_
-#define GMP_AUDIO_FRAME_h_
-
-#include <stdint.h>
-#include "gmp-errors.h"
-#include "gmp-decryption.h"
-
-enum GMPAudioFormat
-{
-  kGMPAudioEncodedSamples, // Raw compressed data, i.e. an AAC/Vorbis packet.
-  kGMPAudioIS16Samples, // Interleaved int16_t PCM samples.
-  kGMPAudioSamplesFormatInvalid // Should always be last.
-};
-
-class GMPAudioSamples {
-public:
-  // The format of the buffer.
-  virtual GMPAudioFormat GetFormat() = 0;
-  virtual void Destroy() = 0;
-
-  // MAIN THREAD ONLY
-  // Buffer size must be exactly what's required to contain all samples in
-  // the buffer; every byte is assumed to be part of a sample.
-  virtual GMPErr SetBufferSize(uint32_t aSize) = 0;
-
-  // Size of the buffer in bytes.
-  virtual uint32_t Size() = 0;
-
-  // Timestamps are in microseconds, and are the playback start time of the
-  // first sample in the buffer.
-  virtual void SetTimeStamp(uint64_t aTimeStamp) = 0;
-  virtual uint64_t TimeStamp() = 0;
-  virtual const uint8_t* Buffer() const = 0;
-  virtual uint8_t*       Buffer() = 0;
-
-  // Get metadata describing how this frame is encrypted, or nullptr if the
-  // buffer is not encrypted.
-  virtual const GMPEncryptedBufferMetadata* GetDecryptionData() const = 0;
-
-  virtual uint32_t Channels() const = 0;
-  virtual void SetChannels(uint32_t aChannels) = 0;
-
-  // Rate; the number of frames per second, where a "frame" is one sample for
-  // each channel.
-  //
-  // For IS16 samples, the number of samples should be:
-  //   Size() / (Channels() * sizeof(int16_t)).
-  //
-  // Note: Channels() and Rate() may not be constant across a decoding
-  // session. For example the rate for decoded samples may be different
-  // than the rate advertised by the MP4 container for encoded samples
-  // for HE-AAC streams with SBR/PS, and an EME-GMP may need to downsample
-  // to satisfy DRM requirements.
-  virtual uint32_t Rate() const = 0;
-  virtual void SetRate(uint32_t aRate) = 0;
-};
-
-#endif // GMP_AUDIO_FRAME_h_
--- a/dom/media/gmp/moz.build
+++ b/dom/media/gmp/moz.build
@@ -8,37 +8,29 @@ XPIDL_MODULE = 'content_geckomediaplugin
 
 XPIDL_SOURCES += [
     'mozIGeckoMediaPluginChromeService.idl',
     'mozIGeckoMediaPluginService.idl',
 ]
 
 EXPORTS += [
     'gmp-api/gmp-async-shutdown.h',
-    'gmp-api/gmp-audio-codec.h',
-    'gmp-api/gmp-audio-decode.h',
-    'gmp-api/gmp-audio-host.h',
-    'gmp-api/gmp-audio-samples.h',
     'gmp-api/gmp-decryption.h',
     'gmp-api/gmp-entrypoints.h',
     'gmp-api/gmp-errors.h',
     'gmp-api/gmp-platform.h',
     'gmp-api/gmp-storage.h',
     'gmp-api/gmp-video-codec.h',
     'gmp-api/gmp-video-decode.h',
     'gmp-api/gmp-video-encode.h',
     'gmp-api/gmp-video-frame-encoded.h',
     'gmp-api/gmp-video-frame-i420.h',
     'gmp-api/gmp-video-frame.h',
     'gmp-api/gmp-video-host.h',
     'gmp-api/gmp-video-plane.h',
-    'GMPAudioDecoderChild.h',
-    'GMPAudioDecoderParent.h',
-    'GMPAudioDecoderProxy.h',
-    'GMPAudioHost.h',
     'GMPCallbackBase.h',
     'GMPCDMCallbackProxy.h',
     'GMPCDMProxy.h',
     'GMPChild.h',
     'GMPContentChild.h',
     'GMPContentParent.h',
     'GMPCrashHelper.h',
     'GMPCrashHelperHolder.h',
@@ -80,19 +72,16 @@ if CONFIG['OS_ARCH'] == 'Linux':
     SOURCES += [
       'GMPLoader.cpp',
     ]
     USE_LIBS += [
         'rlz',
     ]
 
 UNIFIED_SOURCES += [
-    'GMPAudioDecoderChild.cpp',
-    'GMPAudioDecoderParent.cpp',
-    'GMPAudioHost.cpp',
     'GMPCDMCallbackProxy.cpp',
     'GMPCDMProxy.cpp',
     'GMPChild.cpp',
     'GMPContentChild.cpp',
     'GMPContentParent.cpp',
     'GMPCrashHelper.cpp',
     'GMPDecryptorChild.cpp',
     'GMPDecryptorParent.cpp',
@@ -125,17 +114,16 @@ UNIFIED_SOURCES += [
 DIRS += [
     'rlz',
     'widevine-adapter',
 ]
 
 IPDL_SOURCES += [
   'GMPTypes.ipdlh',
   'PGMP.ipdl',
-  'PGMPAudioDecoder.ipdl',
   'PGMPContent.ipdl',
   'PGMPDecryptor.ipdl',
   'PGMPService.ipdl',
   'PGMPStorage.ipdl',
   'PGMPTimer.ipdl',
   'PGMPVideoDecoder.ipdl',
   'PGMPVideoEncoder.ipdl',
 ]
--- a/dom/media/gmp/mozIGeckoMediaPluginService.idl
+++ b/dom/media/gmp/mozIGeckoMediaPluginService.idl
@@ -5,17 +5,16 @@
 
 #include "nsISupports.idl"
 #include "nsIThread.idl"
 
 %{C++
 #include "mozilla/UniquePtr.h"
 #include "nsTArray.h"
 #include "nsStringGlue.h"
-class GMPAudioDecoderProxy;
 class GMPDecryptorProxy;
 class GMPVideoDecoderProxy;
 class GMPVideoEncoderProxy;
 class GMPVideoHost;
 
 namespace mozilla {
 class GMPCrashHelper;
 }
@@ -32,31 +31,29 @@ template<class T>
 class GMPVideoGetterCallback
 {
 public:
   GMPVideoGetterCallback() { MOZ_COUNT_CTOR(GMPVideoGetterCallback<T>); }
   virtual ~GMPVideoGetterCallback() { MOZ_COUNT_DTOR(GMPVideoGetterCallback<T>); }
   virtual void Done(T*, GMPVideoHost*) = 0;
 };
 typedef GMPGetterCallback<GMPDecryptorProxy> GetGMPDecryptorCallback;
-typedef GMPGetterCallback<GMPAudioDecoderProxy> GetGMPAudioDecoderCallback;
 typedef GMPVideoGetterCallback<GMPVideoDecoderProxy> GetGMPVideoDecoderCallback;
 typedef GMPVideoGetterCallback<GMPVideoEncoderProxy> GetGMPVideoEncoderCallback;
 class GetNodeIdCallback
 {
 public:
   GetNodeIdCallback() { MOZ_COUNT_CTOR(GetNodeIdCallback); }
   virtual ~GetNodeIdCallback() { MOZ_COUNT_DTOR(GetNodeIdCallback); }
   virtual void Done(nsresult aResult, const nsACString& aNodeId) = 0;
 };
 %}
 
 [ptr] native TagArray(nsTArray<nsCString>);
 native GetGMPDecryptorCallback(mozilla::UniquePtr<GetGMPDecryptorCallback>&&);
-native GetGMPAudioDecoderCallback(mozilla::UniquePtr<GetGMPAudioDecoderCallback>&&);
 native GetGMPVideoDecoderCallback(mozilla::UniquePtr<GetGMPVideoDecoderCallback>&&);
 native GetGMPVideoEncoderCallback(mozilla::UniquePtr<GetGMPVideoEncoderCallback>&&);
 native GetNodeIdCallback(mozilla::UniquePtr<GetNodeIdCallback>&&);
 native GMPCrashHelperPtr(mozilla::GMPCrashHelper*);
 
 [scriptable, uuid(44d362ae-937a-4803-bee6-f2512a0149d1)]
 interface mozIGeckoMediaPluginService : nsISupports
 {
@@ -122,33 +119,16 @@ interface mozIGeckoMediaPluginService : 
    */
   [noscript]
   void getGMPVideoEncoder(in GMPCrashHelperPtr helper,
                           in TagArray tags,
                           [optional] in ACString nodeId,
                           in GetGMPVideoEncoderCallback callback);
 
   /**
-   * Returns an audio decoder that supports the specified tags.
-   * The array of tags should at least contain a codec tag, and optionally
-   * other tags such as for EME keysystem.
-   * Callable only on GMP thread.
-   * This is an asynchronous operation, the Done method of the callback object
-   * will be called on the GMP thread with the result (which might be null in
-   * the case of failure). This method always takes ownership of the callback
-   * object, but if this method returns an error then the Done method of the
-   * callback object will not be called at all.
-   */
-  [noscript]
-  void getGMPAudioDecoder(in GMPCrashHelperPtr helper,
-                          in TagArray tags,
-                          [optional] in ACString nodeId,
-                          in GetGMPAudioDecoderCallback callback);
-
-  /**
    * Returns a decryption session manager that supports the specified tags.
    * The array of tags should at least contain a key system tag, and optionally
    * other tags.
    * Callable only on GMP thread.
    * This is an asynchronous operation, the Done method of the callback object
    * will be called on the GMP thread with the result (which might be null in
    * the case of failure). This method always takes ownership of the callback
    * object, but if this method returns an error then the Done method of the
--- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
@@ -9,17 +9,16 @@
 #include "GMPVideoDecoder.h"
 #include "GMPUtils.h"
 #include "MediaDataDecoderProxy.h"
 #include "MediaPrefs.h"
 #include "VideoUtils.h"
 #include "mozIGeckoMediaPluginService.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/StaticMutex.h"
-#include "gmp-audio-decode.h"
 #include "gmp-video-decode.h"
 #include "MP4Decoder.h"
 #include "VPXDecoder.h"
 #ifdef XP_WIN
 #include "WMFDecoderModule.h"
 #endif
 
 namespace mozilla {
@@ -98,21 +97,16 @@ GMPDecoderModule::SupportsMimeType(const
                       { NS_LITERAL_CSTRING("vp9"), aGMP.value()});
   }
 
   if (VPXDecoder::IsVP8(aMimeType)) {
     return HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_VIDEO_DECODER),
                       { NS_LITERAL_CSTRING("vp8"), aGMP.value()});
   }
 
-  if (MP4Decoder::IsAAC(aMimeType)) {
-    return HaveGMPFor(NS_LITERAL_CSTRING(GMP_API_AUDIO_DECODER),
-                      { NS_LITERAL_CSTRING("aac"), aGMP.value()});
-  }
-
   return false;
 }
 
 bool
 GMPDecoderModule::SupportsMimeType(const nsACString& aMimeType,
                                    DecoderDoctorDiagnostics* aDiagnostics) const
 {
   return false;