Bug 986381 - Allow to use OMX SW decoder when HW is not available r=sotaro
authorBlake Wu <bwu@mozilla.com>
Wed, 07 May 2014 18:10:56 +0800
changeset 182092 a2a9fef81547
parent 182091 49831d474b17
child 182093 86616594f0c9
push id43210
push usercbook@mozilla.com
push dateThu, 08 May 2014 08:52:53 +0000
treeherdermozilla-inbound@135afc151b75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro
bugs986381
milestone32.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 986381 - Allow to use OMX SW decoder when HW is not available r=sotaro
content/media/omx/OmxDecoder.cpp
--- a/content/media/omx/OmxDecoder.cpp
+++ b/content/media/omx/OmxDecoder.cpp
@@ -489,17 +489,21 @@ bool OmxDecoder::AllocateMediaResources(
     mNativeWindowClient = new GonkNativeWindowClient(mNativeWindow);
 #endif
 
     // Experience with OMX codecs is that only the HW decoders are
     // worth bothering with, at least on the platforms where this code
     // is currently used, and for formats this code is currently used
     // for (h.264).  So if we don't get a hardware decoder, just give
     // up.
+#ifdef MOZ_OMX_WEBM_DECODER
+    int flags = 0;//fallback to omx sw decoder if there is no hw decoder
+#else
     int flags = kHardwareCodecsOnly;
+#endif//MOZ_OMX_WEBM_DECODER
 
     if (isInEmulator()) {
       // If we are in emulator, allow to fall back to software.
       flags = 0;
     }
     mVideoSource =
           OMXCodecProxy::Create(omx,
                                 mVideoTrack->getFormat(),