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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #else | 42 #else |
43 return false; | 43 return false; |
44 #endif | 44 #endif |
45 } | 45 } |
46 | 46 |
47 H264Encoder* H264Encoder::Create(const cricket::VideoCodec& codec) { | 47 H264Encoder* H264Encoder::Create(const cricket::VideoCodec& codec) { |
48 RTC_DCHECK(H264Encoder::IsSupported()); | 48 RTC_DCHECK(H264Encoder::IsSupported()); |
49 #if defined(WEBRTC_USE_H264) | 49 #if defined(WEBRTC_USE_H264) |
50 RTC_CHECK(g_rtc_use_h264); | 50 RTC_CHECK(g_rtc_use_h264); |
51 LOG(LS_INFO) << "Creating H264EncoderImpl."; | 51 LOG(LS_INFO) << "Creating H264EncoderImpl."; |
52 return new H264EncoderImpl(); | 52 return new H264EncoderImpl(codec); |
53 #else | 53 #else |
54 RTC_NOTREACHED(); | 54 RTC_NOTREACHED(); |
55 return nullptr; | 55 return nullptr; |
56 #endif | 56 #endif |
57 } | 57 } |
58 | 58 |
59 bool H264Encoder::IsSupported() { | 59 bool H264Encoder::IsSupported() { |
60 return IsH264CodecSupported(); | 60 return IsH264CodecSupported(); |
61 } | 61 } |
62 | 62 |
63 H264Decoder* H264Decoder::Create() { | 63 H264Decoder* H264Decoder::Create() { |
64 RTC_DCHECK(H264Decoder::IsSupported()); | 64 RTC_DCHECK(H264Decoder::IsSupported()); |
65 #if defined(WEBRTC_USE_H264) | 65 #if defined(WEBRTC_USE_H264) |
66 RTC_CHECK(g_rtc_use_h264); | 66 RTC_CHECK(g_rtc_use_h264); |
67 LOG(LS_INFO) << "Creating H264DecoderImpl."; | 67 LOG(LS_INFO) << "Creating H264DecoderImpl."; |
68 return new H264DecoderImpl(); | 68 return new H264DecoderImpl(); |
69 #else | 69 #else |
70 RTC_NOTREACHED(); | 70 RTC_NOTREACHED(); |
71 return nullptr; | 71 return nullptr; |
72 #endif | 72 #endif |
73 } | 73 } |
74 | 74 |
75 bool H264Decoder::IsSupported() { | 75 bool H264Decoder::IsSupported() { |
76 return IsH264CodecSupported(); | 76 return IsH264CodecSupported(); |
77 } | 77 } |
78 | 78 |
79 } // namespace webrtc | 79 } // namespace webrtc |
OLD | NEW |