Bug 818843 - Media changes. r=rjesup

This commit is contained in:
Steven Lee 2013-01-23 18:08:16 -05:00
parent e712555f2a
commit 18cbda81f3
17 changed files with 112 additions and 10 deletions

View File

@ -99,6 +99,7 @@ DEFINES += \
endif
ifneq ($(OS_TARGET),WINNT)
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
CPP_UNIT_TESTS = \
ice_unittest.cpp \
nrappkit_unittest.cpp \
@ -110,6 +111,7 @@ ifdef MOZ_SCTP
CPP_UNIT_TESTS += sctp_unittest.cpp
endif
endif
endif
include $(topsrcdir)/config/rules.mk

View File

@ -204,8 +204,14 @@
'sources': [
],
}]
]
}],
['moz_widget_toolkit_gonk==1', {
'defines' : [
'WEBRTC_GONK',
'NO_REG_RPC',
],
}],
],
}]
}

View File

@ -11,11 +11,16 @@ include $(DEPTH)/config/autoconf.mk
DIRS = \
trunk \
trunk/testing \
signaling \
signalingtest \
$(NULL)
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
DIRS += \
signalingtest \
trunk/testing \
$(NULL)
endif
# These Makefiles don't have corresponding Makefile.ins
NO_SUBMAKEFILES_RULE = 1
include $(topsrcdir)/config/rules.mk

View File

@ -13,6 +13,16 @@
'chromium_code': 1,
},
'target_defaults': {
'conditions': [
['moz_widget_toolkit_gonk==1', {
'defines' : [
'WEBRTC_GONK',
],
}],
],
},
'targets': [
#

View File

@ -117,8 +117,13 @@
#include "cpr_linux_timers.h"
#include "plat_api.h"
#include <errno.h>
#if defined(WEBRTC_GONK)
#include <linux/msg.h>
#include <linux/ipc.h>
#else
#include <sys/msg.h>
#include <sys/ipc.h>
#endif
#include "plat_debug.h"
/**

View File

@ -36,8 +36,15 @@
#include "cpr_stdlib.h"
#include <cpr_stdio.h>
#include <errno.h>
#if defined(WEBRTC_GONK)
#include <sys/syscall.h>
#include <unistd.h>
#include <linux/msg.h>
#include <linux/ipc.h>
#else
#include <sys/msg.h>
#include <sys/ipc.h>
#endif
#include "plat_api.h"
#include "CSFLog.h"
@ -45,6 +52,28 @@ static const char *logTag = "cpr_linux_ipc";
#define STATIC static
#if defined(WEBRTC_GONK)
int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg)
{
return syscall(__NR_msgsnd, msqid, msgp, msgsz, msgflg);
}
ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
{
return syscall(__NR_msgrcv, msqid, msgp, msgsz, msgtyp, msgflg);
}
int msgctl(int msqid, int cmd, struct msqid_ds *buf)
{
return syscall(__NR_msgctl, msqid, cmd, buf);
}
int msgget(key_t key, int msgflg)
{
return syscall(__NR_msgget, key, msgflg);
}
#endif
/* @def The Message Queue depth */
#define OS_MSGTQL 31

View File

@ -12,8 +12,13 @@
#include "cpr_errno.h"
#include "cpr_stdlib.h"
#include "cpr_string.h"
#if defined(WEBRTC_GONK)
#include <syslog.h>
#include <linux/fcntl.h>
#else
#include <sys/syslog.h>
#include <sys/fcntl.h>
#endif
#include <ctype.h>

View File

@ -137,6 +137,7 @@ LOCAL_INCLUDES += \
$(NULL)
ifneq ($(OS_TARGET),WINNT)
ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
ifdef JS_SHARED_LIBRARY
LIBS += $(MOZ_ZLIB_LIBS)
endif
@ -147,6 +148,7 @@ CPP_UNIT_TESTS = \
mediaconduit_unittests.cpp \
$(NULL)
endif
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/media/webrtc/webrtc-config.mk

View File

@ -874,6 +874,13 @@
'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
'conditions': [
['moz_widget_toolkit_gonk==1', {
'variables': {
'disable_sse2': 1,
},
}],
],
'conditions': [
['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
'windows_sdk_path%': '<(windows_sdk_default_path)',

View File

@ -21,7 +21,7 @@
{
'conditions': [
['OS=="android"', {
['OS=="android" or moz_widget_toolkit_gonk==1', {
'cflags!': [
'-mfpu=vfpv3-d16',
],

View File

@ -120,6 +120,12 @@
#'WEBRTC_SVNREVISION="<!(python <(webrtc_root)/build/version.py)"',
],
'conditions': [
['moz_widget_toolkit_gonk==1', {
'defines' : [
'WEBRTC_GONK',
],
}],
['build_with_chromium==1', {
'defines': [
# Changes settings for Chromium build.
@ -173,6 +179,13 @@
],
}],
['OS=="linux"', {
'conditions': [
['moz_have_clock_monotonic==1', {
'defines': [
'WEBRTC_CLOCK_TYPE_REALTIME',
],
}],
],
'defines': [
'WEBRTC_LINUX',
'WEBRTC_THREAD_RR',

View File

@ -15,10 +15,15 @@
#include "critical_section_wrapper.h"
#include "audio_mixer_manager_alsa_linux.h"
#include <sys/soundcard.h>
#include <sys/ioctl.h>
#if defined (WEBRTC_GONK)
#include <linux/soundcard.h>
#include <tinyalsa/asoundlib.h>
#else
#include <sys/soundcard.h>
#include <alsa/asoundlib.h>
#endif
namespace webrtc
{

View File

@ -16,7 +16,11 @@
#include "critical_section_wrapper.h"
#include "alsasymboltable_linux.h"
#if defined (WEBRTC_GONK)
#include <tinyalsa/asoundlib.h>
#else
#include <alsa/asoundlib.h>
#endif
namespace webrtc
{

View File

@ -29,6 +29,10 @@
#include <stdint.h>
#endif
#ifdef WEBRTC_GONK
#include <string.h>
#endif
#include "typedefs.h"
// Ok reference on memory alignment:

View File

@ -40,7 +40,7 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCores()
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", _numberOfCores);
#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
_numberOfCores = get_nprocs();
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Available number of cores:%d", _numberOfCores);

View File

@ -129,7 +129,7 @@ uint32_t ThreadWrapper::GetThreadId() {
int ThreadPosix::Construct()
{
int result = 0;
#if !defined(WEBRTC_ANDROID)
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
// Enable immediate cancellation if requested, see Shutdown()
result = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
if (result != 0)
@ -284,7 +284,7 @@ void ThreadPosix::SetNotAlive()
bool ThreadPosix::Shutdown()
{
#if !defined(WEBRTC_ANDROID)
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK)
if (_thread && (0 != pthread_cancel(_thread)))
{
return false;

View File

@ -8,5 +8,10 @@
'include_internal_video_capture': 1,
'include_internal_video_render': 0,
'include_pulse_audio': 0,
}
'conditions': [
['moz_widget_toolkit_gonk==1', {
'include_internal_audio_device': 0,
}],
],
},
}