Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Side by Side Diff: webrtc/modules/video_coding/codecs/h264/h264.cc

Issue 2474993002: Pass selected cricket::VideoCodec down to internal H264 encoder (Closed)
Patch Set: Fix. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
62 62
63 H264Encoder* H264Encoder::Create() { 63 H264Encoder* H264Encoder::Create(const cricket::VideoCodec& codec) {
64 RTC_DCHECK(H264Encoder::IsSupported()); 64 RTC_DCHECK(H264Encoder::IsSupported());
65 #if defined(WEBRTC_IOS) && defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED) 65 #if defined(WEBRTC_IOS) && defined(WEBRTC_VIDEO_TOOLBOX_SUPPORTED)
66 if (IsH264CodecSupportedObjC()) { 66 if (IsH264CodecSupportedObjC()) {
67 LOG(LS_INFO) << "Creating H264VideoToolboxEncoder."; 67 LOG(LS_INFO) << "Creating H264VideoToolboxEncoder.";
68 return new H264VideoToolboxEncoder(); 68 return new H264VideoToolboxEncoder();
69 } 69 }
70 #endif 70 #endif
71 #if defined(WEBRTC_USE_H264) 71 #if defined(WEBRTC_USE_H264)
72 RTC_CHECK(g_rtc_use_h264); 72 RTC_CHECK(g_rtc_use_h264);
73 LOG(LS_INFO) << "Creating H264EncoderImpl."; 73 LOG(LS_INFO) << "Creating H264EncoderImpl.";
74 return new H264EncoderImpl(); 74 return new H264EncoderImpl(codec);
75 #else 75 #else
76 RTC_NOTREACHED(); 76 RTC_NOTREACHED();
77 return nullptr; 77 return nullptr;
78 #endif 78 #endif
79 } 79 }
80 80
81 bool H264Encoder::IsSupported() { 81 bool H264Encoder::IsSupported() {
82 return IsH264CodecSupported(); 82 return IsH264CodecSupported();
83 } 83 }
84 84
(...skipping 13 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698