From e16bcd08aae85a7d9c2de5a4b1c733280cb81112 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 13 May 2018 00:08:52 +0200 Subject: Remove MOZ_WIDGET_GONK [2/2] Tag #288 --- media/omx-plugin/OmxPlugin.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'media/omx-plugin') diff --git a/media/omx-plugin/OmxPlugin.cpp b/media/omx-plugin/OmxPlugin.cpp index 4b6641c46..ce132b8e2 100644 --- a/media/omx-plugin/OmxPlugin.cpp +++ b/media/omx-plugin/OmxPlugin.cpp @@ -10,11 +10,7 @@ #include #include #include -#ifdef MOZ_WIDGET_GONK -#include -#else #include -#endif #include #include "mozilla/Assertions.h" @@ -125,7 +121,6 @@ public: bool ReadAudio(AudioFrame *aFrame, int64_t aSeekTimeUs); }; -#if !defined(MOZ_WIDGET_GONK) static class OmxClientInstance { public: OmxClientInstance() @@ -156,7 +151,6 @@ private: OMXClient *mClient; status_t mStatus; } sClientInstance; -#endif OmxDecoder::OmxDecoder(PluginHost *aPluginHost, Decoder *aDecoder) : mPluginHost(aPluginHost), @@ -210,16 +204,6 @@ public: } }; -#ifdef MOZ_WIDGET_GONK -static sp sOMX = nullptr; -static sp GetOMX() { - if(sOMX.get() == nullptr) { - sOMX = reinterpret_cast(new OMX); - } - return sOMX; -} -#endif - static uint32_t GetDefaultStagefrightFlags(PluginHost *aPluginHost) { @@ -246,11 +230,6 @@ GetDefaultStagefrightFlags(PluginHost *aPluginHost) static uint32_t GetVideoCreationFlags(PluginHost* aPluginHost) { -#ifdef MOZ_WIDGET_GONK - // Flag value of zero means return a hardware or software decoder - // depending on what the device supports. - return 0; -#else // Check whether the user has set a pref to override our default OMXCodec // CreationFlags flags. This is useful for A/B testing hardware and software // decoders for performance and bugs. The interesting flag values are: @@ -271,7 +250,6 @@ static uint32_t GetVideoCreationFlags(PluginHost* aPluginHost) flags |= GetDefaultStagefrightFlags(aPluginHost); return static_cast(flags); -#endif } enum ColorFormatSupport { @@ -481,11 +459,7 @@ bool OmxDecoder::Init() int64_t totalDurationUs = 0; -#ifdef MOZ_WIDGET_GONK - sp omx = GetOMX(); -#else sp omx = sClientInstance.get()->interface(); -#endif sp videoTrack; sp videoSource; -- cgit v1.2.3