Bug 804792 Part 8 - Use the MacOSX codepath on BSD in voice_engine r=jesup
authorLandry Breuil <landry@openbsd.org>
Thu, 13 Jun 2013 08:44:58 +0200
changeset 146420 deb4e701df4c4f773b22f4f68c8a5a169194493e
parent 146419 55fd62dfb8f6112ecba004c146f40fa0398342db
child 146421 3c3d76ae7541e7adae311ecf50ded2f4f2723b4d
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs804792
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 804792 Part 8 - Use the MacOSX codepath on BSD in voice_engine r=jesup
media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
--- a/media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
+++ b/media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
@@ -467,17 +467,17 @@ int VoENetworkImpl::SetSendTOS(int chann
                                int DSCP,
                                int priority,
                                bool useSetSockopt)
 {
     WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
                  "SetSendTOS(channel=%d, DSCP=%d, useSetSockopt=%d)",
                  channel, DSCP, useSetSockopt);
 
-#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC)
+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC)
     _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning,
         "SetSendTOS() is not supported on this platform");
     return -1;
 #endif
 
 #ifndef WEBRTC_EXTERNAL_TRANSPORT
     if (!_shared->statistics().Initialized())
     {
@@ -523,17 +523,17 @@ int VoENetworkImpl::SetSendTOS(int chann
         return -1;
     }
     if (channelPtr->ExternalTransport())
     {
         _shared->SetLastError(VE_EXTERNAL_TRANSPORT_ENABLED, kTraceError,
             "SetSendTOS() external transport is enabled");
         return -1;
     }
-#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
     useSetSockopt = true;
     WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_shared->instance_id(), -1),
                  "   force useSetSockopt=true since there is no alternative"
                  " implementation");
 #endif
 
     return channelPtr->SetSendTOS(DSCP, priority, useSetSockopt);
 #else
@@ -546,17 +546,17 @@ int VoENetworkImpl::SetSendTOS(int chann
 int VoENetworkImpl::GetSendTOS(int channel,
                                int& DSCP,
                                int& priority,
                                bool& useSetSockopt)
 {
     WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
                  "GetSendTOS(channel=%d)", channel);
 
-#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_MAC)
+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) && !defined(WEBRTC_MAC)
     _shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceWarning,
         "GetSendTOS() is not supported on this platform");
     return -1;
 #endif
 #ifndef WEBRTC_EXTERNAL_TRANSPORT
     if (!_shared->statistics().Initialized())
     {
         _shared->SetLastError(VE_NOT_INITED, kTraceError);
--- a/media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
+++ b/media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
@@ -409,41 +409,43 @@ namespace webrtc
 
 #else
 #define ANDROID_NOT_SUPPORTED(stat)
 #endif  // #ifdef WEBRTC_LINUX
 
 // *** WEBRTC_MAC ***
 // including iPhone
 
-#ifdef WEBRTC_MAC
+#if defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
 
 #include <pthread.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sched.h>
 #include <sys/time.h>
 #include <time.h>
+#if !defined(WEBRTC_BSD)
 #include <AudioUnit/AudioUnit.h>
 #if !defined(WEBRTC_IOS)
   #include <CoreServices/CoreServices.h>
   #include <CoreAudio/CoreAudio.h>
   #include <AudioToolbox/DefaultAudioOutput.h>
   #include <AudioToolbox/AudioConverter.h>
   #include <CoreAudio/HostTime.h>
 #endif
+#endif
 
 #define DWORD unsigned long int
 #define WINAPI
 #define LPVOID void *
 #define FALSE 0
 #define TRUE 1
 #define SOCKADDR_IN struct sockaddr_in
 #define UINT unsigned int
@@ -526,13 +528,13 @@ namespace webrtc
 //  Defines
 // ----------------------------------------------------------------------------
 
   #define IPHONE_NOT_SUPPORTED(stat)
 #endif
 
 #else
 #define IPHONE_NOT_SUPPORTED(stat)
-#endif  // #ifdef WEBRTC_MAC
+#endif  // #if defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
 
 
 
 #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H