git-svn-id: http://webrtc.googlecode.com/svn/trunk@11 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
9faef7dbd4
commit
da159d6be6
4
AUTHORS
Normal file
4
AUTHORS
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Names should be added to this file like so:
|
||||||
|
# Name or Organization <email address>
|
||||||
|
|
||||||
|
Google Inc.
|
60
Android.mk
Normal file
60
Android.mk
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
MY_WEBRTC_ROOT_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
# voice
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/common_audio/resampler/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/common_audio/signal_processing_library/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/common_audio/vad/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/NetEQ/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/CNG/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/G711/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/G722/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/PCM16B/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/iLBC/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/codecs/iSAC/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_coding/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_conference_mixer/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_device/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/aec/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/aecm/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/agc/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/ns/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/audio_processing/utility/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/media_file/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/rtp_rtcp/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/udp_transport/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/utility/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/system_wrappers/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/voice_engine/main/source/Android.mk
|
||||||
|
|
||||||
|
# video
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/common_video/jpeg/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/common_video/vplib/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_capture/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_coding/codecs/i420/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_coding/codecs/vp8/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_coding/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_processing/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_mixer/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/modules/video_render/main/source/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/video_engine/main/source/Android.mk
|
||||||
|
|
||||||
|
# third party
|
||||||
|
#include $(MY_WEBRTC_ROOT_PATH)/third_party/libvpx/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/libvpx.mk
|
||||||
|
|
||||||
|
# build .so
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/android-webrtc.mk
|
||||||
|
|
||||||
|
# build test app
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/voice_engine/main/test/Android/native_test/Android.mk
|
||||||
|
include $(MY_WEBRTC_ROOT_PATH)/video_engine/main/test/AutoTest/source/Android.mk
|
29
LICENSE
Normal file
29
LICENSE
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Copyright (c) 2011, Google Inc. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
* Neither the name of Google nor the names of its contributors may
|
||||||
|
be used to endorse or promote products derived from this software
|
||||||
|
without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
10
LICENSE_THIRD_PARTY
Normal file
10
LICENSE_THIRD_PARTY
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
This source tree contain third party source code which is governed by third
|
||||||
|
party licenses. This file contain references to files which are under other
|
||||||
|
licenses than the one provided in the LICENSE file in the root of the source
|
||||||
|
tree.
|
||||||
|
|
||||||
|
Files governed by third party licenses:
|
||||||
|
system_wrappers/source/condition_variable_windows.cc
|
||||||
|
system_wrappers/source/fix_interlocked_exchange_pointer_windows.h
|
||||||
|
system_wrappers/source/spreadsortlib/*
|
||||||
|
system_wrappers/source/thread_windows_set_name.h
|
28
PATENTS
Normal file
28
PATENTS
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Additional IP Rights Grant (Patents)
|
||||||
|
|
||||||
|
"This implementation" means the copyrightable works distributed by
|
||||||
|
Google as part of the WebRTC project.
|
||||||
|
|
||||||
|
Google hereby grants to you a perpetual, worldwide, non-exclusive,
|
||||||
|
no-charge, irrevocable (except as stated in this section) patent
|
||||||
|
license to make, have made, use, offer to sell, sell, import,
|
||||||
|
transfer, and otherwise run, modify and propagate the contents of this
|
||||||
|
implementation of the VoiceEngine Framework and the VideoEngine
|
||||||
|
Framework included in the WebRTC package, where such license applies
|
||||||
|
only to those patent claims, both currently owned by Google and
|
||||||
|
acquired in the future, licensable by Google that are necessarily
|
||||||
|
infringed by this implementation of the VoiceEngine Framework and the
|
||||||
|
VideoEngine Framework included in the WebRTC package. This grant does
|
||||||
|
not include claims that would be infringed only as a consequence of
|
||||||
|
further modification of this implementation. If you or your agent or
|
||||||
|
exclusive licensee institute or order or agree to the institution of
|
||||||
|
patent litigation against any entity (including a cross-claim or
|
||||||
|
counterclaim in a lawsuit) alleging that this implementation of the
|
||||||
|
VoiceEngine Framework and the VideoEngine Framework included in the
|
||||||
|
WebRTC package or any code incorporated within this implementation of
|
||||||
|
the media components included in the WebRTC package constitutes direct
|
||||||
|
or contributory patent infringement, or inducement of patent
|
||||||
|
infringement, then any patent rights granted to you under this License
|
||||||
|
for this implementation of the VoiceEngine Framework and the
|
||||||
|
VideoEngine Framework included in the WebRTC package shall terminate
|
||||||
|
as of the date such litigation is filed.
|
35
PRESUBMIT.py
Normal file
35
PRESUBMIT.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
webrtc_license_header = (
|
||||||
|
r'.*? Copyright \(c\) 2011 The WebRTC project authors'
|
||||||
|
r'.*?Use of this source code is governed by a BSD-style license\n'
|
||||||
|
r'.*? that can be found in the LICENSE file in the root of the source\n'
|
||||||
|
r'.*? tree. An additional intellectual property rights grant can be found\n'
|
||||||
|
r'.*? in the file PATENTS. All contributing project authors may\n'
|
||||||
|
r'.*? be found in the AUTHORS file in the root of the source tree\n'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def CheckChangeOnUpload(input_api, output_api):
|
||||||
|
results = []
|
||||||
|
results.extend(input_api.canned_checks.CheckLongLines(input_api, output_api,maxlen=95))
|
||||||
|
results.extend(input_api.canned_checks.CheckChangeHasNoTabs(input_api, output_api))
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
#results.extend(CheckChangeLintsClean(input_api, output_api))
|
||||||
|
#results.extend(input_api.canned_checks.CheckLicense(input_api, output_api, license_re=webrtc_license_header))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#def CheckChangeOnCommit (input_api, output_api):
|
||||||
|
# results = []
|
||||||
|
# sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
|
||||||
|
# results.extend(input_api.canned_checks.CheckOwners(input_api, output_api, source_file_filter=sources))
|
||||||
|
# return results
|
||||||
|
|
||||||
|
|
100
android-webrtc.mk
Normal file
100
android-webrtc.mk
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
MY_APM_WHOLE_STATIC_LIBRARIES := \
|
||||||
|
libwebrtc_spl \
|
||||||
|
libwebrtc_resampler \
|
||||||
|
libwebrtc_apm \
|
||||||
|
libwebrtc_apm_utility \
|
||||||
|
libwebrtc_vad \
|
||||||
|
libwebrtc_ns \
|
||||||
|
libwebrtc_agc \
|
||||||
|
libwebrtc_aec \
|
||||||
|
libwebrtc_aecm
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_ARM_MODE := arm
|
||||||
|
LOCAL_MODULE := libwebrtc_audio_preprocessing
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_LDFLAGS :=
|
||||||
|
|
||||||
|
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||||
|
$(MY_APM_WHOLE_STATIC_LIBRARIES) \
|
||||||
|
libwebrtc_system_wrappers \
|
||||||
|
|
||||||
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
|
libcutils \
|
||||||
|
libdl \
|
||||||
|
libstlport
|
||||||
|
|
||||||
|
LOCAL_ADDITIONAL_DEPENDENCIES :=
|
||||||
|
|
||||||
|
include external/stlport/libstlport.mk
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_ARM_MODE := arm
|
||||||
|
LOCAL_MODULE := libwebrtc
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_LDFLAGS :=
|
||||||
|
|
||||||
|
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||||
|
libwebrtc_system_wrappers \
|
||||||
|
libwebrtc_audio_device \
|
||||||
|
libwebrtc_pcm16b \
|
||||||
|
libwebrtc_cng \
|
||||||
|
libwebrtc_audio_coding \
|
||||||
|
libwebrtc_rtp_rtcp \
|
||||||
|
libwebrtc_media_file \
|
||||||
|
libwebrtc_udp_transport \
|
||||||
|
libwebrtc_utility \
|
||||||
|
libwebrtc_neteq \
|
||||||
|
libwebrtc_audio_conference_mixer \
|
||||||
|
libwebrtc_isac \
|
||||||
|
libwebrtc_ilbc \
|
||||||
|
libwebrtc_isacfix \
|
||||||
|
libwebrtc_g722 \
|
||||||
|
libwebrtc_g711 \
|
||||||
|
libwebrtc_vplib \
|
||||||
|
libwebrtc_video_render \
|
||||||
|
libwebrtc_video_capture \
|
||||||
|
libwebrtc_i420 \
|
||||||
|
libwebrtc_video_coding \
|
||||||
|
libwebrtc_video_processing \
|
||||||
|
libwebrtc_vp8 \
|
||||||
|
libwebrtc_video_mixer \
|
||||||
|
libwebrtc_voe_core \
|
||||||
|
libwebrtc_vie_core \
|
||||||
|
libwebrtc_vpx_enc \
|
||||||
|
libwebrtc_jpeg \
|
||||||
|
libvpx
|
||||||
|
|
||||||
|
#LOCAL_LDLIBS := -ljpeg
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES :=
|
||||||
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
|
libcutils \
|
||||||
|
libdl \
|
||||||
|
libstlport \
|
||||||
|
libjpeg \
|
||||||
|
libGLESv2 \
|
||||||
|
libOpenSLES \
|
||||||
|
libwebrtc_audio_preprocessing
|
||||||
|
|
||||||
|
LOCAL_ADDITIONAL_DEPENDENCIES :=
|
||||||
|
|
||||||
|
include external/stlport/libstlport.mk
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
9
codereview.settings
Normal file
9
codereview.settings
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# This file is used by gcl to get repository specific information.
|
||||||
|
CODE_REVIEW_SERVER: webrtc-codereview.appspot.com
|
||||||
|
CC_LIST:
|
||||||
|
VIEW_VC:
|
||||||
|
STATUS:
|
||||||
|
TRY_ON_UPLOAD: False
|
||||||
|
TRYSERVER_SVN_URL:
|
||||||
|
GITCL_PREUPLOAD:
|
||||||
|
GITCL_PREDCOMMIT:
|
76
common_settings.gypi
Normal file
76
common_settings.gypi
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
# This file contains common settings for building WebRTC components.
|
||||||
|
|
||||||
|
{
|
||||||
|
'variables': {
|
||||||
|
'build_with_chromium%': 0, # 1 to build webrtc with chromium
|
||||||
|
'inside_chromium_build%': 0,
|
||||||
|
|
||||||
|
# Selects fixed-point code where possible.
|
||||||
|
# TODO(ajm): we'd like to set this based on the target OS/architecture.
|
||||||
|
'prefer_fixed_point%': 0,
|
||||||
|
|
||||||
|
'conditions': [
|
||||||
|
['inside_chromium_build==1', {
|
||||||
|
'build_with_chromium': 1,
|
||||||
|
}],
|
||||||
|
['OS=="win"', {
|
||||||
|
# Path needed to build Direct Show base classes on Windows. The code is included in Windows SDK.
|
||||||
|
'direct_show_base_classes':'C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses/',
|
||||||
|
}],
|
||||||
|
], # conditions
|
||||||
|
},
|
||||||
|
'target_defaults': {
|
||||||
|
'include_dirs': [
|
||||||
|
'.', # For common_typs.h and typedefs.h
|
||||||
|
],
|
||||||
|
'conditions': [
|
||||||
|
['OS=="linux"', {
|
||||||
|
'defines': [
|
||||||
|
'WEBRTC_TARGET_PC',
|
||||||
|
'WEBRTC_LINUX',
|
||||||
|
'WEBRTC_THREAD_RR',
|
||||||
|
# INTEL_OPT is for iLBC floating point code optimized for Intel processors
|
||||||
|
# supporting SSE3. The compiler will be automatically switched to Intel
|
||||||
|
# compiler icc in the iLBC folder for iLBC floating point library build.
|
||||||
|
#'INTEL_OPT',
|
||||||
|
# Define WEBRTC_CLOCK_TYPE_REALTIME if the Linux system does not support CLOCK_MONOTONIC
|
||||||
|
#'WEBRTC_CLOCK_TYPE_REALTIME',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="mac"', {
|
||||||
|
# Setup for Intel
|
||||||
|
'defines': [
|
||||||
|
'WEBRTC_TARGET_MAC_INTEL',
|
||||||
|
'WEBRTC_MAC_INTEL',
|
||||||
|
'WEBRTC_MAC',
|
||||||
|
'WEBRTC_THREAD_RR',
|
||||||
|
'WEBRTC_CLOCK_TYPE_REALTIME',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="win"', {
|
||||||
|
'defines': [
|
||||||
|
'WEBRTC_TARGET_PC',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['build_with_chromium==1', {
|
||||||
|
'defines': [
|
||||||
|
'WEBRTC_VIDEO_EXTERNAL_CAPTURE_AND_RENDER',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
], # conditions
|
||||||
|
}, # target-defaults
|
||||||
|
}
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# tab-width:2
|
||||||
|
# indent-tabs-mode:nil
|
||||||
|
# End:
|
||||||
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|
595
common_types.h
Normal file
595
common_types.h
Normal file
@ -0,0 +1,595 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WEBRTC_COMMON_TYPES_H
|
||||||
|
#define WEBRTC_COMMON_TYPES_H
|
||||||
|
|
||||||
|
#include "typedefs.h"
|
||||||
|
|
||||||
|
#ifdef WEBRTC_EXPORT
|
||||||
|
#define WEBRTC_DLLEXPORT _declspec(dllexport)
|
||||||
|
#elif WEBRTC_DLL
|
||||||
|
#define WEBRTC_DLLEXPORT _declspec(dllimport)
|
||||||
|
#else
|
||||||
|
#define WEBRTC_DLLEXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
class InStream
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual int Read(void *buf,int len) = 0;
|
||||||
|
virtual int Rewind() {return -1;}
|
||||||
|
virtual ~InStream() {}
|
||||||
|
protected:
|
||||||
|
InStream() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class OutStream
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool Write(const void *buf,int len) = 0;
|
||||||
|
virtual int Rewind() {return -1;}
|
||||||
|
virtual ~OutStream() {}
|
||||||
|
protected:
|
||||||
|
OutStream() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TraceModule
|
||||||
|
{
|
||||||
|
// not a module, triggered from the engine code
|
||||||
|
kTraceVoice = 0x0001,
|
||||||
|
// not a module, triggered from the engine code
|
||||||
|
kTraceVideo = 0x0002,
|
||||||
|
// not a module, triggered from the utility code
|
||||||
|
kTraceUtility = 0x0003,
|
||||||
|
kTraceRtpRtcp = 0x0004,
|
||||||
|
kTraceTransport = 0x0005,
|
||||||
|
kTraceSrtp = 0x0006,
|
||||||
|
kTraceAudioCoding = 0x0007,
|
||||||
|
kTraceAudioMixerServer = 0x0008,
|
||||||
|
kTraceAudioMixerClient = 0x0009,
|
||||||
|
kTraceFile = 0x000a,
|
||||||
|
kTraceVqe = 0x000b,
|
||||||
|
kTraceVideoCoding = 0x0010,
|
||||||
|
kTraceVideoMixer = 0x0011,
|
||||||
|
kTraceAudioDevice = 0x0012,
|
||||||
|
kTraceVideoRenderer = 0x0014,
|
||||||
|
kTraceVideoCapture = 0x0015,
|
||||||
|
kTraceVideoPreocessing = 0x0016
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TraceLevel
|
||||||
|
{
|
||||||
|
kTraceNone = 0x0000, // no trace
|
||||||
|
kTraceStateInfo = 0x0001,
|
||||||
|
kTraceWarning = 0x0002,
|
||||||
|
kTraceError = 0x0004,
|
||||||
|
kTraceCritical = 0x0008,
|
||||||
|
kTraceApiCall = 0x0010,
|
||||||
|
kTraceDefault = 0x00ff,
|
||||||
|
|
||||||
|
kTraceModuleCall = 0x0020,
|
||||||
|
kTraceMemory = 0x0100, // memory info
|
||||||
|
kTraceTimer = 0x0200, // timing info
|
||||||
|
kTraceStream = 0x0400, // "continuous" stream of data
|
||||||
|
|
||||||
|
// used for debug purposes
|
||||||
|
kTraceDebug = 0x0800, // debug
|
||||||
|
kTraceInfo = 0x1000, // debug info
|
||||||
|
|
||||||
|
kTraceAll = 0xffff
|
||||||
|
};
|
||||||
|
|
||||||
|
// External Trace API
|
||||||
|
class TraceCallback
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void Print(const TraceLevel level,
|
||||||
|
const char *traceString,
|
||||||
|
const int length) = 0;
|
||||||
|
protected:
|
||||||
|
virtual ~TraceCallback() {}
|
||||||
|
TraceCallback() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum FileFormats
|
||||||
|
{
|
||||||
|
kFileFormatWavFile = 1,
|
||||||
|
kFileFormatCompressedFile = 2,
|
||||||
|
kFileFormatAviFile = 3,
|
||||||
|
kFileFormatPreencodedFile = 4,
|
||||||
|
kFileFormatPcm16kHzFile = 7,
|
||||||
|
kFileFormatPcm8kHzFile = 8,
|
||||||
|
kFileFormatPcm32kHzFile = 9
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum ProcessingTypes
|
||||||
|
{
|
||||||
|
kPlaybackPerChannel = 0,
|
||||||
|
kPlaybackAllChannelsMixed,
|
||||||
|
kRecordingPerChannel,
|
||||||
|
kRecordingAllChannelsMixed
|
||||||
|
};
|
||||||
|
|
||||||
|
// Encryption enums
|
||||||
|
enum CipherTypes
|
||||||
|
{
|
||||||
|
kCipherNull = 0,
|
||||||
|
kCipherAes128CounterMode = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AuthenticationTypes
|
||||||
|
{
|
||||||
|
kAuthNull = 0,
|
||||||
|
kAuthHmacSha1 = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
enum SecurityLevels
|
||||||
|
{
|
||||||
|
kNoProtection = 0,
|
||||||
|
kEncryption = 1,
|
||||||
|
kAuthentication = 2,
|
||||||
|
kEncryptionAndAuthentication = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
class Encryption
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void encrypt(
|
||||||
|
int channel_no,
|
||||||
|
unsigned char* in_data,
|
||||||
|
unsigned char* out_data,
|
||||||
|
int bytes_in,
|
||||||
|
int* bytes_out) = 0;
|
||||||
|
|
||||||
|
virtual void decrypt(
|
||||||
|
int channel_no,
|
||||||
|
unsigned char* in_data,
|
||||||
|
unsigned char* out_data,
|
||||||
|
int bytes_in,
|
||||||
|
int* bytes_out) = 0;
|
||||||
|
|
||||||
|
virtual void encrypt_rtcp(
|
||||||
|
int channel_no,
|
||||||
|
unsigned char* in_data,
|
||||||
|
unsigned char* out_data,
|
||||||
|
int bytes_in,
|
||||||
|
int* bytes_out) = 0;
|
||||||
|
|
||||||
|
virtual void decrypt_rtcp(
|
||||||
|
int channel_no,
|
||||||
|
unsigned char* in_data,
|
||||||
|
unsigned char* out_data,
|
||||||
|
int bytes_in,
|
||||||
|
int* bytes_out) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~Encryption() {}
|
||||||
|
Encryption() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// External transport callback interface
|
||||||
|
class Transport
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual int SendPacket(int channel, const void *data, int len) = 0;
|
||||||
|
virtual int SendRTCPPacket(int channel, const void *data, int len) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual ~Transport() {}
|
||||||
|
Transport() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ==================================================================
|
||||||
|
// Voice specific types
|
||||||
|
// ==================================================================
|
||||||
|
|
||||||
|
// Each codec supported can be described by this structure.
|
||||||
|
struct CodecInst
|
||||||
|
{
|
||||||
|
int pltype;
|
||||||
|
char plname[32];
|
||||||
|
int plfreq;
|
||||||
|
int pacsize;
|
||||||
|
int channels;
|
||||||
|
int rate;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum FrameType
|
||||||
|
{
|
||||||
|
kFrameEmpty = 0,
|
||||||
|
kAudioFrameSpeech = 1,
|
||||||
|
kAudioFrameCN = 2,
|
||||||
|
kVideoFrameKey = 3, // independent frame
|
||||||
|
kVideoFrameDelta = 4, // depends on the previus frame
|
||||||
|
kVideoFrameGolden = 5, // depends on a old known previus frame
|
||||||
|
kVideoFrameAltRef = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
// RTP
|
||||||
|
enum {kRtpCsrcSize = 15}; // RFC 3550 page 13
|
||||||
|
|
||||||
|
enum RTPDirections
|
||||||
|
{
|
||||||
|
kRtpIncoming = 0,
|
||||||
|
kRtpOutgoing
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PayloadFrequencies
|
||||||
|
{
|
||||||
|
kFreq8000Hz = 8000,
|
||||||
|
kFreq16000Hz = 16000,
|
||||||
|
kFreq32000Hz = 32000
|
||||||
|
};
|
||||||
|
|
||||||
|
enum VadModes // degree of bandwidth reduction
|
||||||
|
{
|
||||||
|
kVadConventional = 0, // lowest reduction
|
||||||
|
kVadAggressiveLow,
|
||||||
|
kVadAggressiveMid,
|
||||||
|
kVadAggressiveHigh // highest reduction
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NetworkStatistics // NETEQ statistics
|
||||||
|
{
|
||||||
|
// current jitter buffer size in ms
|
||||||
|
WebRtc_UWord16 currentBufferSize;
|
||||||
|
// preferred (optimal) buffer size in ms
|
||||||
|
WebRtc_UWord16 preferredBufferSize;
|
||||||
|
// loss rate (network + late) in percent (in Q14)
|
||||||
|
WebRtc_UWord16 currentPacketLossRate;
|
||||||
|
// late loss rate in percent (in Q14)
|
||||||
|
WebRtc_UWord16 currentDiscardRate;
|
||||||
|
// fraction (of original stream) of synthesized speech inserted through
|
||||||
|
// expansion (in Q14)
|
||||||
|
WebRtc_UWord16 currentExpandRate;
|
||||||
|
// fraction of synthesized speech inserted through pre-emptive expansion
|
||||||
|
// (in Q14)
|
||||||
|
WebRtc_UWord16 currentPreemptiveRate;
|
||||||
|
// fraction of data removed through acceleration (in Q14)
|
||||||
|
WebRtc_UWord16 currentAccelerateRate;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct JitterStatistics
|
||||||
|
{
|
||||||
|
// smallest Jitter Buffer size during call in ms
|
||||||
|
WebRtc_UWord32 jbMinSize;
|
||||||
|
// largest Jitter Buffer size during call in ms
|
||||||
|
WebRtc_UWord32 jbMaxSize;
|
||||||
|
// the average JB size, measured over time - ms
|
||||||
|
WebRtc_UWord32 jbAvgSize;
|
||||||
|
// number of times the Jitter Buffer changed (using Accelerate or
|
||||||
|
// Pre-emptive Expand)
|
||||||
|
WebRtc_UWord32 jbChangeCount;
|
||||||
|
// amount (in ms) of audio data received late
|
||||||
|
WebRtc_UWord32 lateLossMs;
|
||||||
|
// milliseconds removed to reduce jitter buffer size
|
||||||
|
WebRtc_UWord32 accelerateMs;
|
||||||
|
// milliseconds discarded through buffer flushing
|
||||||
|
WebRtc_UWord32 flushedMs;
|
||||||
|
// milliseconds of generated silence
|
||||||
|
WebRtc_UWord32 generatedSilentMs;
|
||||||
|
// milliseconds of synthetic audio data (non-background noise)
|
||||||
|
WebRtc_UWord32 interpolatedVoiceMs;
|
||||||
|
// milliseconds of synthetic audio data (background noise level)
|
||||||
|
WebRtc_UWord32 interpolatedSilentMs;
|
||||||
|
// count of tiny expansions in output audio
|
||||||
|
WebRtc_UWord32 countExpandMoreThan120ms;
|
||||||
|
// count of small expansions in output audio
|
||||||
|
WebRtc_UWord32 countExpandMoreThan250ms;
|
||||||
|
// count of medium expansions in output audio
|
||||||
|
WebRtc_UWord32 countExpandMoreThan500ms;
|
||||||
|
// count of long expansions in output audio
|
||||||
|
WebRtc_UWord32 countExpandMoreThan2000ms;
|
||||||
|
// duration of longest audio drop-out
|
||||||
|
WebRtc_UWord32 longestExpandDurationMs;
|
||||||
|
// count of times we got small network outage (inter-arrival time in
|
||||||
|
// [500, 1000) ms)
|
||||||
|
WebRtc_UWord32 countIAT500ms;
|
||||||
|
// count of times we got medium network outage (inter-arrival time in
|
||||||
|
// [1000, 2000) ms)
|
||||||
|
WebRtc_UWord32 countIAT1000ms;
|
||||||
|
// count of times we got large network outage (inter-arrival time >=
|
||||||
|
// 2000 ms)
|
||||||
|
WebRtc_UWord32 countIAT2000ms;
|
||||||
|
// longest packet inter-arrival time in ms
|
||||||
|
WebRtc_UWord32 longestIATms;
|
||||||
|
// min time incoming Packet "waited" to be played
|
||||||
|
WebRtc_UWord32 minPacketDelayMs;
|
||||||
|
// max time incoming Packet "waited" to be played
|
||||||
|
WebRtc_UWord32 maxPacketDelayMs;
|
||||||
|
// avg time incoming Packet "waited" to be played
|
||||||
|
WebRtc_UWord32 avgPacketDelayMs;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int min; // minumum
|
||||||
|
int max; // maximum
|
||||||
|
int average; // average
|
||||||
|
} StatVal;
|
||||||
|
|
||||||
|
typedef struct // All levels are reported in dBm0
|
||||||
|
{
|
||||||
|
StatVal speech_rx; // long-term speech levels on receiving side
|
||||||
|
StatVal speech_tx; // long-term speech levels on transmitting side
|
||||||
|
StatVal noise_rx; // long-term noise/silence levels on receiving side
|
||||||
|
StatVal noise_tx; // long-term noise/silence levels on transmitting side
|
||||||
|
} LevelStatistics;
|
||||||
|
|
||||||
|
typedef struct // All levels are reported in dB
|
||||||
|
{
|
||||||
|
StatVal erl; // Echo Return Loss
|
||||||
|
StatVal erle; // Echo Return Loss Enhancement
|
||||||
|
StatVal rerl; // RERL = ERL + ERLE
|
||||||
|
// Echo suppression inside EC at the point just before its NLP
|
||||||
|
StatVal a_nlp;
|
||||||
|
} EchoStatistics;
|
||||||
|
|
||||||
|
enum TelephoneEventDetectionMethods
|
||||||
|
{
|
||||||
|
kInBand = 0,
|
||||||
|
kOutOfBand = 1,
|
||||||
|
kInAndOutOfBand = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NsModes // type of Noise Suppression
|
||||||
|
{
|
||||||
|
kNsUnchanged = 0, // previously set mode
|
||||||
|
kNsDefault, // platform default
|
||||||
|
kNsConference, // conferencing default
|
||||||
|
kNsLowSuppression, // lowest suppression
|
||||||
|
kNsModerateSuppression,
|
||||||
|
kNsHighSuppression,
|
||||||
|
kNsVeryHighSuppression, // highest suppression
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AgcModes // type of Automatic Gain Control
|
||||||
|
{
|
||||||
|
kAgcUnchanged = 0, // previously set mode
|
||||||
|
kAgcDefault, // platform default
|
||||||
|
// adaptive mode for use when analog volume control exists (e.g. for
|
||||||
|
// PC softphone)
|
||||||
|
kAgcAdaptiveAnalog,
|
||||||
|
// scaling takes place in the digital domain (e.g. for conference servers
|
||||||
|
// and embedded devices)
|
||||||
|
kAgcAdaptiveDigital,
|
||||||
|
// can be used on embedded devices where the the capture signal is level
|
||||||
|
// is predictable
|
||||||
|
kAgcFixedDigital
|
||||||
|
};
|
||||||
|
|
||||||
|
// EC modes
|
||||||
|
enum EcModes // type of Echo Control
|
||||||
|
{
|
||||||
|
kEcUnchanged = 0, // previously set mode
|
||||||
|
kEcDefault, // platform default
|
||||||
|
kEcConference, // conferencing default (aggressive AEC)
|
||||||
|
kEcAec, // Acoustic Echo Cancellation
|
||||||
|
kEcAecm, // AEC mobile
|
||||||
|
};
|
||||||
|
|
||||||
|
// AECM modes
|
||||||
|
enum AecmModes // mode of AECM
|
||||||
|
{
|
||||||
|
kAecmQuietEarpieceOrHeadset = 0,
|
||||||
|
// Quiet earpiece or headset use
|
||||||
|
kAecmEarpiece, // most earpiece use
|
||||||
|
kAecmLoudEarpiece, // Loud earpiece or quiet speakerphone use
|
||||||
|
kAecmSpeakerphone, // most speakerphone use (default)
|
||||||
|
kAecmLoudSpeakerphone // Loud speakerphone
|
||||||
|
};
|
||||||
|
|
||||||
|
// AGC configuration
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned short targetLeveldBOv;
|
||||||
|
unsigned short digitalCompressionGaindB;
|
||||||
|
bool limiterEnable;
|
||||||
|
} AgcConfig; // AGC configuration parameters
|
||||||
|
|
||||||
|
enum StereoChannel
|
||||||
|
{
|
||||||
|
kStereoLeft = 0,
|
||||||
|
kStereoRight,
|
||||||
|
kStereoBoth
|
||||||
|
};
|
||||||
|
|
||||||
|
// Audio device layers
|
||||||
|
enum AudioLayers
|
||||||
|
{
|
||||||
|
kAudioPlatformDefault = 0,
|
||||||
|
kAudioWindowsWave = 1,
|
||||||
|
kAudioWindowsCore = 2,
|
||||||
|
kAudioLinuxAlsa = 3,
|
||||||
|
kAudioLinuxPulse = 4
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NetEqModes // NetEQ playout configurations
|
||||||
|
{
|
||||||
|
// Optimized trade-off between low delay and jitter robustness for two-way
|
||||||
|
// communication.
|
||||||
|
kNetEqDefault = 0,
|
||||||
|
// Improved jitter robustness at the cost of increased delay. Can be
|
||||||
|
// used in one-way communication.
|
||||||
|
kNetEqStreaming = 1,
|
||||||
|
// Optimzed for decodability of fax signals rather than for perceived audio
|
||||||
|
// quality.
|
||||||
|
kNetEqFax = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NetEqBgnModes // NetEQ Background Noise (BGN) configurations
|
||||||
|
{
|
||||||
|
// BGN is always on and will be generated when the incoming RTP stream
|
||||||
|
// stops (default).
|
||||||
|
kBgnOn = 0,
|
||||||
|
// The BGN is faded to zero (complete silence) after a few seconds.
|
||||||
|
kBgnFade = 1,
|
||||||
|
// BGN is not used at all. Silence is produced after speech extrapolation
|
||||||
|
// has faded.
|
||||||
|
kBgnOff = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum OnHoldModes // On Hold direction
|
||||||
|
{
|
||||||
|
kHoldSendAndPlay = 0, // Put both sending and playing in on-hold state.
|
||||||
|
kHoldSendOnly, // Put only sending in on-hold state.
|
||||||
|
kHoldPlayOnly // Put only playing in on-hold state.
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AmrMode
|
||||||
|
{
|
||||||
|
kRfc3267BwEfficient = 0,
|
||||||
|
kRfc3267OctetAligned = 1,
|
||||||
|
kRfc3267FileStorage = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
// ==================================================================
|
||||||
|
// Video specific types
|
||||||
|
// ==================================================================
|
||||||
|
|
||||||
|
// Raw video types
|
||||||
|
enum RawVideoType
|
||||||
|
{
|
||||||
|
kVideoI420 = 0,
|
||||||
|
kVideoYV12 = 1,
|
||||||
|
kVideoYUY2 = 2,
|
||||||
|
kVideoUYVY = 3,
|
||||||
|
kVideoIYUV = 4,
|
||||||
|
kVideoARGB = 5,
|
||||||
|
kVideoRGB24 = 6,
|
||||||
|
kVideoRGB565 = 7,
|
||||||
|
kVideoARGB4444 = 8,
|
||||||
|
kVideoARGB1555 = 9,
|
||||||
|
kVideoMJPEG = 10,
|
||||||
|
kVideoNV12 = 11,
|
||||||
|
kVideoNV21 = 12,
|
||||||
|
kVideoUnknown = 99
|
||||||
|
};
|
||||||
|
|
||||||
|
// Video codec
|
||||||
|
enum { kConfigParameterSize = 128};
|
||||||
|
enum { kPayloadNameSize = 32};
|
||||||
|
|
||||||
|
// H.263 specific
|
||||||
|
struct VideoCodecH263
|
||||||
|
{
|
||||||
|
char quality;
|
||||||
|
};
|
||||||
|
|
||||||
|
// H.264 specific
|
||||||
|
enum H264Packetization
|
||||||
|
{
|
||||||
|
kH264SingleMode = 0,
|
||||||
|
kH264NonInterleavedMode = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
enum VideoCodecComplexity
|
||||||
|
{
|
||||||
|
kComplexityNormal = 0,
|
||||||
|
kComplexityHigh = 1,
|
||||||
|
kComplexityHigher = 2,
|
||||||
|
kComplexityMax = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
enum VideoCodecProfile
|
||||||
|
{
|
||||||
|
kProfileBase = 0x00,
|
||||||
|
kProfileMain = 0x01
|
||||||
|
};
|
||||||
|
|
||||||
|
struct VideoCodecH264
|
||||||
|
{
|
||||||
|
H264Packetization packetization;
|
||||||
|
VideoCodecComplexity complexity;
|
||||||
|
VideoCodecProfile profile;
|
||||||
|
char level;
|
||||||
|
char quality;
|
||||||
|
|
||||||
|
bool useFMO;
|
||||||
|
|
||||||
|
unsigned char configParameters[kConfigParameterSize];
|
||||||
|
unsigned char configParametersSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
// VP8 specific
|
||||||
|
struct VideoCodecVP8
|
||||||
|
{
|
||||||
|
bool pictureLossIndicationOn;
|
||||||
|
bool feedbackModeOn;
|
||||||
|
VideoCodecComplexity complexity;
|
||||||
|
};
|
||||||
|
|
||||||
|
// MPEG-4 specific
|
||||||
|
struct VideoCodecMPEG4
|
||||||
|
{
|
||||||
|
unsigned char configParameters[kConfigParameterSize];
|
||||||
|
unsigned char configParametersSize;
|
||||||
|
char level;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Unknown specific
|
||||||
|
struct VideoCodecGeneric
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// Video codec types
|
||||||
|
enum VideoCodecType
|
||||||
|
{
|
||||||
|
kVideoCodecH263,
|
||||||
|
kVideoCodecH264,
|
||||||
|
kVideoCodecVP8,
|
||||||
|
kVideoCodecMPEG4,
|
||||||
|
kVideoCodecI420,
|
||||||
|
kVideoCodecRED,
|
||||||
|
kVideoCodecULPFEC,
|
||||||
|
kVideoCodecUnknown
|
||||||
|
};
|
||||||
|
|
||||||
|
union VideoCodecUnion
|
||||||
|
{
|
||||||
|
VideoCodecH263 H263;
|
||||||
|
VideoCodecH264 H264;
|
||||||
|
VideoCodecVP8 VP8;
|
||||||
|
VideoCodecMPEG4 MPEG4;
|
||||||
|
VideoCodecGeneric Generic;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Common video codec properties
|
||||||
|
struct VideoCodec
|
||||||
|
{
|
||||||
|
VideoCodecType codecType;
|
||||||
|
char plName[kPayloadNameSize];
|
||||||
|
unsigned char plType;
|
||||||
|
|
||||||
|
unsigned short width;
|
||||||
|
unsigned short height;
|
||||||
|
|
||||||
|
unsigned int startBitrate;
|
||||||
|
unsigned int maxBitrate;
|
||||||
|
unsigned int minBitrate;
|
||||||
|
unsigned char maxFramerate;
|
||||||
|
|
||||||
|
VideoCodecUnion codecSpecific;
|
||||||
|
|
||||||
|
unsigned int qpMax;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // WEBRTC_COMMON_TYPES_H
|
131
engine_configurations.h
Normal file
131
engine_configurations.h
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WEBRTC_ENGINE_CONFIGURATIONS_H_
|
||||||
|
#define WEBRTC_ENGINE_CONFIGURATIONS_H_
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Voice and Video
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// #define WEBRTC_EXTERNAL_TRANSPORT
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// [Voice] Codec settings
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define WEBRTC_CODEC_ILBC
|
||||||
|
#define WEBRTC_CODEC_ISAC // floating-point iSAC implementation (default)
|
||||||
|
// #define WEBRTC_CODEC_ISACFX // fix-point iSAC implementation
|
||||||
|
#define WEBRTC_CODEC_G722
|
||||||
|
#define WEBRTC_CODEC_PCM16
|
||||||
|
#define WEBRTC_CODEC_RED
|
||||||
|
#define WEBRTC_CODEC_AVT
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// [Video] Codec settings
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define VIDEOCODEC_I420
|
||||||
|
#define VIDEOCODEC_VP8
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VoiceEngine
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Settings for VoiceEngine
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define WEBRTC_VOICE_ENGINE_AGC // Near-end AGC
|
||||||
|
#define WEBRTC_VOICE_ENGINE_ECHO // Near-end AEC
|
||||||
|
#define WEBRTC_VOICE_ENGINE_NR // Near-end NS
|
||||||
|
#define WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
||||||
|
#define WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// VoiceEngine sub-APIs
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define WEBRTC_VOICE_ENGINE_AUDIO_PROCESSING_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_CALL_REPORT_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_CODEC_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_DTMF_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_ENCRYPTION_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_FILE_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_HARDWARE_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_NETWORK_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_RTP_RTCP_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
|
||||||
|
#define WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VideoEngine
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Settings for special VideoEngine configurations
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// VideoEngine sub-API:s
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_CAPTURE_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_CODEC_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_ENCRYPTION_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_FILE_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_IMAGE_PROCESS_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_NETWORK_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_RENDER_API
|
||||||
|
#define WEBRTC_VIDEO_ENGINE_RTP_RTCP_API
|
||||||
|
// #define WEBRTC_VIDEO_ENGINE_EXTERNAL_CODEC_API
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Platform specific configurations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// VideoEngine Windows
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
// #define DIRECTDRAW_RENDERING
|
||||||
|
#define DIRECT3D9_RENDERING // Requires DirectX 9.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// VideoEngine MAC
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
||||||
|
// #define CARBON_RENDERING
|
||||||
|
#define COCOA_RENDERING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// VideoEngine Mobile iPhone
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(MAC_IPHONE)
|
||||||
|
#define EAGL_RENDERING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Deprecated
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// #define WEBRTC_CODEC_G729
|
||||||
|
// #define WEBRTC_DTMF_DETECTION
|
||||||
|
// #define WEBRTC_SRTP
|
||||||
|
// #define WEBRTC_SRTP_ALLOW_ROC_ITERATION
|
||||||
|
|
||||||
|
#endif // WEBRTC_ENGINE_CONFIGURATIONS_H_
|
129
gyp_gips
Normal file
129
gyp_gips
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
# This script is wrapper for Chromium that adds some support for how GYP
|
||||||
|
# is invoked by Chromium beyond what can be done in the gclient hooks.
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
import sys
|
||||||
|
|
||||||
|
script_dir = os.path.dirname(__file__)
|
||||||
|
chrome_src = '../..';#os.path.normpath(os.path.join(script_dir, os.pardir))
|
||||||
|
|
||||||
|
sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
|
||||||
|
import gyp
|
||||||
|
|
||||||
|
def apply_gyp_environment(file_path=None):
|
||||||
|
"""
|
||||||
|
Reads in a *.gyp_env file and applies the valid keys to os.environ.
|
||||||
|
"""
|
||||||
|
if not file_path or not os.path.exists(file_path):
|
||||||
|
return
|
||||||
|
file_contents = open(file_path).read()
|
||||||
|
try:
|
||||||
|
file_data = eval(file_contents, {'__builtins__': None}, None)
|
||||||
|
except SyntaxError, e:
|
||||||
|
e.filename = os.path.abspath(file_path)
|
||||||
|
raise
|
||||||
|
supported_vars = ( 'CHROMIUM_GYP_FILE',
|
||||||
|
'CHROMIUM_GYP_SYNTAX_CHECK',
|
||||||
|
'GYP_DEFINES',
|
||||||
|
'GYP_GENERATOR_FLAGS',
|
||||||
|
'GYP_GENERATOR_OUTPUT', )
|
||||||
|
for var in supported_vars:
|
||||||
|
val = file_data.get(var)
|
||||||
|
if val:
|
||||||
|
if var in os.environ:
|
||||||
|
print 'INFO: Environment value for "%s" overrides value in %s.' % (
|
||||||
|
var, os.path.abspath(file_path)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
os.environ[var] = val
|
||||||
|
|
||||||
|
def additional_include_files(args=[]):
|
||||||
|
"""
|
||||||
|
Returns a list of additional (.gypi) files to include, without
|
||||||
|
duplicating ones that are already specified on the command line.
|
||||||
|
"""
|
||||||
|
# Determine the include files specified on the command line.
|
||||||
|
# This doesn't cover all the different option formats you can use,
|
||||||
|
# but it's mainly intended to avoid duplicating flags on the automatic
|
||||||
|
# makefile regeneration which only uses this format.
|
||||||
|
specified_includes = set()
|
||||||
|
for arg in args:
|
||||||
|
if arg.startswith('-I') and len(arg) > 2:
|
||||||
|
specified_includes.add(os.path.realpath(arg[2:]))
|
||||||
|
|
||||||
|
result = []
|
||||||
|
def AddInclude(path):
|
||||||
|
if os.path.realpath(path) not in specified_includes:
|
||||||
|
result.append(path)
|
||||||
|
|
||||||
|
# Always include common.gypi & features_override.gypi
|
||||||
|
AddInclude(os.path.join(script_dir, '../../build/common.gypi'))
|
||||||
|
AddInclude(os.path.join(script_dir, '../../build/features_override.gypi'))
|
||||||
|
|
||||||
|
# Optionally add supplemental .gypi files if present.
|
||||||
|
supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi'))
|
||||||
|
for supplement in supplements:
|
||||||
|
AddInclude(supplement)
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
args = sys.argv[1:]
|
||||||
|
|
||||||
|
if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ:
|
||||||
|
# Update the environment based on chromium.gyp_env
|
||||||
|
gyp_env_path = os.path.join(os.path.dirname(chrome_src), 'chromium.gyp_env')
|
||||||
|
apply_gyp_environment(gyp_env_path)
|
||||||
|
|
||||||
|
# This could give false positives since it doesn't actually do real option
|
||||||
|
# parsing. Oh well.
|
||||||
|
gyp_file_specified = False
|
||||||
|
for arg in args:
|
||||||
|
if arg.endswith('.gyp'):
|
||||||
|
gyp_file_specified = True
|
||||||
|
break
|
||||||
|
|
||||||
|
# If we didn't get a file, check an env var, and then fall back to
|
||||||
|
# assuming 'all.gyp' from the same directory as the script.
|
||||||
|
if not gyp_file_specified:
|
||||||
|
gyp_file = os.environ.get('CHROMIUM_GYP_FILE')
|
||||||
|
if gyp_file:
|
||||||
|
# Note that CHROMIUM_GYP_FILE values can't have backslashes as
|
||||||
|
# path separators even on Windows due to the use of shlex.split().
|
||||||
|
args.extend(shlex.split(gyp_file))
|
||||||
|
else:
|
||||||
|
args.append(os.path.join(script_dir, 'video_engine.gyp'))
|
||||||
|
|
||||||
|
args.extend(['-I' + i for i in additional_include_files(args)])
|
||||||
|
|
||||||
|
# There shouldn't be a circular dependency relationship between .gyp files,
|
||||||
|
# but in Chromium's .gyp files, on non-Mac platforms, circular relationships
|
||||||
|
# currently exist. The check for circular dependencies is currently
|
||||||
|
# bypassed on other platforms, but is left enabled on the Mac, where a
|
||||||
|
# violation of the rule causes Xcode to misbehave badly.
|
||||||
|
# TODO(mark): Find and kill remaining circular dependencies, and remove this
|
||||||
|
# option. http://crbug.com/35878.
|
||||||
|
# TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the
|
||||||
|
# list.
|
||||||
|
if sys.platform not in ('darwin',):
|
||||||
|
args.append('--no-circular-check')
|
||||||
|
|
||||||
|
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
|
||||||
|
# to enfore syntax checking.
|
||||||
|
syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
|
||||||
|
if syntax_check and int(syntax_check):
|
||||||
|
args.append('--check')
|
||||||
|
|
||||||
|
print 'Updating projects from gyp files...'
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
# Off we go...
|
||||||
|
sys.exit(gyp.main(args))
|
132
libvpx.mk
Normal file
132
libvpx.mk
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
MY_LIBVPX_DEC_SRC = \
|
||||||
|
vpx/src/vpx_codec.c \
|
||||||
|
vpx/src/vpx_decoder.c \
|
||||||
|
vpx/src/vpx_image.c \
|
||||||
|
vpx_mem/vpx_mem.c \
|
||||||
|
vpx_scale/generic/vpxscale.c \
|
||||||
|
vpx_scale/generic/yv12config.c \
|
||||||
|
vpx_scale/generic/yv12extend.c \
|
||||||
|
vpx_scale/generic/gen_scalers.c \
|
||||||
|
vpx_scale/generic/scalesystemdependant.c \
|
||||||
|
vp8/common/alloccommon.c \
|
||||||
|
vp8/common/blockd.c \
|
||||||
|
vp8/common/debugmodes.c \
|
||||||
|
vp8/common/entropy.c \
|
||||||
|
vp8/common/entropymode.c \
|
||||||
|
vp8/common/entropymv.c \
|
||||||
|
vp8/common/extend.c \
|
||||||
|
vp8/common/filter.c \
|
||||||
|
vp8/common/findnearmv.c \
|
||||||
|
vp8/common/generic/systemdependent.c \
|
||||||
|
vp8/common/idctllm.c \
|
||||||
|
vp8/common/invtrans.c \
|
||||||
|
vp8/common/loopfilter.c \
|
||||||
|
vp8/common/loopfilter_filters.c \
|
||||||
|
vp8/common/mbpitch.c \
|
||||||
|
vp8/common/modecont.c \
|
||||||
|
vp8/common/modecontext.c \
|
||||||
|
vp8/common/quant_common.c \
|
||||||
|
vp8/common/recon.c \
|
||||||
|
vp8/common/reconinter.c \
|
||||||
|
vp8/common/reconintra.c \
|
||||||
|
vp8/common/reconintra4x4.c \
|
||||||
|
vp8/common/setupintrarecon.c \
|
||||||
|
vp8/common/swapyv12buffer.c \
|
||||||
|
vp8/common/textblit.c \
|
||||||
|
vp8/common/treecoder.c \
|
||||||
|
vp8/vp8_cx_iface.c \
|
||||||
|
vp8/vp8_dx_iface.c \
|
||||||
|
vp8/decoder/generic/dsystemdependent.c \
|
||||||
|
vp8/decoder/dboolhuff.c \
|
||||||
|
vp8/decoder/decodemv.c \
|
||||||
|
vp8/decoder/decodframe.c \
|
||||||
|
vp8/decoder/dequantize.c \
|
||||||
|
vp8/decoder/detokenize.c \
|
||||||
|
vp8/decoder/onyxd_if.c \
|
||||||
|
vp8/decoder/reconintra_mt.c \
|
||||||
|
vp8/decoder/threading.c \
|
||||||
|
vpx_config.c \
|
||||||
|
vp8/decoder/idct_blk.c
|
||||||
|
|
||||||
|
MY_LIBVPX_ENC_PATH = ../libvpx
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES = \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vpx/src/vpx_encoder.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/bitstream.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/boolhuff.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/dct.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/encodeframe.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/encodeintra.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/encodemb.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/encodemv.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/ethreading.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/firstpass.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/arm/arm_csystemdependent.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/mcomp.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/modecosts.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/pickinter.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/picklpf.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/psnr.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/quantize.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/ratectrl.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/rdopt.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/sad_c.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/segmentation.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/tokenize.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/treewriter.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/onyx_if.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/temporal_filter.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/arm/variance_arm.c \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/arm/variance_arm.h \
|
||||||
|
$(MY_LIBVPX_ENC_PATH)/vp8/encoder/variance_c.c
|
||||||
|
|
||||||
|
# $(MY_LIBVPX_ENC_PATH)/vp8/encoder/generic/csystemdependent.c
|
||||||
|
# $(MY_LIBVPX_ENC_PATH)/vp8/encoder/variance_c.c
|
||||||
|
# $(MY_LIBVPX_ENC_PATH)/vp8/decoder/idct_blk.c \
|
||||||
|
# md5_utils.c
|
||||||
|
# args.c \
|
||||||
|
# tools_common.c \
|
||||||
|
# nestegg/halloc/src/halloc.c \
|
||||||
|
# nestegg/src/nestegg.c \
|
||||||
|
# vpxdec.c \
|
||||||
|
# y4minput.c \
|
||||||
|
# libmkv/EbmlWriter.c \
|
||||||
|
# vpxenc.c \
|
||||||
|
# simple_decoder.c \
|
||||||
|
# postproc.c \
|
||||||
|
# decode_to_md5.c \
|
||||||
|
# simple_encoder.c \
|
||||||
|
# twopass_encoder.c \
|
||||||
|
# force_keyframe.c \
|
||||||
|
# decode_with_drops.c \
|
||||||
|
# error_resilient.c \
|
||||||
|
# vp8_scalable_patterns.c \
|
||||||
|
# vp8_set_maps.c \
|
||||||
|
# vp8cx_set_ref.c
|
||||||
|
|
||||||
|
LOCAL_CFLAGS := \
|
||||||
|
-DHAVE_CONFIG_H=vpx_config.h \
|
||||||
|
-include $(LOCAL_PATH)/third_party_mods/libvpx/source/config/android/vpx_config.h
|
||||||
|
|
||||||
|
LOCAL_MODULE := libwebrtc_vpx_enc
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES := \
|
||||||
|
external/libvpx \
|
||||||
|
external/libvpx/vpx_ports \
|
||||||
|
external/libvpx/vp8/common \
|
||||||
|
external/libvpx/vp8/encoder \
|
||||||
|
external/libvpx/vp8 \
|
||||||
|
external/libvpx/vpx_codec
|
||||||
|
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
10
license_template.txt
Normal file
10
license_template.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
107
typedefs.h
Normal file
107
typedefs.h
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file contains type definitions used in all WebRtc APIs.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Reserved words definitions */
|
||||||
|
#define WEBRTC_EXTERN extern
|
||||||
|
#define G_CONST const
|
||||||
|
#define WEBRTC_INLINE extern __inline
|
||||||
|
|
||||||
|
#ifndef WEBRTC_TYPEDEFS_H
|
||||||
|
#define WEBRTC_TYPEDEFS_H
|
||||||
|
|
||||||
|
/* Define WebRtc preprocessor identifiers based on the current build platform */
|
||||||
|
#if defined(WIN32)
|
||||||
|
// Windows & Windows Mobile
|
||||||
|
#if !defined(WEBRTC_TARGET_PC)
|
||||||
|
#define WEBRTC_TARGET_PC
|
||||||
|
#endif
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
// Mac OS X
|
||||||
|
#if defined(__LITTLE_ENDIAN__ ) //TODO: is this used?
|
||||||
|
#if !defined(WEBRTC_TARGET_MAC_INTEL)
|
||||||
|
#define WEBRTC_TARGET_MAC_INTEL
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#if !defined(WEBRTC_TARGET_MAC)
|
||||||
|
#define WEBRTC_TARGET_MAC
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
// Linux etc.
|
||||||
|
#if !defined(WEBRTC_TARGET_PC)
|
||||||
|
#define WEBRTC_TARGET_PC
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WEBRTC_TARGET_PC)
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
|
#include <stdint.h>
|
||||||
|
#else
|
||||||
|
// Define C99 equivalent types.
|
||||||
|
// Since MSVC doesn't include these headers, we have to write our own
|
||||||
|
// version to provide a compatibility layer between MSVC and the WebRTC
|
||||||
|
// headers.
|
||||||
|
typedef signed char int8_t;
|
||||||
|
typedef signed short int16_t;
|
||||||
|
typedef signed int int32_t;
|
||||||
|
typedef signed long long int64_t;
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
typedef unsigned int uint32_t;
|
||||||
|
typedef unsigned long long uint64_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WIN32)
|
||||||
|
typedef __int64 WebRtc_Word64;
|
||||||
|
typedef unsigned __int64 WebRtc_UWord64;
|
||||||
|
#else
|
||||||
|
typedef int64_t WebRtc_Word64;
|
||||||
|
typedef uint64_t WebRtc_UWord64;
|
||||||
|
#endif
|
||||||
|
typedef int32_t WebRtc_Word32;
|
||||||
|
typedef uint32_t WebRtc_UWord32;
|
||||||
|
typedef int16_t WebRtc_Word16;
|
||||||
|
typedef uint16_t WebRtc_UWord16;
|
||||||
|
typedef char WebRtc_Word8;
|
||||||
|
typedef uint8_t WebRtc_UWord8;
|
||||||
|
|
||||||
|
/* Define endian for the platform */
|
||||||
|
#define WEBRTC_LITTLE_ENDIAN
|
||||||
|
|
||||||
|
#elif defined(WEBRTC_TARGET_MAC_INTEL)
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
typedef int64_t WebRtc_Word64;
|
||||||
|
typedef uint64_t WebRtc_UWord64;
|
||||||
|
typedef int32_t WebRtc_Word32;
|
||||||
|
typedef uint32_t WebRtc_UWord32;
|
||||||
|
typedef int16_t WebRtc_Word16;
|
||||||
|
typedef char WebRtc_Word8;
|
||||||
|
typedef uint16_t WebRtc_UWord16;
|
||||||
|
typedef uint8_t WebRtc_UWord8;
|
||||||
|
|
||||||
|
/* Define endian for the platform */
|
||||||
|
#define WEBRTC_LITTLE_ENDIAN
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error "No platform defined for WebRtc type definitions (webrtc_typedefs.h)"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif // WEBRTC_TYPEDEFS_H
|
17
video_engine.gyp
Normal file
17
video_engine.gyp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
{
|
||||||
|
'includes': [
|
||||||
|
'common_settings.gypi', # Common settings
|
||||||
|
# Defines target vie_auto_test
|
||||||
|
'video_engine/main/test/AutoTest/vie_auto_test.gypi',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# tab-width:2
|
||||||
|
# indent-tabs-mode:nil
|
||||||
|
# End:
|
||||||
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|
185
voice_engine.gyp
Normal file
185
voice_engine.gyp
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
{
|
||||||
|
'includes': [
|
||||||
|
'common_settings.gypi',
|
||||||
|
],
|
||||||
|
'targets': [
|
||||||
|
# Auto test - command line test for all platforms
|
||||||
|
{
|
||||||
|
'target_name': 'voe_auto_test',
|
||||||
|
'type': 'executable',
|
||||||
|
'dependencies': [
|
||||||
|
'voice_engine/main/source/voice_engine_core.gyp:voice_engine_core',
|
||||||
|
'system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'voice_engine/main/test/auto_test',
|
||||||
|
],
|
||||||
|
'sources': [
|
||||||
|
'voice_engine/main/test/auto_test/voe_cpu_test.cc',
|
||||||
|
'voice_engine/main/test/auto_test/voe_cpu_test.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_extended_test.cc',
|
||||||
|
'voice_engine/main/test/auto_test/voe_extended_test.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_standard_test.cc',
|
||||||
|
'voice_engine/main/test/auto_test/voe_standard_test.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_stress_test.cc',
|
||||||
|
'voice_engine/main/test/auto_test/voe_stress_test.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_test_defines.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_test_interface.h',
|
||||||
|
'voice_engine/main/test/auto_test/voe_unit_test.cc',
|
||||||
|
'voice_engine/main/test/auto_test/voe_unit_test.h',
|
||||||
|
],
|
||||||
|
'conditions': [
|
||||||
|
['OS=="linux" or OS=="mac"', {
|
||||||
|
'actions': [
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio file',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/auto_test/audio_long16.pcm',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_long16.pcm',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'/bin/sh', '-c',
|
||||||
|
'cp -f voice_engine/main/test/auto_test/audio_* /tmp/;'\
|
||||||
|
'cp -f voice_engine/main/test/auto_test/audio_short16.pcm /tmp/;',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="win"', {
|
||||||
|
'dependencies': [
|
||||||
|
'voice_engine.gyp:voe_ui_win_test',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
['OS=="win"', {
|
||||||
|
'actions': [
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio file',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/auto_test/audio_long16.pcm',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_long16.pcm',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'cmd', '/c',
|
||||||
|
'xcopy /Y /R .\\voice_engine\\main\\test\\auto_test\\audio_* \\tmp',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio audio_short16.pcm',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/auto_test/audio_short16.pcm',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_short16.pcm',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'cmd', '/c',
|
||||||
|
'xcopy /Y /R .\\voice_engine\\main\\test\\auto_test\\audio_short16.pcm \\tmp',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'conditions': [
|
||||||
|
['OS=="win"', {
|
||||||
|
'targets': [
|
||||||
|
# WinTest - GUI test for Windows
|
||||||
|
{
|
||||||
|
'target_name': 'voe_ui_win_test',
|
||||||
|
'type': 'executable',
|
||||||
|
'dependencies': [
|
||||||
|
'voice_engine/main/source/voice_engine_core.gyp:voice_engine_core',
|
||||||
|
'system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'voice_engine/main/test/win_test',
|
||||||
|
],
|
||||||
|
'sources': [
|
||||||
|
'voice_engine/main/test/win_test/Resource.h',
|
||||||
|
'voice_engine/main/test/win_test/WinTest.cpp',
|
||||||
|
'voice_engine/main/test/win_test/WinTest.h',
|
||||||
|
'voice_engine/main/test/win_test/WinTest.rc',
|
||||||
|
'voice_engine/main/test/win_test/WinTestDlg.cpp',
|
||||||
|
'voice_engine/main/test/win_test/WinTestDlg.h',
|
||||||
|
'voice_engine/main/test/win_test/res/WinTest.ico',
|
||||||
|
'voice_engine/main/test/win_test/res/WinTest.rc2',
|
||||||
|
'voice_engine/main/test/win_test/stdafx.cpp',
|
||||||
|
'voice_engine/main/test/win_test/stdafx.h',
|
||||||
|
],
|
||||||
|
'actions': [
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio file',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/win_test/audio_tiny11.wav',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_tiny11.wav',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'cmd', '/c',
|
||||||
|
'xcopy /Y /R .\\voice_engine\\main\\test\\win_test\\audio_* \\tmp',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio audio_short16.pcm',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/win_test/audio_short16.pcm',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_short16.pcm',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'cmd', '/c',
|
||||||
|
'xcopy /Y /R .\\voice_engine\\main\\test\\win_test\\audio_short16.pcm \\tmp',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'action_name': 'copy audio_long16noise.pcm',
|
||||||
|
'inputs': [
|
||||||
|
'voice_engine/main/test/win_test/saudio_long16noise.pcm',
|
||||||
|
],
|
||||||
|
'outputs': [
|
||||||
|
'/tmp/audio_long16noise.pcm',
|
||||||
|
],
|
||||||
|
'action': [
|
||||||
|
'cmd', '/c',
|
||||||
|
'xcopy /Y /R .\\voice_engine\\main\\test\\win_test\\audio_long16noise.pcm \\tmp',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'configurations': {
|
||||||
|
'Common_Base': {
|
||||||
|
'msvs_configuration_attributes': {
|
||||||
|
'UseOfMFC': '1', # Static
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'msvs_settings': {
|
||||||
|
'VCLinkerTool': {
|
||||||
|
'SubSystem': '2', # Windows
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# tab-width:2
|
||||||
|
# indent-tabs-mode:nil
|
||||||
|
# End:
|
||||||
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|
72
webrtc.gyp
Normal file
72
webrtc.gyp
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license
|
||||||
|
# that can be found in the LICENSE file in the root of the source
|
||||||
|
# tree. An additional intellectual property rights grant can be found
|
||||||
|
# in the file PATENTS. All contributing project authors may
|
||||||
|
# be found in the AUTHORS file in the root of the source tree.
|
||||||
|
|
||||||
|
{
|
||||||
|
'includes': [
|
||||||
|
'common_settings.gypi', # Common settings
|
||||||
|
],
|
||||||
|
'targets': [
|
||||||
|
{
|
||||||
|
'target_name': 'auto_tests',
|
||||||
|
'type': 'none',
|
||||||
|
'dependencies': [
|
||||||
|
'voice_engine.gyp:voe_auto_test',
|
||||||
|
'video_engine.gyp:vie_auto_test',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'target_name': 'peerconnection_client',
|
||||||
|
'conditions': [
|
||||||
|
['OS=="win"', {
|
||||||
|
'type': 'executable',
|
||||||
|
'sources': [
|
||||||
|
'peerconnection/samples/client/conductor.cc',
|
||||||
|
'peerconnection/samples/client/conductor.h',
|
||||||
|
'peerconnection/samples/client/defaults.cc',
|
||||||
|
'peerconnection/samples/client/defaults.h',
|
||||||
|
'peerconnection/samples/client/main.cc',
|
||||||
|
'peerconnection/samples/client/main_wnd.cc',
|
||||||
|
'peerconnection/samples/client/main_wnd.h',
|
||||||
|
'peerconnection/samples/client/peer_connection_client.cc',
|
||||||
|
'peerconnection/samples/client/peer_connection_client.h',
|
||||||
|
'../third_party/libjingle/source/talk/base/win32socketinit.cc',
|
||||||
|
'../third_party/libjingle/source/talk/base/win32socketserver.cc',
|
||||||
|
],
|
||||||
|
'msvs_settings': {
|
||||||
|
'VCLinkerTool': {
|
||||||
|
'SubSystem': '2', # Windows
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'type': 'none',
|
||||||
|
}],
|
||||||
|
], # conditions
|
||||||
|
'dependencies': [
|
||||||
|
'../third_party/libjingle/libjingle.gyp:libjingle_app',
|
||||||
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'../third_party/libjingle/source',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'target_name': 'peerconnection_server',
|
||||||
|
'type': 'executable',
|
||||||
|
'sources': [
|
||||||
|
'peerconnection/samples/server/data_socket.cc',
|
||||||
|
'peerconnection/samples/server/data_socket.h',
|
||||||
|
'peerconnection/samples/server/main.cc',
|
||||||
|
'peerconnection/samples/server/peer_channel.cc',
|
||||||
|
'peerconnection/samples/server/peer_channel.h',
|
||||||
|
'peerconnection/samples/server/utils.cc',
|
||||||
|
'peerconnection/samples/server/utils.h',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user