Backed out changesets cd5ec762afa1 and fad66e8fe874 (bug 1137515) for Nexus 5-L bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 11 Mar 2015 12:35:08 -0400
changeset 261960 ae42a2adeebdb6233889937af67adff28058620a
parent 261959 ff5ddf74379689ab1d729c3bd0839667adccc2e1
child 261961 3f28ce99ab6186f32ad9420102965a5ae38ed460
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1137515
milestone39.0a1
backs outcd5ec762afa14dcccf43e04c572793626a1d6f1e
fad66e8fe87446888a85895d00d290ed7fb51e04
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
Backed out changesets cd5ec762afa1 and fad66e8fe874 (bug 1137515) for Nexus 5-L bustage. CLOSED TREE
configure.in
dom/media/omx/OMXCodecWrapper.cpp
dom/media/webrtc/MediaEngineGonkVideoSource.cpp
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
--- a/configure.in
+++ b/configure.in
@@ -287,18 +287,16 @@ if test -n "$gonkdir" ; then
         AC_SUBST(MOZ_AUDIO_OFFLOAD)
         AC_DEFINE(MOZ_AUDIO_OFFLOAD)
         MOZ_FMP4=1
         ;;
     21)
         GONK_INCLUDES="-I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/av/include -I$gonkdir/frameworks/av/include/media -I$gonkdir/frameworks/av/include/camera -I$gonkdir/frameworks/native/include/media/openmax -I$gonkdir/frameworks/av/media/libstagefright/include"
         MOZ_AUDIO_OFFLOAD=1
         MOZ_OMX_DECODER=1
-        MOZ_OMX_ENCODER=1
-        AC_DEFINE(MOZ_OMX_ENCODER)
         AC_SUBST(MOZ_AUDIO_OFFLOAD)
         AC_DEFINE(MOZ_AUDIO_OFFLOAD)
         MOZ_FMP4=
         MOZ_B2G_CAMERA=1
         MOZ_B2G_BT=1
         MOZ_B2G_BT_BLUEDROID=1
         if test -d "$gonkdir/system/bluetoothd"; then
             MOZ_B2G_BT_DAEMON=1
@@ -5081,16 +5079,21 @@ if test -n "$MOZ_WEBRTC"; then
         ;;
     *)
         dnl default to disabled for all others
         MOZ_WEBRTC=
         ;;
     esac
 fi
 
+dnl Temporary until webrtc works on gonk-L
+if test -n "$gonkdir" && test "$ANDROID_VERSION" -ge 21; then
+    MOZ_WEBRTC=
+fi
+
 AC_TRY_COMPILE([#include <linux/ethtool.h>],
                [ struct ethtool_cmd cmd; cmd.speed_hi = 0; ],
                MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI=1)
 
 AC_SUBST(MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI)
 
 # target_arch is from {ia32|x64|arm|ppc}
 case "$CPU_ARCH" in
--- a/dom/media/omx/OMXCodecWrapper.cpp
+++ b/dom/media/omx/OMXCodecWrapper.cpp
@@ -11,17 +11,16 @@
 #include <cutils/properties.h>
 #include <media/ICrypto.h>
 #include <media/IOMX.h>
 #include <OMX_Component.h>
 #include <stagefright/MediaDefs.h>
 #include <stagefright/MediaErrors.h>
 
 #include "AudioChannelFormat.h"
-#include "GrallocImages.h"
 #include <mozilla/Monitor.h>
 #include "mozilla/layers/GrallocTextureClient.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 
 #define INPUT_BUFFER_TIMEOUT_US (5 * 1000ll)
--- a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
+++ b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp
@@ -240,23 +240,19 @@ MediaEngineGonkVideoSource::Start(Source
   for (nsTArray<nsString>::index_type i = 0; i < focusModes.Length(); ++i) {
     if (focusModes[i].EqualsASCII("continuous-video")) {
       mCameraControl->Set(CAMERA_PARAM_FOCUSMODE, focusModes[i]);
       mCameraControl->ResumeContinuousFocus();
       break;
     }
   }
 
-  // XXX some devices support recording camera frame only in metadata mode.
-  // But GonkCameraSource requests non-metadata recording mode.
-#if ANDROID_VERSION < 21
   if (NS_FAILED(InitDirectMediaBuffer())) {
     return NS_ERROR_FAILURE;
   }
-#endif
 
   return NS_OK;
 }
 
 nsresult
 MediaEngineGonkVideoSource::InitDirectMediaBuffer()
 {
   // Check available buffer resolution.
@@ -475,20 +471,18 @@ MediaEngineGonkVideoSource::StartImpl(we
 
   hal::RegisterScreenConfigurationObserver(this);
 }
 
 void
 MediaEngineGonkVideoSource::StopImpl() {
   MOZ_ASSERT(NS_IsMainThread());
 
-  if (mCameraSource.get()) {
-    mCameraSource->stop();
-    mCameraSource = nullptr;
-  }
+  mCameraSource->stop();
+  mCameraSource = nullptr;
 
   hal::UnregisterScreenConfigurationObserver(this);
   mCameraControl->Stop();
 }
 
 void
 MediaEngineGonkVideoSource::OnHardwareStateChange(HardwareState aState,
                                                   nsresult aReason)
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
@@ -21,21 +21,17 @@
 using namespace android;
 
 // WebRTC
 #include "webrtc/common_video/interface/texture_video_frame.h"
 #include "webrtc/video_engine/include/vie_external_codec.h"
 #include "runnable_utils.h"
 
 // Gecko
-#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 21
-#include "GonkBufferQueueProducer.h"
-#endif
 #include "GonkNativeWindow.h"
-#include "GrallocImages.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/Mutex.h"
 #include "nsThreadUtils.h"
 #include "OMXCodecWrapper.h"
 #include "TextureClient.h"
 #include "mozilla/IntegerPrintfMacros.h"
 
 #define DEQUEUE_BUFFER_TIMEOUT_US (100 * 1000ll) // 100ms.
@@ -315,40 +311,26 @@ public:
     sp<AMessage> config = new AMessage();
     config->setString("mime", MEDIA_MIMETYPE_VIDEO_AVC);
     config->setInt32("width", aWidth);
     config->setInt32("height", aHeight);
     mWidth = aWidth;
     mHeight = aHeight;
 
     sp<Surface> surface = nullptr;
-#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 21
-    sp<IGraphicBufferProducer> producer;
-    sp<IGonkGraphicBufferConsumer> consumer;
-    GonkBufferQueue::createBufferQueue(&producer, &consumer);
-    mNativeWindow = new GonkNativeWindow(consumer);
-#else
     mNativeWindow = new GonkNativeWindow();
-#endif
     if (mNativeWindow.get()) {
       // listen to buffers queued by MediaCodec::RenderOutputBufferAndRelease().
       mNativeWindow->setNewFrameCallback(this);
       // XXX remove buffer changes after a better solution lands - bug 1009420
-#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 21
-      static_cast<GonkBufferQueueProducer*>(producer.get())->setSynchronousMode(false);
-      // More spare buffers to avoid OMX decoder waiting for native window
-      consumer->setMaxAcquiredBufferCount(WEBRTC_OMX_H264_MIN_DECODE_BUFFERS);
-      surface = new Surface(producer);
-#else
       sp<GonkBufferQueue> bq = mNativeWindow->getBufferQueue();
       bq->setSynchronousMode(false);
       // More spare buffers to avoid OMX decoder waiting for native window
       bq->setMaxAcquiredBufferCount(WEBRTC_OMX_H264_MIN_DECODE_BUFFERS);
       surface = new Surface(bq);
-#endif
     }
     status_t result = mCodec->configure(config, surface, nullptr, 0);
     if (result == OK) {
       CODEC_LOGD("OMX:%p decoder configured", this);
       result = Start();
     }
     return result;
   }