summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/libcubeb/src/cubeb_opensl.c5
-rw-r--r--media/libcubeb/src/moz.build21
-rw-r--r--media/libpng/pnglibconf.h13
-rw-r--r--media/mtransport/common.build5
-rw-r--r--media/mtransport/gonk_addrs.cpp170
-rw-r--r--media/mtransport/test/moz.build2
-rw-r--r--media/omx-plugin/OmxPlugin.cpp26
-rw-r--r--media/omx-plugin/lib/ics/libstagefright/moz.build15
-rw-r--r--media/omx-plugin/lib/ics/libutils/moz.build7
-rw-r--r--media/omx-plugin/lib/ics/libvideoeditorplayer/moz.build7
-rw-r--r--media/omx-plugin/moz.build33
-rw-r--r--media/webrtc/moz.build35
-rw-r--r--media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp17
-rw-r--r--media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp4
-rw-r--r--media/webrtc/signaling/test/moz.build2
-rw-r--r--media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_utility_android.h2
-rw-r--r--media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.cc28
-rw-r--r--media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.h8
-rw-r--r--media/webrtc/trunk/webrtc/video_engine/include/vie_base.h4
19 files changed, 47 insertions, 357 deletions
diff --git a/media/libcubeb/src/cubeb_opensl.c b/media/libcubeb/src/cubeb_opensl.c
index d44a56bd7..dd5416228 100644
--- a/media/libcubeb/src/cubeb_opensl.c
+++ b/media/libcubeb/src/cubeb_opensl.c
@@ -187,10 +187,6 @@ static void opensl_destroy(cubeb * ctx);
#if defined(__ANDROID__)
-// The bionic header file on B2G contains the required
-// declarations on all releases.
-#ifndef MOZ_WIDGET_GONK
-
#if (__ANDROID_API__ >= ANDROID_VERSION_LOLLIPOP)
typedef int (system_property_get)(const char*, char*);
@@ -212,7 +208,6 @@ __system_property_get(const char* name, char* value)
return ret;
}
#endif
-#endif
static int
get_android_version(void)
diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build
index 781214620..2ca3a2f54 100644
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -29,8 +29,6 @@ if CONFIG['MOZ_PULSEAUDIO']:
'cubeb_pulse.c',
]
DEFINES['USE_PULSE'] = True
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
- DEFINES['DISABLE_LIBPULSE_DLOPEN'] = True
if CONFIG['MOZ_JACK']:
SOURCES += [
@@ -73,24 +71,13 @@ if CONFIG['OS_TARGET'] == 'Android':
SOURCES += ['cubeb_opensl.c']
SOURCES += ['cubeb_resampler.cpp']
DEFINES['USE_OPENSL'] = True
- if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
- SOURCES += [
- 'cubeb_audiotrack.c',
- ]
- DEFINES['USE_AUDIOTRACK'] = True
+ SOURCES += [
+ 'cubeb_audiotrack.c',
+ ]
+ DEFINES['USE_AUDIOTRACK'] = True
FINAL_LIBRARY = 'gkmedias'
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
- if CONFIG['ANDROID_VERSION'] >= '17':
- LOCAL_INCLUDES += [
- '%' + '%s/frameworks/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
- ]
- else:
- LOCAL_INCLUDES += [
- '%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
- ]
-
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
diff --git a/media/libpng/pnglibconf.h b/media/libpng/pnglibconf.h
index 3a39f86fa..662e1ce89 100644
--- a/media/libpng/pnglibconf.h
+++ b/media/libpng/pnglibconf.h
@@ -95,19 +95,6 @@
#define PNG_SEQUENTIAL_READ_SUPPORTED
#endif
-/* necessary for boot animation code (Gonk) */
-#ifdef MOZ_WIDGET_GONK
-#define PNG_bKGD_SUPPORTED
-#define PNG_UNKNOWN_CHUNKS_SUPPORTED
-#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
-#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-#define PNG_EASY_ACCESS_SUPPORTED
-#define PNG_READ_bKGD_SUPPORTED
-#define PNG_READ_BGR_SUPPORTED
-#define PNG_READ_GRAY_TO_RGB_SUPPORTED
-#define PNG_READ_STRIP_ALPHA_SUPPORTED
-#endif
-
#define PNG_WRITE_SUPPORTED
#define PNG_WRITE_APNG_SUPPORTED
#define PNG_WRITE_tRNS_SUPPORTED
diff --git a/media/mtransport/common.build b/media/mtransport/common.build
index 7576ab4fc..4050af366 100644
--- a/media/mtransport/common.build
+++ b/media/mtransport/common.build
@@ -27,11 +27,6 @@ mtransport_lcppsrcs = [
'transportlayerprsock.cpp',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
- mtransport_lcppsrcs += [
- 'gonk_addrs.cpp',
- ]
-
mtransport_cppsrcs = [
'/media/mtransport/%s' % s for s in sorted(mtransport_lcppsrcs)
]
diff --git a/media/mtransport/gonk_addrs.cpp b/media/mtransport/gonk_addrs.cpp
deleted file mode 100644
index 1c69b711e..000000000
--- a/media/mtransport/gonk_addrs.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=2 et sw=2 tw=80: */
-/* 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/. */
-extern "C" {
-#include <arpa/inet.h>
-#include "r_types.h"
-#include "stun.h"
-#include "addrs.h"
-}
-
-#include <vector>
-#include <string>
-#include "nsINetworkInterface.h"
-#include "nsINetworkInterfaceListService.h"
-#include "runnable_utils.h"
-#include "nsCOMPtr.h"
-#include "nsMemory.h"
-#include "nsThreadUtils.h"
-#include "nsServiceManagerUtils.h"
-#include "mozilla/SyncRunnable.h"
-
-namespace {
-struct NetworkInterface {
- struct sockaddr_in addr;
- std::string name;
- // See NR_INTERFACE_TYPE_* in nICEr/src/net/local_addrs.h
- int type;
-};
-
-nsresult
-GetInterfaces(std::vector<NetworkInterface>* aInterfaces)
-{
- MOZ_ASSERT(aInterfaces);
-
- // Obtain network interfaces from network manager.
- nsresult rv;
- nsCOMPtr<nsINetworkInterfaceListService> listService =
- do_GetService("@mozilla.org/network/interface-list-service;1", &rv);
- NS_ENSURE_SUCCESS(rv, rv);
-
- int32_t flags =
- nsINetworkInterfaceListService::LIST_NOT_INCLUDE_SUPL_INTERFACES |
- nsINetworkInterfaceListService::LIST_NOT_INCLUDE_MMS_INTERFACES |
- nsINetworkInterfaceListService::LIST_NOT_INCLUDE_IMS_INTERFACES |
- nsINetworkInterfaceListService::LIST_NOT_INCLUDE_DUN_INTERFACES |
- nsINetworkInterfaceListService::LIST_NOT_INCLUDE_FOTA_INTERFACES;
- nsCOMPtr<nsINetworkInterfaceList> networkList;
- NS_ENSURE_SUCCESS(listService->GetDataInterfaceList(flags,
- getter_AddRefs(networkList)),
- NS_ERROR_FAILURE);
-
- // Translate nsINetworkInterfaceList to NetworkInterface.
- int32_t listLength;
- NS_ENSURE_SUCCESS(networkList->GetNumberOfInterface(&listLength),
- NS_ERROR_FAILURE);
- aInterfaces->clear();
-
- for (int32_t i = 0; i < listLength; i++) {
- nsCOMPtr<nsINetworkInfo> info;
- if (NS_FAILED(networkList->GetInterfaceInfo(i, getter_AddRefs(info)))) {
- continue;
- }
-
- char16_t **ips = nullptr;
- uint32_t *prefixs = nullptr;
- uint32_t count = 0;
- bool isAddressGot = false;
- NetworkInterface interface;
- memset(&(interface.addr), 0, sizeof(interface.addr));
- interface.addr.sin_family = AF_INET;
-
- if (NS_FAILED(info->GetAddresses(&ips, &prefixs, &count))) {
- continue;
- }
-
- for (uint32_t j = 0; j < count; j++) {
- nsAutoString ip;
-
- ip.Assign(ips[j]);
- if (inet_pton(AF_INET, NS_ConvertUTF16toUTF8(ip).get(),
- &(interface.addr.sin_addr.s_addr)) == 1) {
- isAddressGot = true;
- break;
- }
- }
-
- free(prefixs);
- NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, ips);
-
- if (!isAddressGot) {
- continue;
- }
-
- nsAutoString ifaceName;
- if (NS_FAILED(info->GetName(ifaceName))) {
- continue;
- }
- interface.name = NS_ConvertUTF16toUTF8(ifaceName).get();
-
- int32_t type;
- if (NS_FAILED(info->GetType(&type))) {
- continue;
- }
- switch (type) {
- case nsINetworkInfo::NETWORK_TYPE_WIFI:
- interface.type = NR_INTERFACE_TYPE_WIFI;
- break;
- case nsINetworkInfo::NETWORK_TYPE_MOBILE:
- interface.type = NR_INTERFACE_TYPE_MOBILE;
- break;
- }
-
- aInterfaces->push_back(interface);
- }
- return NS_OK;
-}
-} // anonymous namespace
-
-int
-nr_stun_get_addrs(nr_local_addr aAddrs[], int aMaxAddrs,
- int aDropLoopback, int aDropLinkLocal, int* aCount)
-{
- nsresult rv;
- int r;
-
- // Get network interface list.
- std::vector<NetworkInterface> interfaces;
- nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
- mozilla::SyncRunnable::DispatchToThread(
- mainThread.get(),
- mozilla::WrapRunnableNMRet(&rv, &GetInterfaces, &interfaces),
- false);
- if (NS_FAILED(rv)) {
- return R_FAILED;
- }
-
- // Translate to nr_transport_addr.
- int32_t n = 0;
- size_t num_interface = std::min(interfaces.size(), (size_t)aMaxAddrs);
- for (size_t i = 0; i < num_interface; ++i) {
- NetworkInterface &interface = interfaces[i];
- if (nr_sockaddr_to_transport_addr((sockaddr*)&(interface.addr),
- IPPROTO_UDP, 0, &(aAddrs[n].addr))) {
- r_log(NR_LOG_STUN, LOG_WARNING, "Problem transforming address");
- return R_FAILED;
- }
- strlcpy(aAddrs[n].addr.ifname, interface.name.c_str(),
- sizeof(aAddrs[n].addr.ifname));
- aAddrs[n].interface.type = interface.type;
- aAddrs[n].interface.estimated_speed = 0;
- n++;
- }
-
- *aCount = n;
- r = nr_stun_remove_duplicate_addrs(aAddrs, aDropLoopback, aDropLinkLocal, aCount);
- if (r != 0) {
- return r;
- }
-
- for (int i = 0; i < *aCount; ++i) {
- char typestr[100];
- nr_local_addr_fmt_info_string(aAddrs + i, typestr, sizeof(typestr));
- r_log(NR_LOG_STUN, LOG_DEBUG, "Address %d: %s on %s, type: %s\n",
- i, aAddrs[i].addr.as_string, aAddrs[i].addr.ifname, typestr);
- }
-
- return 0;
-}
diff --git a/media/mtransport/test/moz.build b/media/mtransport/test/moz.build
index e8f453787..d769e62f2 100644
--- a/media/mtransport/test/moz.build
+++ b/media/mtransport/test/moz.build
@@ -4,7 +4,7 @@
# 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 CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
+if CONFIG['OS_TARGET'] != 'WINNT':
SOURCES += [
'buffered_stun_socket_unittest.cpp',
'ice_unittest.cpp',
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 <stagefright/MetaData.h>
#include <stagefright/OMXCodec.h>
#include <media/stagefright/MediaErrors.h>
-#ifdef MOZ_WIDGET_GONK
-#include <OMX.h>
-#else
#include <stagefright/OMXClient.h>
-#endif
#include <algorithm>
#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<IOMX> sOMX = nullptr;
-static sp<IOMX> GetOMX() {
- if(sOMX.get() == nullptr) {
- sOMX = reinterpret_cast<IOMX*>(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<uint32_t>(flags);
-#endif
}
enum ColorFormatSupport {
@@ -481,11 +459,7 @@ bool OmxDecoder::Init()
int64_t totalDurationUs = 0;
-#ifdef MOZ_WIDGET_GONK
- sp<IOMX> omx = GetOMX();
-#else
sp<IOMX> omx = sClientInstance.get()->interface();
-#endif
sp<MediaSource> videoTrack;
sp<MediaSource> videoSource;
diff --git a/media/omx-plugin/lib/ics/libstagefright/moz.build b/media/omx-plugin/lib/ics/libstagefright/moz.build
index 1fe19a5fd..b156d151e 100644
--- a/media/omx-plugin/lib/ics/libstagefright/moz.build
+++ b/media/omx-plugin/lib/ics/libstagefright/moz.build
@@ -5,14 +5,13 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIST_INSTALL = False
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
- SOURCES += [
- 'libstagefright.cpp',
- ]
- # Some codec-related code uses multi-character constants; allow this.
- # XXX: could instead use the FOURCC macro to define these constants.
- if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
- SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
+SOURCES += [
+ 'libstagefright.cpp',
+]
+# Some codec-related code uses multi-character constants; allow this.
+# XXX: could instead use the FOURCC macro to define these constants.
+if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
+ SOURCES['libstagefright.cpp'].flags += ['-Wno-error=multichar']
SharedLibrary('stagefright')
diff --git a/media/omx-plugin/lib/ics/libutils/moz.build b/media/omx-plugin/lib/ics/libutils/moz.build
index efce12194..7fa617fb3 100644
--- a/media/omx-plugin/lib/ics/libutils/moz.build
+++ b/media/omx-plugin/lib/ics/libutils/moz.build
@@ -5,10 +5,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIST_INSTALL = False
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
- SOURCES += [
- 'libutils.cpp',
- ]
+SOURCES += [
+ 'libutils.cpp',
+]
SharedLibrary('utils')
diff --git a/media/omx-plugin/lib/ics/libvideoeditorplayer/moz.build b/media/omx-plugin/lib/ics/libvideoeditorplayer/moz.build
index 4314b1aa2..f05f0f3c9 100644
--- a/media/omx-plugin/lib/ics/libvideoeditorplayer/moz.build
+++ b/media/omx-plugin/lib/ics/libvideoeditorplayer/moz.build
@@ -5,10 +5,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIST_INSTALL = False
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
- SOURCES += [
- 'libvideoeditorplayer.cpp',
- ]
+SOURCES += [
+ 'libvideoeditorplayer.cpp',
+]
SharedLibrary('videoeditorplayer')
diff --git a/media/omx-plugin/moz.build b/media/omx-plugin/moz.build
index 80b8534f2..004a8bdba 100644
--- a/media/omx-plugin/moz.build
+++ b/media/omx-plugin/moz.build
@@ -20,13 +20,10 @@ SOURCES += [
SharedLibrary('omxplugin')
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
- pass
-else:
- LOCAL_INCLUDES += [
- 'include/ics',
- 'include/ics/media/stagefright/openmax',
- ]
+LOCAL_INCLUDES += [
+ 'include/ics',
+ 'include/ics/media/stagefright/openmax',
+]
if CONFIG['GNU_CXX']:
# Stagefright header files define many multichar constants.
@@ -35,23 +32,11 @@ if CONFIG['GNU_CXX']:
'-Wno-shadow',
]
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
- EXTRA_DSO_LDOPTS += [
- '-lutils',
- '-lstagefright',
- '-lmedia',
- '-lstagefright_omx',
- '-lbinder',
- '-lui',
- '-lhardware',
- '-lcutils',
- ]
-else:
- USE_LIBS += [
- '/media/omx-plugin/lib/ics/libstagefright/stagefright',
- '/media/omx-plugin/lib/ics/libutils/utils',
- 'videoeditorplayer',
- ]
+USE_LIBS += [
+ '/media/omx-plugin/lib/ics/libstagefright/stagefright',
+ '/media/omx-plugin/lib/ics/libutils/utils',
+ 'videoeditorplayer',
+]
# Don't use STL wrappers; this isn't Gecko code
DISABLE_STL_WRAPPING = True
diff --git a/media/webrtc/moz.build b/media/webrtc/moz.build
index 986655c53..4361273b4 100644
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -101,22 +101,21 @@ if CONFIG['MOZ_WEBRTC_SIGNALING']:
else:
CXXFLAGS += ['-validate-charset-']
-if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
- GYP_DIRS += ['trunk/testing']
- GYP_DIRS['trunk/testing'].input = 'trunk/testing/gtest.gyp'
- GYP_DIRS['trunk/testing'].variables = gyp_vars
- # We allow warnings for third-party code that can be updated from upstream.
- GYP_DIRS['trunk/testing'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
- GYP_DIRS['trunk/testing'].non_unified_sources += webrtc_non_unified_sources
+GYP_DIRS += ['trunk/testing']
+GYP_DIRS['trunk/testing'].input = 'trunk/testing/gtest.gyp'
+GYP_DIRS['trunk/testing'].variables = gyp_vars
+# We allow warnings for third-party code that can be updated from upstream.
+GYP_DIRS['trunk/testing'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
+GYP_DIRS['trunk/testing'].non_unified_sources += webrtc_non_unified_sources
- if CONFIG['MOZ_WEBRTC_SIGNALING']:
- GYP_DIRS += ['signalingtest']
- GYP_DIRS['signalingtest'].input = 'signaling/signaling.gyp'
- GYP_DIRS['signalingtest'].variables = gyp_vars.copy()
- GYP_DIRS['signalingtest'].variables.update(
- build_for_test=1,
- moz_webrtc_mediacodec=0,
- build_for_standalone=0
- )
- GYP_DIRS['signalingtest'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
- GYP_DIRS['signalingtest'].non_unified_sources += signaling_non_unified_sources
+if CONFIG['MOZ_WEBRTC_SIGNALING']:
+ GYP_DIRS += ['signalingtest']
+ GYP_DIRS['signalingtest'].input = 'signaling/signaling.gyp'
+ GYP_DIRS['signalingtest'].variables = gyp_vars.copy()
+ GYP_DIRS['signalingtest'].variables.update(
+ build_for_test=1,
+ moz_webrtc_mediacodec=0,
+ build_for_standalone=0
+ )
+ GYP_DIRS['signalingtest'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
+ GYP_DIRS['signalingtest'].non_unified_sources += signaling_non_unified_sources
diff --git a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
index dc052f4e0..888b87857 100644
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
@@ -26,9 +26,6 @@ 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"
@@ -326,30 +323,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) {
diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
index 586876406..d47a10312 100644
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -2217,11 +2217,7 @@ public:
#if defined(MOZILLA_INTERNAL_API)
if (buffer) {
// Create a video frame using |buffer|.
-#ifdef MOZ_WIDGET_GONK
- RefPtr<PlanarYCbCrImage> yuvImage = new GrallocImage();
-#else
RefPtr<PlanarYCbCrImage> yuvImage = image_container_->CreatePlanarYCbCrImage();
-#endif
uint8_t* frame = const_cast<uint8_t*>(static_cast<const uint8_t*> (buffer));
PlanarYCbCrData yuvData;
diff --git a/media/webrtc/signaling/test/moz.build b/media/webrtc/signaling/test/moz.build
index 4d8704de4..aac331b1b 100644
--- a/media/webrtc/signaling/test/moz.build
+++ b/media/webrtc/signaling/test/moz.build
@@ -5,7 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# TODO: bug 1172551 - get these tests working on iOS
-if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit':
+if CONFIG['OS_TARGET'] != 'WINNT' and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'uikit':
GeckoCppUnitTests([
'jsep_session_unittest',
'jsep_track_unittest',
diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_utility_android.h b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_utility_android.h
index fd05a61ad..1c1ce1ca6 100644
--- a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_utility_android.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_utility_android.h
@@ -15,9 +15,7 @@
#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_ANDROID_H
#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_UTILITY_ANDROID_H
-#if !defined(MOZ_WIDGET_GONK)
#include <jni.h>
-#endif
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_device/audio_device_utility.h"
diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.cc b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.cc
index d0a46afde..5424ba3de 100644
--- a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.cc
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.cc
@@ -9,18 +9,14 @@
*/
#include "webrtc/modules/audio_device/android/audio_manager.h"
-#if !defined(MOZ_WIDGET_GONK)
#include "AndroidJNIWrapper.h"
-#endif
#include <android/log.h>
#include "webrtc/base/arraysize.h"
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_device/android/audio_common.h"
-#if !defined(MOZ_WIDGET_GONK)
#include "webrtc/modules/utility/interface/helpers_android.h"
-#endif
#define TAG "AudioManager"
#define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__)
@@ -31,14 +27,11 @@
namespace webrtc {
-#if !defined(MOZ_WIDGET_GONK)
static JavaVM* g_jvm = NULL;
static jobject g_context = NULL;
static jclass g_audio_manager_class = NULL;
-#endif
void AudioManager::SetAndroidAudioDeviceObjects(void* jvm, void* context) {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("SetAndroidAudioDeviceObjects%s", GetThreadInfo().c_str());
CHECK(jvm);
@@ -65,11 +58,9 @@ void AudioManager::SetAndroidAudioDeviceObjects(void* jvm, void* context) {
jni->RegisterNatives(g_audio_manager_class,
native_methods, arraysize(native_methods));
CHECK_EXCEPTION(jni) << "Error during RegisterNatives";
-#endif
}
void AudioManager::ClearAndroidAudioDeviceObjects() {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("ClearAndroidAudioDeviceObjects%s", GetThreadInfo().c_str());
JNIEnv* jni = GetEnv(g_jvm);
CHECK(jni) << "AttachCurrentThread must be called on this tread";
@@ -80,36 +71,28 @@ void AudioManager::ClearAndroidAudioDeviceObjects() {
DeleteGlobalRef(jni, g_context);
g_context = NULL;
g_jvm = NULL;
-#endif
}
AudioManager::AudioManager()
: initialized_(false) {
-#if !defined(MOZ_WIDGET_GONK)
j_audio_manager_ = NULL;
ALOGD("ctor%s", GetThreadInfo().c_str());
-#endif
CHECK(HasDeviceObjects());
CreateJavaInstance();
}
AudioManager::~AudioManager() {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("~dtor%s", GetThreadInfo().c_str());
-#endif
DCHECK(thread_checker_.CalledOnValidThread());
Close();
-#if !defined(MOZ_WIDGET_GONK)
AttachThreadScoped ats(g_jvm);
JNIEnv* jni = ats.env();
jni->DeleteGlobalRef(j_audio_manager_);
j_audio_manager_ = NULL;
-#endif
DCHECK(!initialized_);
}
bool AudioManager::Init() {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("Init%s", GetThreadInfo().c_str());
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!initialized_);
@@ -122,13 +105,11 @@ bool AudioManager::Init() {
ALOGE("init failed!");
return false;
}
-#endif
initialized_ = true;
return true;
}
bool AudioManager::Close() {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("Close%s", GetThreadInfo().c_str());
DCHECK(thread_checker_.CalledOnValidThread());
if (!initialized_)
@@ -139,12 +120,10 @@ bool AudioManager::Close() {
jni, g_audio_manager_class, "dispose", "()V");
jni->CallVoidMethod(j_audio_manager_, disposeID);
CHECK_EXCEPTION(jni);
-#endif
initialized_ = false;
return true;
}
-#if !defined(MOZ_WIDGET_GONK)
void JNICALL AudioManager::CacheAudioParameters(JNIEnv* env, jobject obj,
jint sample_rate, jint channels, jlong nativeAudioManager) {
webrtc::AudioManager* this_object =
@@ -162,7 +141,6 @@ void AudioManager::OnCacheAudioParameters(
playout_parameters_.reset(sample_rate, channels);
record_parameters_.reset(sample_rate, channels);
}
-#endif
AudioParameters AudioManager::GetPlayoutAudioParameters() const {
CHECK(playout_parameters_.is_valid());
@@ -175,15 +153,10 @@ AudioParameters AudioManager::GetRecordAudioParameters() const {
}
bool AudioManager::HasDeviceObjects() {
-#if !defined(MOZ_WIDGET_GONK)
return (g_jvm && g_context && g_audio_manager_class);
-#else
- return true;
-#endif
}
void AudioManager::CreateJavaInstance() {
-#if !defined(MOZ_WIDGET_GONK)
ALOGD("CreateJavaInstance");
AttachThreadScoped ats(g_jvm);
JNIEnv* jni = ats.env();
@@ -198,7 +171,6 @@ void AudioManager::CreateJavaInstance() {
j_audio_manager_ = jni->NewGlobalRef(j_audio_manager_);
CHECK_EXCEPTION(jni) << "Error during NewGlobalRef";
CHECK(j_audio_manager_);
-#endif
}
} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.h b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.h
index a85acb9bb..a6c712e11 100644
--- a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_manager.h
@@ -11,17 +11,13 @@
#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_
#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_MANAGER_H_
-#if !defined(MOZ_WIDGET_GONK)
#include <jni.h>
-#endif
#include "webrtc/base/thread_checker.h"
#include "webrtc/modules/audio_device/android/audio_common.h"
#include "webrtc/modules/audio_device/include/audio_device_defines.h"
#include "webrtc/modules/audio_device/audio_device_generic.h"
-#if !defined(MOZ_WIDGET_GONK)
#include "webrtc/modules/utility/interface/helpers_android.h"
-#endif
namespace webrtc {
@@ -100,14 +96,12 @@ class AudioManager {
bool initialized() const { return initialized_; }
private:
-#if !defined(MOZ_WIDGET_GONK)
// Called from Java side so we can cache the native audio parameters.
// This method will be called by the WebRtcAudioManager constructor, i.e.
// on the same thread that this object is created on.
static void JNICALL CacheAudioParameters(JNIEnv* env, jobject obj,
jint sample_rate, jint channels, jlong nativeAudioManager);
void OnCacheAudioParameters(JNIEnv* env, jint sample_rate, jint channels);
-#endif
// Returns true if SetAndroidAudioDeviceObjects() has been called
// successfully.
@@ -121,10 +115,8 @@ class AudioManager {
// other methods are called from the same thread.
rtc::ThreadChecker thread_checker_;
-#if !defined(MOZ_WIDGET_GONK)
// The Java WebRtcAudioManager instance.
jobject j_audio_manager_;
-#endif
// Set to true by Init() and false by Close().
bool initialized_;
diff --git a/media/webrtc/trunk/webrtc/video_engine/include/vie_base.h b/media/webrtc/trunk/webrtc/video_engine/include/vie_base.h
index 4e0b15355..578622411 100644
--- a/media/webrtc/trunk/webrtc/video_engine/include/vie_base.h
+++ b/media/webrtc/trunk/webrtc/video_engine/include/vie_base.h
@@ -21,7 +21,7 @@
#include "webrtc/common_types.h"
-#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD) && !defined(MOZ_WIDGET_GONK)
+#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
#include <jni.h>
#endif
@@ -156,7 +156,7 @@ class WEBRTC_DLLEXPORT VideoEngine {
// user receives callbacks for generated trace messages.
static int SetTraceCallback(TraceCallback* callback);
-#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD) && !defined(MOZ_WIDGET_GONK)
+#if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
// Android specific.
static int SetAndroidObjects(JavaVM* java_vm);
#endif