Change MAC_IPHONE to WEBRTC_IOS.
Review URL: https://webrtc-codereview.appspot.com/788004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2746 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
2578300eee
commit
414fa7f0c4
@ -168,7 +168,7 @@
|
||||
['OS=="ios"', {
|
||||
'defines': [
|
||||
'WEBRTC_MAC',
|
||||
'MAC_IPHONE', # TODO(sjlee): This should be changed to WEBRTC_IOS.
|
||||
'WEBRTC_IOS',
|
||||
'WEBRTC_THREAD_RR',
|
||||
'WEBRTC_CLOCK_TYPE_REALTIME',
|
||||
],
|
||||
|
@ -126,7 +126,7 @@
|
||||
// VideoEngine MAC
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
// #define CARBON_RENDERING
|
||||
#define COCOA_RENDERING
|
||||
#endif
|
||||
@ -135,7 +135,7 @@
|
||||
// VideoEngine Mobile iPhone
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
#define EAGL_RENDERING
|
||||
#endif
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#if defined(LINUX_PULSE)
|
||||
#include "audio_device_pulse_linux.h"
|
||||
#endif
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
#include "audio_device_utility_ios.h"
|
||||
#include "audio_device_ios.h"
|
||||
#elif defined(WEBRTC_MAC)
|
||||
@ -160,7 +160,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::CheckPlatform()
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
platform = kPlatformLinux;
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is LINUX");
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
platform = kPlatformIOS;
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is IOS");
|
||||
#elif defined(WEBRTC_MAC)
|
||||
@ -341,7 +341,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
|
||||
// Create the *iPhone* implementation of the Audio Device
|
||||
//
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
if (audioLayer == kPlatformDefaultAudio)
|
||||
{
|
||||
// Create *iPhone Audio* implementation
|
||||
@ -354,7 +354,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
// Create the Mac implementation of the Device Utility.
|
||||
ptrAudioDeviceUtility = new AudioDeviceUtilityIPhone(Id());
|
||||
}
|
||||
// END #if defined(MAC_IPHONE)
|
||||
// END #if defined(WEBRTC_IOS)
|
||||
|
||||
// Create the *Mac* implementation of the Audio Device
|
||||
//
|
||||
|
@ -36,7 +36,7 @@ const char* GetFilename(const char* filename)
|
||||
sprintf(filenameStr[currentStr], "/sdcard/admtest/%s", filename);
|
||||
return filenameStr[currentStr];
|
||||
}
|
||||
#elif !defined(MAC_IPHONE)
|
||||
#elif !defined(WEBRTC_IOS)
|
||||
const char* GetFilename(const char* filename) {
|
||||
std::string full_path_filename = webrtc::test::OutputPath() + filename;
|
||||
return full_path_filename.c_str();
|
||||
@ -1588,7 +1588,7 @@ TEST_F(AudioDeviceAPITest, PlayoutBufferTests) {
|
||||
|
||||
CheckInitialPlayoutStates();
|
||||
EXPECT_EQ(0, audio_device_->PlayoutBuffer(&bufferType, &sizeMS));
|
||||
#if defined(_WIN32) || defined(ANDROID) || defined(MAC_IPHONE)
|
||||
#if defined(_WIN32) || defined(ANDROID) || defined(WEBRTC_IOS)
|
||||
EXPECT_EQ(AudioDeviceModule::kAdaptiveBufferSize, bufferType);
|
||||
#else
|
||||
EXPECT_EQ(AudioDeviceModule::kFixedBufferSize, bufferType);
|
||||
@ -1625,7 +1625,7 @@ TEST_F(AudioDeviceAPITest, PlayoutBufferTests) {
|
||||
EXPECT_EQ(0, audio_device_->PlayoutBuffer(&bufferType, &sizeMS));
|
||||
EXPECT_EQ(AudioDeviceModule::kAdaptiveBufferSize, bufferType);
|
||||
#endif
|
||||
#if defined(ANDROID) || defined(MAC_IPHONE)
|
||||
#if defined(ANDROID) || defined(WEBRTC_IOS)
|
||||
EXPECT_EQ(-1,
|
||||
audio_device_->SetPlayoutBuffer(AudioDeviceModule::kFixedBufferSize,
|
||||
kAdmMinPlayoutBufferSizeMs));
|
||||
@ -1770,7 +1770,7 @@ TEST_F(AudioDeviceAPITest, RecordingSampleRate) {
|
||||
#elif defined(ANDROID)
|
||||
TEST_LOG("Recording sample rate is %u\n\n", sampleRate);
|
||||
EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000));
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
TEST_LOG("Recording sample rate is %u\n\n", sampleRate);
|
||||
EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) ||
|
||||
(sampleRate == 8000));
|
||||
@ -1789,7 +1789,7 @@ TEST_F(AudioDeviceAPITest, PlayoutSampleRate) {
|
||||
#elif defined(ANDROID)
|
||||
TEST_LOG("Playout sample rate is %u\n\n", sampleRate);
|
||||
EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000));
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
TEST_LOG("Playout sample rate is %u\n\n", sampleRate);
|
||||
EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) ||
|
||||
(sampleRate == 8000));
|
||||
@ -1802,7 +1802,7 @@ TEST_F(AudioDeviceAPITest, ResetAudioDevice) {
|
||||
EXPECT_EQ(0, audio_device_->SetPlayoutDevice(MACRO_DEFAULT_DEVICE));
|
||||
EXPECT_EQ(0, audio_device_->SetRecordingDevice(MACRO_DEFAULT_DEVICE));
|
||||
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
// Not playing or recording, should just return 0
|
||||
EXPECT_EQ(0, audio_device_->ResetAudioDevice());
|
||||
|
||||
@ -1838,7 +1838,7 @@ TEST_F(AudioDeviceAPITest, SetPlayoutSpeaker) {
|
||||
EXPECT_EQ(0, audio_device_->SetPlayoutDevice(MACRO_DEFAULT_DEVICE));
|
||||
|
||||
bool loudspeakerOn(false);
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
// Not playing or recording, should just return a success
|
||||
EXPECT_EQ(0, audio_device_->SetLoudspeakerStatus(true));
|
||||
EXPECT_EQ(0, audio_device_->GetLoudspeakerStatus(loudspeakerOn));
|
||||
|
@ -25,7 +25,7 @@ int func_test(int);
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
int main(int /*argc*/, char* /*argv*/[])
|
||||
{
|
||||
func_test(0);
|
||||
|
@ -47,7 +47,7 @@ struct AudioPacket
|
||||
};
|
||||
|
||||
// Helper functions
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
char* GetFilename(char* filename)
|
||||
{
|
||||
return filename;
|
||||
@ -2667,7 +2667,7 @@ WebRtc_Word32 FuncTestManager::TestAdvancedMBAPI()
|
||||
EXPECT_TRUE(audioDevice->Recording());
|
||||
EXPECT_TRUE(audioDevice->Playing());
|
||||
|
||||
#if defined(_WIN32_WCE) || defined(MAC_IPHONE)
|
||||
#if defined(_WIN32_WCE) || defined(WEBRTC_IOS)
|
||||
TEST_LOG("\nResetAudioDevice\n \n");
|
||||
if (audioDevice->Recording() && audioDevice->Playing())
|
||||
{
|
||||
@ -2688,7 +2688,7 @@ WebRtc_Word32 FuncTestManager::TestAdvancedMBAPI()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
bool loudspeakerOn(false);
|
||||
TEST_LOG("\nSet playout spaker\n \n");
|
||||
if (audioDevice->Recording() && audioDevice->Playing())
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "list_wrapper.h"
|
||||
#include "resampler.h"
|
||||
|
||||
#if defined(MAC_IPHONE) || defined(ANDROID)
|
||||
#if defined(WEBRTC_IOS) || defined(ANDROID)
|
||||
#define USE_SLEEP_AS_PAUSE
|
||||
#else
|
||||
//#define USE_SLEEP_AS_PAUSE
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#ifndef MAC_IPHONE
|
||||
#ifndef WEBRTC_IOS
|
||||
#include <net/if_arp.h>
|
||||
#endif
|
||||
#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include "windows/video_render_windows_impl.h"
|
||||
#define STANDARD_RENDERING kRenderWindows
|
||||
|
||||
// MAC_IPHONE should go before WEBRTC_MAC because WEBRTC_MAC
|
||||
// gets defined if MAC_IPHONE is defined
|
||||
#elif defined(MAC_IPHONE)
|
||||
// WEBRTC_IOS should go before WEBRTC_MAC because WEBRTC_MAC
|
||||
// gets defined if WEBRTC_IOS is defined
|
||||
#elif defined(WEBRTC_IOS)
|
||||
#if defined(IPHONE_GLES_RENDERING)
|
||||
#define STANDARD_RENDERING kRenderiPhone
|
||||
#include "iPhone/video_render_iphone_impl.h"
|
||||
@ -116,7 +116,7 @@ ModuleVideoRenderImpl::ModuleVideoRenderImpl(
|
||||
}
|
||||
break;
|
||||
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
case kRenderiPhone:
|
||||
{
|
||||
VideoRenderIPhoneImpl* ptrRenderer = new VideoRenderIPhoneImpl(_id, videoRenderType, window, _fullScreen);
|
||||
@ -276,7 +276,7 @@ ModuleVideoRenderImpl::~ModuleVideoRenderImpl()
|
||||
break;
|
||||
#endif
|
||||
|
||||
#elif defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_IOS)
|
||||
case kRenderiPhone:
|
||||
break;
|
||||
|
||||
@ -350,7 +350,7 @@ WebRtc_Word32 ModuleVideoRenderImpl::ChangeWindow(void* window)
|
||||
|
||||
#ifdef WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER
|
||||
|
||||
#if defined(MAC_IPHONE) // MAC_IPHONE must go before WEBRTC_MAC
|
||||
#if defined(WEBRTC_IOS) // WEBRTC_IOS must go before WEBRTC_MAC
|
||||
_ptrRenderer = NULL;
|
||||
delete _ptrRenderer;
|
||||
|
||||
|
@ -184,11 +184,11 @@ inline TickTime TickTime::Now()
|
||||
if (retval != KERN_SUCCESS) {
|
||||
// TODO(wu): Implement CHECK similar to chrome for all the platforms.
|
||||
// Then replace this with a CHECK(retval == KERN_SUCCESS);
|
||||
#ifndef MAC_IPHONE
|
||||
#ifndef WEBRTC_IOS
|
||||
asm("int3");
|
||||
#else
|
||||
__builtin_trap();
|
||||
#endif // MAC_IPHONE
|
||||
#endif // WEBRTC_IOS
|
||||
}
|
||||
}
|
||||
// Use timebase to convert absolute time tick units into nanoseconds.
|
||||
|
@ -13,7 +13,7 @@
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include "event_win.h"
|
||||
#elif defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <pthread.h>
|
||||
#include "event_posix.h"
|
||||
@ -49,7 +49,7 @@ int EventWrapper::KeyPressed()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#elif defined(WEBRTC_MAC) && !defined(MAC_IPHONE)
|
||||
#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
|
||||
bool keyDown = false;
|
||||
// loop through all Mac virtual key constant values
|
||||
for(int keyIndex = 0; keyIndex <= 0x5C; keyIndex++)
|
||||
|
@ -157,8 +157,7 @@ ThreadPosix::~ThreadPosix()
|
||||
delete _crit_state;
|
||||
}
|
||||
|
||||
#define HAS_THREAD_ID !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM) && \
|
||||
!defined(WEBRTC_MAC)
|
||||
#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
|
||||
#if HAS_THREAD_ID
|
||||
bool ThreadPosix::Start(unsigned int& threadID)
|
||||
#else
|
||||
|
@ -24,7 +24,7 @@ namespace webrtc {
|
||||
// TODO (hellner) the buffer should be close to how much the system can write to
|
||||
// file. Increasing the buffer will not solve anything. Sooner or
|
||||
// later the buffer is going to fill up anyways.
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
#define WEBRTC_TRACE_MAX_QUEUE 2000
|
||||
#else
|
||||
#define WEBRTC_TRACE_MAX_QUEUE 8000
|
||||
|
@ -138,7 +138,7 @@ class AudioProcessingTest : public AfterStreamingFixture {
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
#if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
|
||||
TEST_F(AudioProcessingTest, AgcIsOnByDefault) {
|
||||
bool agc_enabled = false;
|
||||
@ -219,7 +219,7 @@ TEST_F(AudioProcessingTest, DISABLED_TestVoiceActivityDetectionWithObserver) {
|
||||
EXPECT_EQ(0, voe_apm_->DeRegisterRxVadObserver(channel_));
|
||||
}
|
||||
|
||||
#endif // !MAC_IPHONE && !WEBRTC_ANDROID
|
||||
#endif // !WEBRTC_IOS && !WEBRTC_ANDROID
|
||||
|
||||
TEST_F(AudioProcessingTest, EnablingEcAecmShouldEnableEcAecm) {
|
||||
// This one apparently applies to Android and iPhone as well.
|
||||
@ -377,7 +377,7 @@ TEST_F(AudioProcessingTest, CanStartAndStopDebugRecording) {
|
||||
EXPECT_EQ(0, voe_apm_->StopDebugRecording());
|
||||
}
|
||||
|
||||
#if defined(MAC_IPHONE) || defined(WEBRTC_ANDROID)
|
||||
#if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID)
|
||||
|
||||
TEST_F(AudioProcessingTest, AgcIsOffByDefaultAndDigital) {
|
||||
bool agc_enabled = true;
|
||||
@ -412,4 +412,4 @@ TEST_F(AudioProcessingTest, TestVoiceActivityDetection) {
|
||||
TryDetectingSpeechAfterSilence();
|
||||
}
|
||||
|
||||
#endif // MAC_IPHONE || WEBRTC_ANDROID
|
||||
#endif // WEBRTC_IOS || WEBRTC_ANDROID
|
||||
|
@ -52,7 +52,7 @@ TEST_F(DtmfTest, TestTwoNonDtmfEvents) {
|
||||
EXPECT_EQ(0, voe_dtmf_->SendTelephoneEvent(channel_, 110, true));
|
||||
}
|
||||
|
||||
#ifndef MAC_IPHONE
|
||||
#ifndef WEBRTC_IOS
|
||||
TEST_F(DtmfTest, ManualCanDisableDtmfPlayoutExceptOnIphone) {
|
||||
TEST_LOG("Disabling DTMF playout (no tone should be heard) \n");
|
||||
EXPECT_EQ(0, voe_dtmf_->SetDtmfPlayoutStatus(channel_, false));
|
||||
|
@ -42,14 +42,14 @@ TEST_F(HardwareBeforeStreamingTest,
|
||||
|
||||
// Tests that only apply to mobile:
|
||||
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
TEST_F(HardwareBeforeStreamingTest, ResetsAudioDeviceOnIphone) {
|
||||
EXPECT_EQ(0, voe_hardware_->ResetAudioDevice());
|
||||
}
|
||||
#endif
|
||||
|
||||
// Tests that only apply to desktop:
|
||||
#if !defined(MAC_IPHONE) & !defined(WEBRTC_ANDROID)
|
||||
#if !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID)
|
||||
|
||||
TEST_F(HardwareBeforeStreamingTest, GetSystemCpuLoadSucceeds) {
|
||||
#ifdef _WIN32
|
||||
@ -163,4 +163,4 @@ TEST_F(HardwareBeforeStreamingTest,
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // !defined(MAC_IPHONE) & !defined(WEBRTC_ANDROID)
|
||||
#endif // !defined(WEBRTC_IOS) & !defined(WEBRTC_ANDROID)
|
||||
|
@ -15,7 +15,7 @@
|
||||
class HardwareTest : public AfterStreamingFixture {
|
||||
};
|
||||
|
||||
#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
#if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
TEST_F(HardwareTest, AbleToQueryForDevices) {
|
||||
int num_recording_devices = 0;
|
||||
int num_playout_devices = 0;
|
||||
@ -84,7 +84,7 @@ TEST_F(HardwareTest, GetSystemCpuLoadWorksExceptOnMacAndAndroid) {
|
||||
#endif
|
||||
|
||||
TEST_F(HardwareTest, BuiltInWasapiAECWorksForAudioWindowsCoreAudioLayer) {
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
// Ensure the sound device is reset on iPhone.
|
||||
EXPECT_EQ(0, voe_hardware_->ResetAudioDevice());
|
||||
Sleep(2000);
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
#include "voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
|
||||
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
const int kMinimumReasonableDelayEstimateMs = 30;
|
||||
#else
|
||||
const int kMinimumReasonableDelayEstimateMs = 45;
|
||||
#endif // !MAC_IPHONE
|
||||
#endif // !WEBRTC_IOS
|
||||
|
||||
class VideoSyncTest : public AfterStreamingFixture {
|
||||
protected:
|
||||
|
@ -87,7 +87,7 @@ TEST_F(VolumeTest, ManualSetVolumeWorks) {
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
|
||||
TEST_F(VolumeTest, DISABLED_ON_LINUX(DefaultMicrophoneVolumeIsAtMost255)) {
|
||||
unsigned int volume = 1000;
|
||||
@ -136,9 +136,9 @@ TEST_F(VolumeTest, ManualCanSetChannelScaling) {
|
||||
Sleep(2000);
|
||||
}
|
||||
|
||||
#endif // !MAC_IPHONE
|
||||
#endif // !WEBRTC_IOS
|
||||
|
||||
#if !defined(WEBRTC_ANDROID) && !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
|
||||
|
||||
TEST_F(VolumeTest, InputMutingIsNotEnabledByDefault) {
|
||||
bool is_muted = true;
|
||||
@ -277,4 +277,4 @@ TEST_F(VolumeTest, ManualTestChannelPanning) {
|
||||
EXPECT_FLOAT_EQ(0.8f, right);
|
||||
}
|
||||
|
||||
#endif // !WEBRTC_ANDROID && !MAC_IPHONE
|
||||
#endif // !WEBRTC_ANDROID && !WEBRTC_IOS
|
||||
|
@ -41,7 +41,7 @@ const int RemotePort = 12345; // transmit to this UDP port
|
||||
const char* RemoteIP = "192.168.200.1"; // transmit to this IP address
|
||||
#endif
|
||||
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
#define SLEEP_IF_IPHONE(x) SLEEP(x)
|
||||
#else
|
||||
#define SLEEP_IF_IPHONE(x)
|
||||
@ -418,7 +418,7 @@ int VoEExtendedTest::TestBase() {
|
||||
TEST_MUSTPASS(voe_base_->Init());
|
||||
MARK();
|
||||
TEST_MUSTPASS(voe_base_->Terminate());
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
// verify AEC recording
|
||||
TEST_MUSTPASS(voe_base_->Init());
|
||||
MARK(); // verify output dat-files
|
||||
@ -577,7 +577,7 @@ int VoEExtendedTest::TestBase() {
|
||||
|
||||
ch = voe_base_->CreateChannel();
|
||||
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
printf("\nNOTE: Local IP must be set in source code (line %d) \n",
|
||||
__LINE__ + 1);
|
||||
char* localIp = "127.0.0.1";
|
||||
@ -1432,7 +1432,7 @@ int VoEExtendedTest::TestBase() {
|
||||
voe_base_->DeleteChannel(ch);
|
||||
ch = voe_base_->CreateChannel();
|
||||
|
||||
#ifndef MAC_IPHONE
|
||||
#ifndef WEBRTC_IOS
|
||||
// bind to local IP and try again
|
||||
strcpy(localIp, "127.0.0.1");
|
||||
#else
|
||||
@ -3326,7 +3326,7 @@ int VoEExtendedTest::TestDtmf() {
|
||||
SLEEP(1000);
|
||||
// Switch codec
|
||||
CodecInst ci;
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
ci.channels = 1;
|
||||
ci.pacsize = 480;
|
||||
ci.plfreq = 16000;
|
||||
@ -4596,7 +4596,7 @@ int VoEExtendedTest::TestFile() {
|
||||
// Record mixed (speaker + microphone) signal to file
|
||||
|
||||
|
||||
#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
#if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
TEST(StartRecordingSpeakerStereo);
|
||||
ANL();
|
||||
TEST(StopRecordingSpeakerStereo);
|
||||
@ -4633,11 +4633,11 @@ int VoEExtendedTest::TestFile() {
|
||||
ANL();
|
||||
#else
|
||||
TEST_LOG("Skipping stereo record tests -"
|
||||
" MAC_IPHONE or WEBRTC_ANDROID is defined \n");
|
||||
#endif // #if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
" WEBRTC_IOS or WEBRTC_ANDROID is defined \n");
|
||||
#endif // #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
// Conversion between different file formats
|
||||
|
||||
#if defined(MAC_IPHONE) || defined(WEBRTC_ANDROID)
|
||||
#if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID)
|
||||
TEST_MUSTPASS(voe_base_->StopPlayout(0));
|
||||
TEST_MUSTPASS(voe_base_->StopSend(0));
|
||||
#endif
|
||||
@ -4698,7 +4698,7 @@ int VoEExtendedTest::TestFile() {
|
||||
(output_path + "singleUserDemoConv_dummy.pcm").c_str()));MARK();
|
||||
AOK();ANL();
|
||||
|
||||
#if defined(MAC_IPHONE) || defined(WEBRTC_ANDROID)
|
||||
#if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID)
|
||||
TEST_MUSTPASS(voe_base_->StartPlayout(0));
|
||||
TEST_MUSTPASS(voe_base_->StartSend(0));
|
||||
#endif
|
||||
@ -4932,7 +4932,7 @@ int VoEExtendedTest::TestHardware() {
|
||||
}
|
||||
ANL();
|
||||
|
||||
#if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
#if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
// GetRecording/PlayoutDeviceStatus
|
||||
TEST(Getrecording/PlayoutDeviceStatus);
|
||||
ANL();
|
||||
@ -5032,8 +5032,8 @@ int VoEExtendedTest::TestHardware() {
|
||||
MARK();
|
||||
#endif
|
||||
ANL();
|
||||
#endif // #if !defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID)
|
||||
#if defined(MAC_IPHONE)
|
||||
#endif // #if !defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID)
|
||||
#if defined(WEBRTC_IOS)
|
||||
TEST(ResetSoundDevice); ANL();
|
||||
|
||||
for (int p=0; p<=60; p+=20)
|
||||
@ -5072,8 +5072,8 @@ int VoEExtendedTest::TestHardware() {
|
||||
TEST_MUSTPASS(voe_base_->StartSend(0));
|
||||
TEST_MUSTPASS(voe_base_->StartPlayout(0));
|
||||
TEST_MUSTPASS(voe_base_->StartReceive(0));
|
||||
#endif // defined(MAC_IPHONE))
|
||||
#ifdef MAC_IPHONE
|
||||
#endif // defined(WEBRTC_IOS))
|
||||
#ifdef WEBRTC_IOS
|
||||
TEST_LOG("\nNOTE: Always run hardware tests also without extended tests "
|
||||
"enabled,\nsince the extended tests are pre-streaming tests only.\n");
|
||||
#endif
|
||||
@ -5111,7 +5111,7 @@ int VoEExtendedTest::TestNetwork() {
|
||||
#ifdef WEBRTC_ANDROID
|
||||
int sleepTime = 200;
|
||||
int sleepTime2 = 250;
|
||||
#elif defined(MAC_IPHONE) // MAC_IPHONE needs more delay for getSourceInfo()
|
||||
#elif defined(WEBRTC_IOS) // WEBRTC_IOS needs more delay for getSourceInfo()
|
||||
int sleepTime = 150;
|
||||
int sleepTime2 = 200;
|
||||
#else
|
||||
@ -5145,7 +5145,7 @@ int VoEExtendedTest::TestNetwork() {
|
||||
TEST(GetLocalIP);
|
||||
ANL();
|
||||
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
// Should fail
|
||||
TEST_MUSTPASS(!netw->GetLocalIP(NULL, 0)); MARK();
|
||||
TEST_ERROR(VE_FUNC_NOT_SUPPORTED);
|
||||
@ -5325,7 +5325,7 @@ int VoEExtendedTest::TestNetwork() {
|
||||
TEST_MUSTPASS(voe_base_->SetSendDestination(0, 9005, "127.0.0.1", 9020));
|
||||
TEST_MUSTPASS(voe_base_->StartSend(0));
|
||||
SLEEP(sleepTime);
|
||||
#ifdef MAC_IPHONE
|
||||
#ifdef WEBRTC_IOS
|
||||
SLEEP(500); // Need extra pause for some reason
|
||||
#endif
|
||||
|
||||
@ -5461,7 +5461,7 @@ int VoEExtendedTest::TestNetwork() {
|
||||
MARK();
|
||||
|
||||
// STATE: external transport is disabled
|
||||
#if defined(WEBRTC_ANDROID) || defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
|
||||
int testError = VE_FUNC_NOT_SUPPORTED;
|
||||
#else
|
||||
int testError = VE_EXTERNAL_TRANSPORT_ENABLED;
|
||||
@ -7064,7 +7064,7 @@ int VoEExtendedTest::TestRTP_RTCP() {
|
||||
TEST_LOG("Turn FEC and VAD on and wait for 4 seconds and ensure that "
|
||||
"the jitter is still small...");
|
||||
CodecInst cinst;
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
cinst.pltype = 104;
|
||||
strcpy(cinst.plname, "isac");
|
||||
cinst.plfreq = 32000;
|
||||
@ -7238,7 +7238,7 @@ int VoEExtendedTest::TestRTP_RTCP() {
|
||||
cinst.channels = 1;
|
||||
cinst.rate = 0;
|
||||
TEST_MUSTPASS(codec->SetRecPayloadType(0, cinst));
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
cinst.pltype = 104;
|
||||
strcpy(cinst.plname, "isac");
|
||||
cinst.plfreq = 32000;
|
||||
@ -7417,7 +7417,7 @@ int VoEExtendedTest::TestVolumeControl()
|
||||
|
||||
TEST_MUSTPASS(voe_base_->Init());
|
||||
TEST_MUSTPASS(voe_base_->CreateChannel());
|
||||
#if (defined _TEST_HARDWARE_ && (!defined(MAC_IPHONE)))
|
||||
#if (defined _TEST_HARDWARE_ && (!defined(WEBRTC_IOS)))
|
||||
#if defined(_WIN32)
|
||||
TEST_MUSTPASS(hardware->SetRecordingDevice(-1));
|
||||
TEST_MUSTPASS(hardware->SetPlayoutDevice(-1));
|
||||
@ -7439,23 +7439,23 @@ int VoEExtendedTest::TestVolumeControl()
|
||||
////////////////////////////
|
||||
// Actual test starts here
|
||||
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
TEST(SetSpeakerVolume);
|
||||
ANL();
|
||||
TEST_MUSTPASS(-1 != volume->SetSpeakerVolume(256));
|
||||
MARK();
|
||||
TEST_MUSTPASS(VE_INVALID_ARGUMENT != voe_base_->LastError());
|
||||
ANL();
|
||||
#endif // #if !defined(MAC_IPHONE)
|
||||
#endif // #if !defined(WEBRTC_IOS)
|
||||
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
TEST(SetMicVolume); ANL();
|
||||
TEST_MUSTPASS(-1 != volume->SetMicVolume(256)); MARK();
|
||||
TEST_MUSTPASS(VE_INVALID_ARGUMENT != voe_base_->LastError());
|
||||
ANL();
|
||||
#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#endif // #if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
TEST(SetChannelOutputVolumeScaling);
|
||||
ANL();
|
||||
TEST_MUSTPASS(-1 != volume->SetChannelOutputVolumeScaling(0, (float)-0.1));
|
||||
@ -7465,8 +7465,8 @@ int VoEExtendedTest::TestVolumeControl()
|
||||
MARK();
|
||||
TEST_MUSTPASS(VE_INVALID_ARGUMENT != voe_base_->LastError());
|
||||
ANL();
|
||||
#endif // #if !defined(MAC_IPHONE)
|
||||
#if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#endif // #if !defined(WEBRTC_IOS)
|
||||
#if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
TEST(SetOutputVolumePan);
|
||||
ANL();
|
||||
TEST_MUSTPASS(-1 != volume->SetOutputVolumePan(-1, (float)-0.1,
|
||||
@ -7506,7 +7506,7 @@ int VoEExtendedTest::TestVolumeControl()
|
||||
MARK();
|
||||
TEST_MUSTPASS(VE_INVALID_ARGUMENT != voe_base_->LastError());
|
||||
ANL();
|
||||
#endif // #if (!defined(MAC_IPHONE) && !defined(WEBRTC_ANDROID))
|
||||
#endif // #if (!defined(WEBRTC_IOS) && !defined(WEBRTC_ANDROID))
|
||||
#ifdef _TEST_FILE_
|
||||
TEST_MUSTPASS(file->StopPlayingFileAsMicrophone(0));
|
||||
#endif
|
||||
|
@ -598,7 +598,7 @@ int RunInManualMode(int argc, char** argv) {
|
||||
// main
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if !defined(MAC_IPHONE)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
int main(int argc, char** argv) {
|
||||
if (argc > 1 && std::string(argv[1]) == "--automated") {
|
||||
// This function is defined in automated_mode.cc to avoid macro clashes
|
||||
@ -608,4 +608,4 @@ int main(int argc, char** argv) {
|
||||
|
||||
return RunInManualMode(argc, argv);
|
||||
}
|
||||
#endif //#if !defined(MAC_IPHONE)
|
||||
#endif //#if !defined(WEBRTC_IOS)
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
#if defined(WEBRTC_ANDROID) || defined(MAC_IPHONE) || defined(MAC_IPHONE_SIM)
|
||||
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
|
||||
static const EcModes kDefaultEcMode = kEcAecm;
|
||||
#else
|
||||
static const EcModes kDefaultEcMode = kEcAec;
|
||||
@ -183,7 +183,7 @@ int VoEAudioProcessingImpl::SetAgcStatus(bool enable, AgcModes mode) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(MAC_IPHONE) || defined(ATA) || defined(WEBRTC_ANDROID)
|
||||
#if defined(WEBRTC_IOS) || defined(ATA) || defined(WEBRTC_ANDROID)
|
||||
if (mode == kAgcAdaptiveAnalog) {
|
||||
_shared->SetLastError(VE_INVALID_ARGUMENT, kTraceError,
|
||||
"SetAgcStatus() invalid Agc mode for mobile device");
|
||||
|
@ -634,7 +634,7 @@ int VoEHardwareImpl::ResetAudioDevice()
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(MAC_IPHONE)
|
||||
#if defined(WEBRTC_IOS)
|
||||
if (_shared->audio_device()->ResetAudioDevice() < 0)
|
||||
{
|
||||
_shared->SetLastError(VE_SOUNDCARD_ERROR, kTraceError,
|
||||
|
@ -457,7 +457,7 @@ namespace webrtc
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
#if !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM)
|
||||
#if !defined(WEBRTC_IOS)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <CoreAudio/CoreAudio.h>
|
||||
#include <AudioToolbox/DefaultAudioOutput.h>
|
||||
@ -517,7 +517,7 @@ namespace
|
||||
#define WEBRTC_VOICE_ENGINE_DEFAULT_DEVICE 0
|
||||
|
||||
// iPhone specific
|
||||
#if defined(MAC_IPHONE) || defined(MAC_IPHONE_SIM)
|
||||
#if defined(WEBRTC_IOS)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Enumerators
|
||||
|
Loading…
x
Reference in New Issue
Block a user