Home | History | Annotate | Download | only in source
      1 /*
      2  *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
      3  *
      4  *  Use of this source code is governed by a BSD-style license
      5  *  that can be found in the LICENSE file in the root of the source
      6  *  tree. An additional intellectual property rights grant can be found
      7  *  in the file PATENTS.  All contributing project authors may
      8  *  be found in the AUTHORS file in the root of the source tree.
      9  */
     10 
     11 #include "cpu_wrapper.h"
     12 
     13 #if defined(_WIN32)
     14     #include "cpu_win.h"
     15 #elif defined(WEBRTC_MAC)
     16     #include "cpu_mac.h"
     17 #elif defined(WEBRTC_MAC_INTEL)
     18     #include "cpu_mac.h"
     19 #elif defined(WEBRTC_ANDROID)
     20     // Not implemented yet, might be possible to use Linux implementation
     21 #else // defined(WEBRTC_LINUX)
     22     #include "cpu_linux.h"
     23 #endif
     24 
     25 namespace webrtc {
     26 CpuWrapper* CpuWrapper::CreateCpu()
     27 {
     28 #if defined(_WIN32)
     29    return new CpuWindows();
     30 #elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL))
     31     return new CpuWrapperMac();
     32 #elif defined(WEBRTC_ANDROID)
     33     return 0;
     34 #else
     35     return new CpuLinux();
     36 #endif
     37 }
     38 } // namespace webrtc
     39