Bug 1038467 - Rename MediaPlugin* classes r=cpearce
authorEdwin Flores <eflores@mozilla.com>
Thu, 17 Jul 2014 13:32:56 +1200
changeset 216454 7387d9d2e3b115d5edc3f459e9cfe0c18b38f3d7
parent 216453 eb7dda331d9941916537b4a0949eda94c35f5f5b
child 216455 0ddd5a0fac8ab92dd746ad40c83f10881b3a9c80
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1038467
milestone33.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 1038467 - Rename MediaPlugin* classes r=cpearce
configure.in
content/media/DecoderTraits.cpp
content/media/MediaDecoder.cpp
content/media/MediaDecoder.h
content/media/android/AndroidMediaDecoder.cpp
content/media/android/AndroidMediaDecoder.h
content/media/android/AndroidMediaPluginHost.cpp
content/media/android/AndroidMediaPluginHost.h
content/media/android/AndroidMediaReader.cpp
content/media/android/AndroidMediaReader.h
content/media/android/AndroidMediaResourceServer.cpp
content/media/android/AndroidMediaResourceServer.h
content/media/android/moz.build
content/media/moz.build
content/media/omx/MediaOmxReader.cpp
layout/build/nsLayoutStatics.cpp
--- a/configure.in
+++ b/configure.in
@@ -3848,17 +3848,17 @@ MOZ_FMP4=
 MOZ_EME=1
 MOZ_FFMPEG=
 MOZ_WEBRTC=1
 MOZ_PEERCONNECTION=
 MOZ_SRTP=
 MOZ_WEBRTC_SIGNALING=
 MOZ_WEBRTC_ASSERT_ALWAYS=1
 MOZ_SCTP=
-MOZ_MEDIA_PLUGINS=
+MOZ_ANDROID_OMX=
 MOZ_MEDIA_NAVIGATOR=
 MOZ_OMX_PLUGIN=
 MOZ_VPX=
 MOZ_VPX_ERROR_CONCEALMENT=
 MOZ_WEBSPEECH=1
 VPX_AS=
 VPX_ASFLAGS=
 VPX_AS_DASH_C_FLAG=
@@ -5238,26 +5238,26 @@ if test -n "$MOZ_EME"; then
     AC_DEFINE(MOZ_EME)
 fi;
 
 dnl ========================================================
 dnl = Enable media plugin support
 dnl ========================================================
 if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
   dnl Enable support on android by default
-  MOZ_MEDIA_PLUGINS=1
-fi
-
-MOZ_ARG_ENABLE_BOOL(media-plugins,
-[  --enable-media-plugins  Enable support for media plugins],
-    MOZ_MEDIA_PLUGINS=1,
-    MOZ_MEDIA_PLUGINS=)
-
-if test -n "$MOZ_MEDIA_PLUGINS"; then
-  AC_DEFINE(MOZ_MEDIA_PLUGINS)
+  MOZ_ANDROID_OMX=1
+fi
+
+MOZ_ARG_ENABLE_BOOL(android-omx,
+[  --enable-android-omx  Enable support for Android OMX media backend],
+    MOZ_ANDROID_OMX=1,
+    MOZ_ANDROID_OMX=)
+
+if test -n "$MOZ_ANDROID_OMX"; then
+  AC_DEFINE(MOZ_ANDROID_OMX)
 fi
 
 dnl ========================================================
 dnl = Disable platform MP3 decoder on OSX
 dnl ========================================================
 if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
   MOZ_APPLEMEDIA=1
 fi
@@ -8812,17 +8812,17 @@ AC_SUBST(MOZ_VORBIS)
 AC_SUBST(MOZ_TREMOR)
 AC_SUBST(MOZ_OPUS)
 AC_SUBST(MOZ_WEBM)
 AC_SUBST(MOZ_WMF)
 AC_SUBST(MOZ_FFMPEG)
 AC_SUBST(MOZ_FMP4)
 AC_SUBST(MOZ_EME)
 AC_SUBST(MOZ_DIRECTSHOW)
-AC_SUBST(MOZ_MEDIA_PLUGINS)
+AC_SUBST(MOZ_ANDROID_OMX)
 AC_SUBST(MOZ_APPLEMEDIA)
 AC_SUBST(MOZ_OMX_PLUGIN)
 AC_SUBST(MOZ_VPX_ERROR_CONCEALMENT)
 AC_SUBST(MOZ_VPX)
 AC_SUBST(VPX_AS)
 AC_SUBST(VPX_ASFLAGS)
 AC_SUBST(VPX_DASH_C_FLAG)
 AC_SUBST(VPX_AS_CONVERSION)
--- a/content/media/DecoderTraits.cpp
+++ b/content/media/DecoderTraits.cpp
@@ -4,18 +4,18 @@
  * 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 "DecoderTraits.h"
 #include "MediaDecoder.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "mozilla/Preferences.h"
 
-#ifdef MOZ_MEDIA_PLUGINS
-#include "MediaPluginHost.h"
+#ifdef MOZ_ANDROID_OMX
+#include "AndroidMediaPluginHost.h"
 #endif
 
 #include "OggDecoder.h"
 #include "OggReader.h"
 #ifdef MOZ_WAVE
 #include "WaveDecoder.h"
 #include "WaveReader.h"
 #endif
@@ -26,21 +26,21 @@
 #ifdef MOZ_RAW
 #include "RawDecoder.h"
 #include "RawReader.h"
 #endif
 #ifdef MOZ_GSTREAMER
 #include "GStreamerDecoder.h"
 #include "GStreamerReader.h"
 #endif
-#ifdef MOZ_MEDIA_PLUGINS
-#include "MediaPluginHost.h"
-#include "MediaPluginDecoder.h"
-#include "MediaPluginReader.h"
-#include "MediaPluginHost.h"
+#ifdef MOZ_ANDROID_OMX
+#include "AndroidMediaPluginHost.h"
+#include "AndroidMediaDecoder.h"
+#include "AndroidMediaReader.h"
+#include "AndroidMediaPluginHost.h"
 #endif
 #ifdef MOZ_OMX_DECODER
 #include "MediaOmxDecoder.h"
 #include "MediaOmxReader.h"
 #include "nsIPrincipal.h"
 #include "mozilla/dom/HTMLMediaElement.h"
 #endif
 #ifdef NECKO_PROTOCOL_rtsp
@@ -278,21 +278,21 @@ IsRtspSupportedType(const nsACString& aM
 bool DecoderTraits::DecoderWaitsForOnConnected(const nsACString& aMimeType) {
 #ifdef NECKO_PROTOCOL_rtsp
   return CodecListContains(gRtspTypes, aMimeType);
 #else
   return false;
 #endif
 }
 
-#ifdef MOZ_MEDIA_PLUGINS
+#ifdef MOZ_ANDROID_OMX
 static bool
-IsMediaPluginsType(const nsACString& aType)
+IsAndroidMediaType(const nsACString& aType)
 {
-  if (!MediaDecoder::IsMediaPluginsEnabled()) {
+  if (!MediaDecoder::IsAndroidMediaEnabled()) {
     return false;
   }
 
   static const char* supportedTypes[] = {
     "audio/mpeg", "audio/mp4", "video/mp4", nullptr
   };
   return CodecListContains(supportedTypes, aType);
 }
@@ -446,19 +446,19 @@ DecoderTraits::CanHandleMediaType(const 
            ? CANPLAY_YES : CANPLAY_NO;
   }
 #endif
 #ifdef MOZ_APPLEMEDIA
   if (IsAppleMediaSupportedType(nsDependentCString(aMIMEType), &codecList)) {
     result = CANPLAY_MAYBE;
   }
 #endif
-#ifdef MOZ_MEDIA_PLUGINS
-  if (MediaDecoder::IsMediaPluginsEnabled() &&
-      GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), &codecList))
+#ifdef MOZ_ANDROID_OMX
+  if (MediaDecoder::IsAndroidMediaEnabled() &&
+      GetAndroidMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), &codecList))
     result = CANPLAY_MAYBE;
 #endif
 #ifdef NECKO_PROTOCOL_rtsp
   if (IsRtspSupportedType(nsDependentCString(aMIMEType))) {
     result = CANPLAY_MAYBE;
   }
 #endif
   if (result == CANPLAY_NO || !aHaveRequestedCodecs || !codecList) {
@@ -542,20 +542,20 @@ InstantiateDecoder(const nsACString& aTy
   }
 #endif
 #ifdef NECKO_PROTOCOL_rtsp
   if (IsRtspSupportedType(aType)) {
     decoder = new RtspOmxDecoder();
     return decoder.forget();
   }
 #endif
-#ifdef MOZ_MEDIA_PLUGINS
-  if (MediaDecoder::IsMediaPluginsEnabled() &&
-      GetMediaPluginHost()->FindDecoder(aType, nullptr)) {
-    decoder = new MediaPluginDecoder(aType);
+#ifdef MOZ_ANDROID_OMX
+  if (MediaDecoder::IsAndroidMediaEnabled() &&
+      GetAndroidMediaPluginHost()->FindDecoder(aType, nullptr)) {
+    decoder = new AndroidMediaDecoder(aType);
     return decoder.forget();
   }
 #endif
 #ifdef MOZ_WEBM
   if (IsWebMType(aType)) {
     decoder = new WebMDecoder();
     return decoder.forget();
   }
@@ -625,20 +625,20 @@ MediaDecoderReader* DecoderTraits::Creat
     decoderReader = new WaveReader(aDecoder);
   } else
 #endif
 #ifdef MOZ_OMX_DECODER
   if (IsOmxSupportedType(aType)) {
     decoderReader = new MediaOmxReader(aDecoder);
   } else
 #endif
-#ifdef MOZ_MEDIA_PLUGINS
-  if (MediaDecoder::IsMediaPluginsEnabled() &&
-      GetMediaPluginHost()->FindDecoder(aType, nullptr)) {
-    decoderReader = new MediaPluginReader(aDecoder, aType);
+#ifdef MOZ_ANDROID_OMX
+  if (MediaDecoder::IsAndroidMediaEnabled() &&
+      GetAndroidMediaPluginHost()->FindDecoder(aType, nullptr)) {
+    decoderReader = new AndroidMediaReader(aDecoder, aType);
   } else
 #endif
 #ifdef MOZ_WEBM
   if (IsWebMType(aType)) {
     decoderReader = new WebMReader(aDecoder);
   } else
 #endif
 #ifdef MOZ_DIRECTSHOW
@@ -674,18 +674,18 @@ bool DecoderTraits::IsSupportedInVideoDo
     (IsOmxSupportedType(aType) && !aType.EqualsASCII("audio/amr")) ||
 #endif
 #ifdef MOZ_WEBM
     IsWebMType(aType) ||
 #endif
 #ifdef MOZ_GSTREAMER
     IsGStreamerSupportedType(aType) ||
 #endif
-#ifdef MOZ_MEDIA_PLUGINS
-    (MediaDecoder::IsMediaPluginsEnabled() && IsMediaPluginsType(aType)) ||
+#ifdef MOZ_ANDROID_OMX
+    (MediaDecoder::IsAndroidMediaEnabled() && IsAndroidMediaType(aType)) ||
 #endif
 #ifdef MOZ_FMP4
     IsMP4SupportedType(aType) ||
 #endif
 #ifdef MOZ_WMF
     (IsWMFSupportedType(aType) &&
      Preferences::GetBool("media.windows-media-foundation.play-stand-alone", true)) ||
 #endif
--- a/content/media/MediaDecoder.cpp
+++ b/content/media/MediaDecoder.cpp
@@ -1714,19 +1714,19 @@ MediaDecoder::IsGStreamerEnabled()
 #ifdef MOZ_OMX_DECODER
 bool
 MediaDecoder::IsOmxEnabled()
 {
   return Preferences::GetBool("media.omx.enabled", false);
 }
 #endif
 
-#ifdef MOZ_MEDIA_PLUGINS
+#ifdef MOZ_ANDROID_OMX
 bool
-MediaDecoder::IsMediaPluginsEnabled()
+MediaDecoder::IsAndroidMediaEnabled()
 {
   return Preferences::GetBool("media.plugins.enabled");
 }
 #endif
 
 #ifdef MOZ_WMF
 bool
 MediaDecoder::IsWMFEnabled()
--- a/content/media/MediaDecoder.h
+++ b/content/media/MediaDecoder.h
@@ -870,18 +870,18 @@ public:
 #ifdef MOZ_GSTREAMER
   static bool IsGStreamerEnabled();
 #endif
 
 #ifdef MOZ_OMX_DECODER
   static bool IsOmxEnabled();
 #endif
 
-#ifdef MOZ_MEDIA_PLUGINS
-  static bool IsMediaPluginsEnabled();
+#ifdef MOZ_ANDROID_OMX
+  static bool IsAndroidMediaEnabled();
 #endif
 
 #ifdef MOZ_WMF
   static bool IsWMFEnabled();
 #endif
 
 #ifdef MOZ_APPLEMEDIA
   static bool IsAppleMP3Enabled();
--- a/content/media/android/AndroidMediaDecoder.cpp
+++ b/content/media/android/AndroidMediaDecoder.cpp
@@ -1,23 +1,23 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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 "MediaDecoderStateMachine.h"
-#include "MediaPluginDecoder.h"
-#include "MediaPluginReader.h"
+#include "AndroidMediaDecoder.h"
+#include "AndroidMediaReader.h"
 
 namespace mozilla {
 
-MediaPluginDecoder::MediaPluginDecoder(const nsACString& aType) : mType(aType)
+AndroidMediaDecoder::AndroidMediaDecoder(const nsACString& aType) : mType(aType)
 {
 }
 
-MediaDecoderStateMachine* MediaPluginDecoder::CreateStateMachine()
+MediaDecoderStateMachine* AndroidMediaDecoder::CreateStateMachine()
 {
-  return new MediaDecoderStateMachine(this, new MediaPluginReader(this, mType));
+  return new MediaDecoderStateMachine(this, new AndroidMediaReader(this, mType));
 }
 
 } // namespace mozilla
 
--- a/content/media/android/AndroidMediaDecoder.h
+++ b/content/media/android/AndroidMediaDecoder.h
@@ -1,31 +1,31 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
-#if !defined(MediaPluginDecoder_h_)
-#define MediaPluginDecoder_h_
+#if !defined(AndroidMediaDecoder_h_)
+#define AndroidMediaDecoder_h_
 
 #include "MediaDecoder.h"
-#include "MediaPluginDecoder.h"
+#include "AndroidMediaDecoder.h"
 
 namespace mozilla {
 
-class MediaPluginDecoder : public MediaDecoder
+class AndroidMediaDecoder : public MediaDecoder
 {
   nsCString mType;
 public:
-  MediaPluginDecoder(const nsACString& aType);
+  AndroidMediaDecoder(const nsACString& aType);
 
   const nsresult GetContentType(nsACString& aType) const {
     aType = mType;
     return NS_OK;
   }
 
-  virtual MediaDecoder* Clone() { return new MediaPluginDecoder(mType); }
+  virtual MediaDecoder* Clone() { return new AndroidMediaDecoder(mType); }
   virtual MediaDecoderStateMachine* CreateStateMachine();
 };
 
 } // namespace mozilla
 
 #endif
--- a/content/media/android/AndroidMediaPluginHost.cpp
+++ b/content/media/android/AndroidMediaPluginHost.cpp
@@ -2,34 +2,34 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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 "mozilla/Preferences.h"
 #include "mozilla/dom/TimeRanges.h"
 #include "MediaResource.h"
 #include "mozilla/dom/HTMLMediaElement.h"
-#include "MediaPluginHost.h"
+#include "AndroidMediaPluginHost.h"
 #include "nsXPCOMStrings.h"
 #include "nsISeekableStream.h"
-#include "MediaPluginReader.h"
+#include "AndroidMediaReader.h"
 #include "nsIGfxInfo.h"
 #include "gfxCrashReporterUtils.h"
 #include "prmem.h"
 #include "prlink.h"
-#include "MediaResourceServer.h"
+#include "AndroidMediaResourceServer.h"
 #include "nsServiceManagerUtils.h"
 
 #include "MPAPI.h"
 
 #include "nsIPropertyBag2.h"
 
 #if defined(ANDROID) || defined(MOZ_WIDGET_GONK)
 #include "android/log.h"
-#define ALOG(args...)  __android_log_print(ANDROID_LOG_INFO, "MediaPluginHost" , ## args)
+#define ALOG(args...)  __android_log_print(ANDROID_LOG_INFO, "AndroidMediaPluginHost" , ## args)
 #else
 #define ALOG(args...) /* do nothing */
 #endif
 
 using namespace MPAPI;
 
 Decoder::Decoder() :
   mResource(nullptr), mPrivate(nullptr)
@@ -208,20 +208,20 @@ static const char* GetOmxLibraryName()
 
 #elif defined(ANDROID) && defined(MOZ_WIDGET_GONK)
   return "libomxplugin.so";
 #else
   return nullptr;
 #endif
 }
 
-MediaPluginHost::MediaPluginHost() {
-  MOZ_COUNT_CTOR(MediaPluginHost);
+AndroidMediaPluginHost::AndroidMediaPluginHost() {
+  MOZ_COUNT_CTOR(AndroidMediaPluginHost);
 
-  mResourceServer = MediaResourceServer::Start();
+  mResourceServer = AndroidMediaResourceServer::Start();
 
   const char* name = GetOmxLibraryName();
   ALOG("Loading OMX Plugin: %s", name ? name : "nullptr");
   if (name) {
     char *path = PR_GetLibraryFilePathname("libxul.so", (PRFuncPtr) GetOmxLibraryName);
     PRLibrary *lib = nullptr;
     if (path) {
       nsAutoCString libpath(path);
@@ -241,38 +241,38 @@ MediaPluginHost::MediaPluginHost() {
       if (manifest) {
         mPlugins.AppendElement(manifest);
         ALOG("OMX plugin successfully loaded");
      }
     }
   }
 }
 
-MediaPluginHost::~MediaPluginHost() {
+AndroidMediaPluginHost::~AndroidMediaPluginHost() {
   mResourceServer->Stop();
-  MOZ_COUNT_DTOR(MediaPluginHost);
+  MOZ_COUNT_DTOR(AndroidMediaPluginHost);
 }
 
-bool MediaPluginHost::FindDecoder(const nsACString& aMimeType, const char* const** aCodecs)
+bool AndroidMediaPluginHost::FindDecoder(const nsACString& aMimeType, const char* const** aCodecs)
 {
   const char *chars;
   size_t len = NS_CStringGetData(aMimeType, &chars, nullptr);
   for (size_t n = 0; n < mPlugins.Length(); ++n) {
     Manifest *plugin = mPlugins[n];
     const char* const *codecs;
     if (plugin->CanDecode(chars, len, &codecs)) {
       if (aCodecs)
         *aCodecs = codecs;
       return true;
     }
   }
   return false;
 }
 
-MPAPI::Decoder *MediaPluginHost::CreateDecoder(MediaResource *aResource, const nsACString& aMimeType)
+MPAPI::Decoder *AndroidMediaPluginHost::CreateDecoder(MediaResource *aResource, const nsACString& aMimeType)
 {
   NS_ENSURE_TRUE(aResource, nullptr);
 
   nsAutoPtr<Decoder> decoder(new Decoder());
   if (!decoder) {
     return nullptr;
   }
 
@@ -294,37 +294,37 @@ MPAPI::Decoder *MediaPluginHost::CreateD
       aResource->AddRef();
       return decoder.forget();
     }
   }
 
   return nullptr;
 }
 
-void MediaPluginHost::DestroyDecoder(Decoder *aDecoder)
+void AndroidMediaPluginHost::DestroyDecoder(Decoder *aDecoder)
 {
   aDecoder->DestroyDecoder(aDecoder);
   char* resource = GetResource(aDecoder);
   if (resource) {
     // resource *shouldn't* be null, but check anyway just in case the plugin
     // decoder does something stupid.
     mResourceServer->RemoveResource(nsCString(resource));
     free(resource);
   }
   delete aDecoder;
 }
 
-MediaPluginHost *sMediaPluginHost = nullptr;
-MediaPluginHost *GetMediaPluginHost()
+AndroidMediaPluginHost *sAndroidMediaPluginHost = nullptr;
+AndroidMediaPluginHost *GetAndroidMediaPluginHost()
 {
-  if (!sMediaPluginHost) {
-    sMediaPluginHost = new MediaPluginHost();
+  if (!sAndroidMediaPluginHost) {
+    sAndroidMediaPluginHost = new AndroidMediaPluginHost();
   }
-  return sMediaPluginHost;
+  return sAndroidMediaPluginHost;
 }
 
-void MediaPluginHost::Shutdown()
+void AndroidMediaPluginHost::Shutdown()
 {
-  delete sMediaPluginHost;
-  sMediaPluginHost = nullptr;
+  delete sAndroidMediaPluginHost;
+  sAndroidMediaPluginHost = nullptr;
 }
 
 } // namespace mozilla
--- a/content/media/android/AndroidMediaPluginHost.h
+++ b/content/media/android/AndroidMediaPluginHost.h
@@ -1,38 +1,38 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
-#if !defined(MediaPluginHost_h_)
-#define MediaPluginHost_h_
+#if !defined(AndroidMediaPluginHost_h_)
+#define AndroidMediaPluginHost_h_
 
 #include "nsTArray.h"
 #include "MediaResource.h"
 #include "MPAPI.h"
-#include "MediaResourceServer.h"
+#include "AndroidMediaResourceServer.h"
 
 namespace mozilla {
 
-class MediaPluginReader;
+class AndroidMediaReader;
 
-class MediaPluginHost {
-  nsRefPtr<MediaResourceServer> mResourceServer;
+class AndroidMediaPluginHost {
+  nsRefPtr<AndroidMediaResourceServer> mResourceServer;
   nsTArray<MPAPI::Manifest *> mPlugins;
 
   MPAPI::Manifest *FindPlugin(const nsACString& aMimeType);
 public:
-  MediaPluginHost();
-  ~MediaPluginHost();
+  AndroidMediaPluginHost();
+  ~AndroidMediaPluginHost();
 
   static void Shutdown();
 
   bool FindDecoder(const nsACString& aMimeType, const char* const** aCodecs);
   MPAPI::Decoder *CreateDecoder(mozilla::MediaResource *aResource, const nsACString& aMimeType);
   void DestroyDecoder(MPAPI::Decoder *aDecoder);
 };
 
-MediaPluginHost *GetMediaPluginHost();
+AndroidMediaPluginHost *GetAndroidMediaPluginHost();
 
 } // namespace mozilla
 
 #endif
--- a/content/media/android/AndroidMediaReader.cpp
+++ b/content/media/android/AndroidMediaReader.cpp
@@ -1,57 +1,57 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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 "MediaPluginReader.h"
+#include "AndroidMediaReader.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/dom/TimeRanges.h"
 #include "mozilla/gfx/Point.h"
 #include "MediaResource.h"
 #include "VideoUtils.h"
-#include "MediaPluginDecoder.h"
-#include "MediaPluginHost.h"
+#include "AndroidMediaDecoder.h"
+#include "AndroidMediaPluginHost.h"
 #include "MediaDecoderStateMachine.h"
 #include "ImageContainer.h"
 #include "AbstractMediaDecoder.h"
 #include "gfx2DGlue.h"
 
 namespace mozilla {
 
 using namespace mozilla::gfx;
 
 typedef mozilla::layers::Image Image;
 typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage;
 
-MediaPluginReader::MediaPluginReader(AbstractMediaDecoder *aDecoder,
-                                     const nsACString& aContentType) :
+AndroidMediaReader::AndroidMediaReader(AbstractMediaDecoder *aDecoder,
+                                       const nsACString& aContentType) :
   MediaDecoderReader(aDecoder),
   mType(aContentType),
   mPlugin(nullptr),
   mHasAudio(false),
   mHasVideo(false),
   mVideoSeekTimeUs(-1),
   mAudioSeekTimeUs(-1)
 {
 }
 
-nsresult MediaPluginReader::Init(MediaDecoderReader* aCloneDonor)
+nsresult AndroidMediaReader::Init(MediaDecoderReader* aCloneDonor)
 {
   return NS_OK;
 }
 
-nsresult MediaPluginReader::ReadMetadata(MediaInfo* aInfo,
-                                         MetadataTags** aTags)
+nsresult AndroidMediaReader::ReadMetadata(MediaInfo* aInfo,
+                                          MetadataTags** aTags)
 {
   NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
 
   if (!mPlugin) {
-    mPlugin = GetMediaPluginHost()->CreateDecoder(mDecoder->GetResource(), mType);
+    mPlugin = GetAndroidMediaPluginHost()->CreateDecoder(mDecoder->GetResource(), mType);
     if (!mPlugin) {
       return NS_ERROR_FAILURE;
     }
   }
 
   // Set the total duration (the max of the audio and video track).
   int64_t durationUs;
   mPlugin->GetDuration(mPlugin, &durationUs);
@@ -94,36 +94,36 @@ nsresult MediaPluginReader::ReadMetadata
     mInfo.mAudio.mRate = sampleRate;
   }
 
  *aInfo = mInfo;
  *aTags = nullptr;
   return NS_OK;
 }
 
-void MediaPluginReader::Shutdown()
+void AndroidMediaReader::Shutdown()
 {
   ResetDecode();
   if (mPlugin) {
-    GetMediaPluginHost()->DestroyDecoder(mPlugin);
+    GetAndroidMediaPluginHost()->DestroyDecoder(mPlugin);
     mPlugin = nullptr;
   }
 }
 
 // Resets all state related to decoding, emptying all buffers etc.
-nsresult MediaPluginReader::ResetDecode()
+nsresult AndroidMediaReader::ResetDecode()
 {
   if (mLastVideoFrame) {
     mLastVideoFrame = nullptr;
   }
   return MediaDecoderReader::ResetDecode();
 }
 
-bool MediaPluginReader::DecodeVideoFrame(bool &aKeyframeSkip,
-                                         int64_t aTimeThreshold)
+bool AndroidMediaReader::DecodeVideoFrame(bool &aKeyframeSkip,
+                                          int64_t aTimeThreshold)
 {
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   uint32_t parsed = 0, decoded = 0;
   AbstractMediaDecoder::AutoNotifyDecoded autoNotify(mDecoder, parsed, decoded);
 
   // Throw away the currently buffered frame if we are seeking.
   if (mLastVideoFrame && mVideoSeekTimeUs != -1) {
@@ -243,20 +243,20 @@ bool MediaPluginReader::DecodeVideoFrame
                             picture);
     }
  
     if (!v) {
       return false;
     }
     parsed++;
     decoded++;
-    NS_ASSERTION(decoded <= parsed, "Expect to decode fewer frames than parsed in MediaPlugin...");
+    NS_ASSERTION(decoded <= parsed, "Expect to decode fewer frames than parsed in AndroidMedia...");
 
     // Since MPAPI doesn't give us the end time of frames, we keep one frame
-    // buffered in MediaPluginReader and push it into the queue as soon
+    // buffered in AndroidMediaReader and push it into the queue as soon
     // we read the following frame so we can use that frame's start time as
     // the end time of the buffered frame.
     if (!mLastVideoFrame) {
       mLastVideoFrame = v;
       continue;
     }
 
     // Calculate the duration as the timestamp of the current frame minus the
@@ -279,17 +279,17 @@ bool MediaPluginReader::DecodeVideoFrame
     mLastVideoFrame = v;
 
     break;
   }
 
   return true;
 }
 
-bool MediaPluginReader::DecodeAudioData()
+bool AndroidMediaReader::DecodeAudioData()
 {
   NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
 
   // This is the approximate byte position in the stream.
   int64_t pos = mDecoder->GetResource()->Tell();
 
   // Read next frame
   MPAPI::AudioFrame source;
@@ -311,17 +311,17 @@ bool MediaPluginReader::DecodeAudioData(
                               source.mAudioSampleRate,
                               frames,
                               source.mAudioChannels,
                               MPCopy(static_cast<uint8_t *>(source.mData),
                                      source.mSize,
                                      source.mAudioChannels));
 }
 
-nsresult MediaPluginReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime)
+nsresult AndroidMediaReader::Seek(int64_t aTarget, int64_t aStartTime, int64_t aEndTime, int64_t aCurrentTime)
 {
   NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
 
   if (mHasAudio && mHasVideo) {
     // The decoder seeks/demuxes audio and video streams separately. So if
     // we seek both audio and video to aTarget, the audio stream can typically
     // seek closer to the seek target, since typically every audio block is
     // a sync point, whereas for video there are only keyframes once every few
@@ -334,24 +334,24 @@ nsresult MediaPluginReader::Seek(int64_t
     mAudioSeekTimeUs = v ? v->mTime : aTarget;
   } else {
     mAudioSeekTimeUs = mVideoSeekTimeUs = aTarget;
   }
 
   return NS_OK;
 }
 
-MediaPluginReader::ImageBufferCallback::ImageBufferCallback(mozilla::layers::ImageContainer *aImageContainer) :
+AndroidMediaReader::ImageBufferCallback::ImageBufferCallback(mozilla::layers::ImageContainer *aImageContainer) :
   mImageContainer(aImageContainer)
 {
 }
 
 void *
-MediaPluginReader::ImageBufferCallback::operator()(size_t aWidth, size_t aHeight,
-                                                   MPAPI::ColorFormat aColorFormat)
+AndroidMediaReader::ImageBufferCallback::operator()(size_t aWidth, size_t aHeight,
+                                                    MPAPI::ColorFormat aColorFormat)
 {
   if (!mImageContainer) {
     NS_WARNING("No image container to construct an image");
     return nullptr;
   }
 
   nsRefPtr<Image> image;
   switch(aColorFormat) {
@@ -370,18 +370,18 @@ MediaPluginReader::ImageBufferCallback::
       return CreateI420Image(aWidth, aHeight);
     default:
       NS_NOTREACHED("Color format not supported");
       return nullptr;
   }
 }
 
 uint8_t *
-MediaPluginReader::ImageBufferCallback::CreateI420Image(size_t aWidth,
-                                                        size_t aHeight)
+AndroidMediaReader::ImageBufferCallback::CreateI420Image(size_t aWidth,
+                                                         size_t aHeight)
 {
   mImage = mImageContainer->CreateImage(ImageFormat::PLANAR_YCBCR);
   PlanarYCbCrImage *yuvImage = static_cast<PlanarYCbCrImage *>(mImage.get());
 
   if (!yuvImage) {
     NS_WARNING("Could not create I420 image");
     return nullptr;
   }
@@ -413,14 +413,14 @@ MediaPluginReader::ImageBufferCallback::
   frameDesc.mPicSize = IntSize(aWidth, aHeight);
 
   yuvImage->SetDataNoCopy(frameDesc);
 
   return buffer;
 }
 
 already_AddRefed<Image>
-MediaPluginReader::ImageBufferCallback::GetImage()
+AndroidMediaReader::ImageBufferCallback::GetImage()
 {
   return mImage.forget();
 }
 
 } // namespace mozilla
--- a/content/media/android/AndroidMediaReader.h
+++ b/content/media/android/AndroidMediaReader.h
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
-#if !defined(MediaPluginReader_h_)
-#define MediaPluginReader_h_
+#if !defined(AndroidMediaReader_h_)
+#define AndroidMediaReader_h_
 
 #include "mozilla/Attributes.h"
 #include "MediaResource.h"
 #include "MediaDecoderReader.h"
 #include "ImageContainer.h"
 #include "nsAutoPtr.h"
 #include "mozilla/layers/SharedRGBImage.h"
  
@@ -24,30 +24,30 @@ class AbstractMediaDecoder;
 namespace layers {
 class ImageContainer;
 }
 
 namespace dom {
 class TimeRanges;
 }
  
-class MediaPluginReader : public MediaDecoderReader
+class AndroidMediaReader : public MediaDecoderReader
 {
   nsCString mType;
   MPAPI::Decoder *mPlugin;
   bool mHasAudio;
   bool mHasVideo;
   nsIntRect mPicture;
   nsIntSize mInitialFrame;
   int64_t mVideoSeekTimeUs;
   int64_t mAudioSeekTimeUs;
   nsAutoPtr<VideoData> mLastVideoFrame;
 public:
-  MediaPluginReader(AbstractMediaDecoder* aDecoder,
-                    const nsACString& aContentType);
+  AndroidMediaReader(AbstractMediaDecoder* aDecoder,
+                     const nsACString& aContentType);
 
   virtual nsresult Init(MediaDecoderReader* aCloneDonor);
   virtual nsresult ResetDecode();
 
   virtual bool DecodeAudioData();
   virtual bool DecodeVideoFrame(bool &aKeyframeSkip,
                                 int64_t aTimeThreshold);
 
--- a/content/media/android/AndroidMediaResourceServer.cpp
+++ b/content/media/android/AndroidMediaResourceServer.cpp
@@ -11,17 +11,17 @@
 #include "nsISocketTransport.h"
 #include "nsIOutputStream.h"
 #include "nsIInputStream.h"
 #include "nsIRandomGenerator.h"
 #include "nsReadLine.h"
 #include "nsNetCID.h"
 #include "VideoUtils.h"
 #include "MediaResource.h"
-#include "MediaResourceServer.h"
+#include "AndroidMediaResourceServer.h"
 
 #if defined(_MSC_VER)
 #define strtoll _strtoi64
 #define snprintf _snprintf_s
 #endif
 
 using namespace mozilla;
 
@@ -106,29 +106,29 @@ ReadCRLF (StreamType* aStream, nsLineBuf
 class ServeResourceEvent : public nsRunnable {
 private:
   // Reading from this reads the data sent from the client.
   nsCOMPtr<nsIInputStream> mInput;
 
   // Writing to this sends data to the client.
   nsCOMPtr<nsIOutputStream> mOutput;
 
-  // The MediaResourceServer that owns the MediaResource instances
+  // The AndroidMediaResourceServer that owns the MediaResource instances
   // served. This is used to lookup the MediaResource from the URL.
-  nsRefPtr<MediaResourceServer> mServer;
+  nsRefPtr<AndroidMediaResourceServer> mServer;
 
   // Write 'aBufferLength' bytes from 'aBuffer' to 'mOutput'. This
   // method ensures all the data is written by checking the number
   // of bytes returned from the output streams 'Write' method and
   // looping until done.
   nsresult WriteAll(char const* aBuffer, int32_t aBufferLength);
 
 public:
   ServeResourceEvent(nsIInputStream* aInput, nsIOutputStream* aOutput,
-                     MediaResourceServer* aServer)
+                     AndroidMediaResourceServer* aServer)
     : mInput(aInput), mOutput(aOutput), mServer(aServer) {}
 
   // This method runs on the thread and exits when it has completed the
   // HTTP request.
   NS_IMETHOD Run();
 
   // Given the first line of an HTTP request, parse the URL requested and
   // return the MediaResource for that URL.
@@ -331,30 +331,30 @@ ServeResourceEvent::Shutdown()
   This is the listener attached to the server socket. When an HTTP
   request is made by the client the OnSocketAccepted method is
   called. This method will spawn a thread to process the request.
   The thread receives a single event which does the parsing of
   the HTTP request and forwarding the data from the MediaResource
   to the output stream of the request.
 
   The MediaResource used for providing the request data is obtained
-  from the MediaResourceServer that created this listener, using the
+  from the AndroidMediaResourceServer that created this listener, using the
   URL the client requested.
 */
 class ResourceSocketListener : public nsIServerSocketListener
 {
 public:
-  // The MediaResourceServer used to look up the MediaResource
+  // The AndroidMediaResourceServer used to look up the MediaResource
   // on requests.
-  nsRefPtr<MediaResourceServer> mServer;
+  nsRefPtr<AndroidMediaResourceServer> mServer;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSISERVERSOCKETLISTENER
 
-  ResourceSocketListener(MediaResourceServer* aServer) :
+  ResourceSocketListener(AndroidMediaResourceServer* aServer) :
     mServer(aServer)
   {
   }
 
 private:
   virtual ~ResourceSocketListener() { }
 };
 
@@ -383,23 +383,23 @@ ResourceSocketListener::OnSocketAccepted
 }
 
 NS_IMETHODIMP
 ResourceSocketListener::OnStopListening(nsIServerSocket* aServ, nsresult aStatus)
 {
   return NS_OK;
 }
 
-MediaResourceServer::MediaResourceServer() :
-  mMutex("MediaResourceServer")
+AndroidMediaResourceServer::AndroidMediaResourceServer() :
+  mMutex("AndroidMediaResourceServer")
 {
 }
 
 NS_IMETHODIMP
-MediaResourceServer::Run()
+AndroidMediaResourceServer::Run()
 {
   MutexAutoLock lock(mMutex);
 
   nsresult rv;
   mSocket = do_CreateInstance(NS_SERVERSOCKET_CONTRACTID, &rv);
   if (NS_FAILED(rv)) return rv;
 
   rv = mSocket->InitSpecialConnection(-1,
@@ -410,34 +410,34 @@ MediaResourceServer::Run()
 
   rv = mSocket->AsyncListen(new ResourceSocketListener(this));
   if (NS_FAILED(rv)) return rv;
 
   return NS_OK;
 }
 
 /* static */
-already_AddRefed<MediaResourceServer>
-MediaResourceServer::Start()
+already_AddRefed<AndroidMediaResourceServer>
+AndroidMediaResourceServer::Start()
 {
-  nsRefPtr<MediaResourceServer> server = new MediaResourceServer();
+  nsRefPtr<AndroidMediaResourceServer> server = new AndroidMediaResourceServer();
   NS_DispatchToMainThread(server, NS_DISPATCH_SYNC);
   return server.forget();
 }
 
 void
-MediaResourceServer::Stop()
+AndroidMediaResourceServer::Stop()
 {
   MutexAutoLock lock(mMutex);
   mSocket->Close();
   mSocket = nullptr;
 }
 
 nsresult
-MediaResourceServer::AppendRandomPath(nsCString& aUrl)
+AndroidMediaResourceServer::AppendRandomPath(nsCString& aUrl)
 {
   // Use a cryptographic quality PRNG to generate raw random bytes
   // and convert that to a base64 string for use as an URL path. This
   // is based on code from nsExternalAppHandler::SetUpTempFile.
   nsresult rv;
   nsCOMPtr<nsIRandomGenerator> rg =
     do_GetService("@mozilla.org/security/random-generator;1", &rv);
   if (NS_FAILED(rv)) return rv;
@@ -469,17 +469,17 @@ MediaResourceServer::AppendRandomPath(ns
 
   aUrl += "/";
   aUrl += tempLeafName;
 
   return NS_OK;
 }
 
 nsresult
-MediaResourceServer::AddResource(mozilla::MediaResource* aResource, nsCString& aUrl)
+AndroidMediaResourceServer::AddResource(mozilla::MediaResource* aResource, nsCString& aUrl)
 {
   nsCString url = GetURLPrefix();
   nsresult rv = AppendRandomPath(url);
   if (NS_FAILED (rv)) return rv;
 
   {
     MutexAutoLock lock(mMutex);
 
@@ -489,40 +489,40 @@ MediaResourceServer::AddResource(mozilla
   }
 
   aUrl = url;
 
   return NS_OK;
 }
 
 void
-MediaResourceServer::RemoveResource(nsCString const& aUrl)
+AndroidMediaResourceServer::RemoveResource(nsCString const& aUrl)
 {
   MutexAutoLock lock(mMutex);
   mResources.erase(aUrl);
 }
 
 nsCString
-MediaResourceServer::GetURLPrefix()
+AndroidMediaResourceServer::GetURLPrefix()
 {
   MutexAutoLock lock(mMutex);
 
   int32_t port = 0;
   nsresult rv = mSocket->GetPort(&port);
   if (NS_FAILED (rv) || port < 0) {
     return nsCString("");
   }
 
   char buffer[256];
   snprintf(buffer, sizeof(buffer), "http://127.0.0.1:%d", port >= 0 ? port : 0);
   return nsCString(buffer);
 }
 
 already_AddRefed<MediaResource>
-MediaResourceServer::GetResource(nsCString const& aUrl)
+AndroidMediaResourceServer::GetResource(nsCString const& aUrl)
 {
   MutexAutoLock lock(mMutex);
   ResourceMap::const_iterator it = mResources.find(aUrl);
   if (it == mResources.end()) return nullptr;
 
   nsRefPtr<MediaResource> resource = it->second;
   return resource.forget();
 }
--- a/content/media/android/AndroidMediaResourceServer.h
+++ b/content/media/android/AndroidMediaResourceServer.h
@@ -1,80 +1,80 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
-#if !defined(MediaResourceServer_h_)
-#define MediaResourceServer_h_
+#if !defined(AndroidMediaResourceServer_h_)
+#define AndroidMediaResourceServer_h_
 
 #include <map>
 #include "nsIServerSocket.h"
 #include "MediaResource.h"
 
 namespace mozilla {
 
 class MediaResource;
 
 /*
-  MediaResourceServer instantiates a socket server that understands
+  AndroidMediaResourceServer instantiates a socket server that understands
   HTTP requests for MediaResource instances. The server runs on an
   automatically selected port and MediaResource instances are registered.
   The registration returns a string URL than can be used to fetch the
   resource. That URL contains a randomly generated path to make it
   difficult for other local applications on the device to guess it.
 
   The HTTP protocol is limited in that it supports only what the
   Android DataSource implementation uses to fetch media. It
   understands HTTP GET and byte range requests.
 
   The intent of this class is to be used in Media backends that
   have a system component that does its own network requests. These
   requests are made against this server which then uses standard
   Gecko network requests and media cache usage.
 
-  The MediaResourceServer can be instantiated on any thread and
+  The AndroidMediaResourceServer can be instantiated on any thread and
   its methods are threadsafe - they can be called on any thread.
   The server socket itself is always run on the main thread and
   this is done by the Start() static method by synchronously
   dispatching to the main thread.
 */
-class MediaResourceServer : public nsRunnable
+class AndroidMediaResourceServer : public nsRunnable
 {
 private:
-  // Mutex protecting private members of MediaResourceServer.
+  // Mutex protecting private members of AndroidMediaResourceServer.
   // All member variables below this point in the class definition
   // must acquire the mutex before access.
   mozilla::Mutex mMutex;
 
   // Server socket used to listen for incoming connections
   nsCOMPtr<nsIServerSocket> mSocket;
 
   // Mapping between MediaResource URL's to the MediaResource
   // object served at that URL.
   typedef std::map<nsCString,
                   nsRefPtr<mozilla::MediaResource> > ResourceMap;
   ResourceMap mResources;
 
-  // Create a MediaResourceServer that will listen on an automatically
+  // Create a AndroidMediaResourceServer that will listen on an automatically
   // selected port when started. This is private as it should only be
   // called internally from the public 'Start' method.
-  MediaResourceServer();
+  AndroidMediaResourceServer();
   NS_IMETHOD Run();
 
   // Append a random URL path to a string. This is used for creating a
   // unique URl for a resource which helps prevent malicious software
   // running on the same machine as the server from guessing the URL
   // and accessing video data.
   nsresult AppendRandomPath(nsCString& aURL);
 
 public:
-  // Create a MediaResourceServer and start it listening. This call will
+  // Create a AndroidMediaResourceServer and start it listening. This call will
   // perform a synchronous request on the main thread.
-  static already_AddRefed<MediaResourceServer> Start();
+  static already_AddRefed<AndroidMediaResourceServer> Start();
 
   // Stops the server from listening and accepting further connections.
   void Stop();
 
   // Add a MediaResource to be served by this server. Stores the
   // absolute URL that can be used to access the resource in 'aUrl'.
   nsresult AddResource(mozilla::MediaResource* aResource, nsCString& aUrl);
 
--- a/content/media/android/moz.build
+++ b/content/media/android/moz.build
@@ -1,27 +1,27 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 EXPORTS += [
-    'MediaPluginDecoder.h',
-    'MediaPluginHost.h',
-    'MediaPluginReader.h',
-    'MediaResourceServer.h',
+    'AndroidMediaDecoder.h',
+    'AndroidMediaPluginHost.h',
+    'AndroidMediaReader.h',
+    'AndroidMediaResourceServer.h',
     'MPAPI.h',
 ]
 
 UNIFIED_SOURCES += [
-    'MediaPluginDecoder.cpp',
-    'MediaPluginHost.cpp',
-    'MediaPluginReader.cpp',
-    'MediaResourceServer.cpp',
+    'AndroidMediaDecoder.cpp',
+    'AndroidMediaPluginHost.cpp',
+    'AndroidMediaReader.cpp',
+    'AndroidMediaResourceServer.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/content/base/src',
     '/content/html/content/src',
     ]
 
 FINAL_LIBRARY = 'gklayout'
--- a/content/media/moz.build
+++ b/content/media/moz.build
@@ -25,18 +25,18 @@ if CONFIG['MOZ_WEBM']:
     PARALLEL_DIRS += ['webm']
 
 if CONFIG['MOZ_GSTREAMER']:
     PARALLEL_DIRS += ['gstreamer']
 
 if CONFIG['MOZ_DIRECTSHOW']:
     PARALLEL_DIRS += ['directshow']
 
-if CONFIG['MOZ_MEDIA_PLUGINS']:
-    PARALLEL_DIRS += ['plugins']
+if CONFIG['MOZ_ANDROID_OMX']:
+    PARALLEL_DIRS += ['android']
 
 if CONFIG['MOZ_WMF']:
     PARALLEL_DIRS += ['wmf']
 
 if CONFIG['MOZ_FMP4']:
     PARALLEL_DIRS += ['fmp4']
 
 if CONFIG['MOZ_APPLEMEDIA']:
--- a/content/media/omx/MediaOmxReader.cpp
+++ b/content/media/omx/MediaOmxReader.cpp
@@ -322,17 +322,17 @@ bool MediaOmxReader::DecodeVideoFrame(bo
     }
 
     if (!v) {
       NS_WARNING("Unable to create VideoData");
       return false;
     }
 
     decoded++;
-    NS_ASSERTION(decoded <= parsed, "Expect to decode fewer frames than parsed in MediaPlugin...");
+    NS_ASSERTION(decoded <= parsed, "Expect to decode fewer frames than parsed in OMX decoder...");
 
     mVideoQueue.Push(v);
 
     break;
   }
 
   return true;
 }
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -80,18 +80,18 @@
 
 #include "nsHTMLEditor.h"
 #include "nsTextServicesDocument.h"
 
 #ifdef MOZ_WEBSPEECH
 #include "nsSynthVoiceRegistry.h"
 #endif
 
-#ifdef MOZ_MEDIA_PLUGINS
-#include "MediaPluginHost.h"
+#ifdef MOZ_ANDROID_OMX
+#include "AndroidMediaPluginHost.h"
 #endif
 
 #ifdef MOZ_WMF
 #include "WMFDecoder.h"
 #endif
 
 #ifdef MOZ_GSTREAMER
 #include "GStreamerFormatHelper.h"
@@ -361,18 +361,18 @@ nsLayoutStatics::Shutdown()
   ShutdownJSEnvironment();
   nsGlobalWindow::ShutDown();
   nsDOMClassInfo::ShutDown();
   nsListControlFrame::Shutdown();
   nsXBLService::Shutdown();
   nsAutoCopyListener::Shutdown();
   FrameLayerBuilder::Shutdown();
 
-#ifdef MOZ_MEDIA_PLUGINS
-  MediaPluginHost::Shutdown();
+#ifdef MOZ_ANDROID_OMX
+  AndroidMediaPluginHost::Shutdown();
 #endif
 
 #ifdef MOZ_GSTREAMER
   GStreamerFormatHelper::Shutdown();
 #endif
 
 #ifdef MOZ_FFMPEG
   FFmpegRuntimeLinker::Unlink();