Backed out changesets cd5ec762afa1 and fad66e8fe874 (bug 1137515) for Nexus 5-L bustage.

CLOSED TREE

--HG--
extra : rebase_source : 59680d649177809d0a31d87091ab9d18070f7a0f
This commit is contained in:
Ryan VanderMeulen 2015-03-11 12:35:08 -04:00
Родитель 47bf0598f9
Коммит d4a838cbc3
4 изменённых файлов: 7 добавлений и 29 удалений

Просмотреть файл

@ -292,8 +292,6 @@ if test -n "$gonkdir" ; then
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=
@ -5086,6 +5084,11 @@ if test -n "$MOZ_WEBRTC"; then
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)

Просмотреть файл

@ -16,7 +16,6 @@
#include <stagefright/MediaErrors.h>
#include "AudioChannelFormat.h"
#include "GrallocImages.h"
#include <mozilla/Monitor.h>
#include "mozilla/layers/GrallocTextureClient.h"

Просмотреть файл

@ -245,13 +245,9 @@ MediaEngineGonkVideoSource::Start(SourceMediaStream* aStream, TrackID aID)
}
}
// 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;
}
@ -480,10 +476,8 @@ void
MediaEngineGonkVideoSource::StopImpl() {
MOZ_ASSERT(NS_IsMainThread());
if (mCameraSource.get()) {
mCameraSource->stop();
mCameraSource = nullptr;
}
mCameraSource->stop();
mCameraSource = nullptr;
hal::UnregisterScreenConfigurationObserver(this);
mCameraControl->Stop();

Просмотреть файл

@ -26,11 +26,7 @@ using namespace android;
#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"
@ -320,30 +316,16 @@ public:
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) {