OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 * | 9 * |
10 */ | 10 */ |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // We need this file to be C++ only so it will compile properly for all | 42 // We need this file to be C++ only so it will compile properly for all |
43 // platforms. In order to write ObjC specific implementations we use private | 43 // platforms. In order to write ObjC specific implementations we use private |
44 // externs. This function is defined in h264.mm. | 44 // externs. This function is defined in h264.mm. |
45 #if defined(WEBRTC_IOS) | 45 #if defined(WEBRTC_IOS) |
46 extern bool IsH264CodecSupportedObjC(); | 46 extern bool IsH264CodecSupportedObjC(); |
47 #endif | 47 #endif |
48 | 48 |
49 // If any H.264 codec is supported (iOS HW or OpenH264/FFmpeg). | 49 // If any H.264 codec is supported (iOS HW or OpenH264/FFmpeg). |
50 bool IsH264CodecSupported() { | 50 bool IsH264CodecSupported() { |
51 #if defined(WEBRTC_IOS) | 51 #if defined(WEBRTC_IOS) && defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) |
52 if (IsH264CodecSupportedObjC()) { | 52 if (IsH264CodecSupportedObjC()) { |
53 return true; | 53 return true; |
54 } | 54 } |
55 #endif | 55 #endif |
56 #if defined(WEBRTC_USE_H264) | 56 #if defined(WEBRTC_USE_H264) |
57 return g_rtc_use_h264; | 57 return g_rtc_use_h264; |
58 #else | 58 #else |
59 return false; | 59 return false; |
60 #endif | 60 #endif |
61 } | 61 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 RTC_NOTREACHED(); | 98 RTC_NOTREACHED(); |
99 return nullptr; | 99 return nullptr; |
100 #endif | 100 #endif |
101 } | 101 } |
102 | 102 |
103 bool H264Decoder::IsSupported() { | 103 bool H264Decoder::IsSupported() { |
104 return IsH264CodecSupported(); | 104 return IsH264CodecSupported(); |
105 } | 105 } |
106 | 106 |
107 } // namespace webrtc | 107 } // namespace webrtc |
OLD | NEW |