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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1970343002: Make sure WebRTC works without libvpx VP9 support. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: sort headers Created 4 years, 7 months 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
« no previous file with comments | « webrtc/build/common.gypi ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 11 matching lines...) Expand all
22 #include "webrtc/base/trace_event.h" 22 #include "webrtc/base/trace_event.h"
23 #include "webrtc/call.h" 23 #include "webrtc/call.h"
24 #include "webrtc/media/engine/constants.h" 24 #include "webrtc/media/engine/constants.h"
25 #include "webrtc/media/engine/simulcast.h" 25 #include "webrtc/media/engine/simulcast.h"
26 #include "webrtc/media/engine/webrtcmediaengine.h" 26 #include "webrtc/media/engine/webrtcmediaengine.h"
27 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" 27 #include "webrtc/media/engine/webrtcvideoencoderfactory.h"
28 #include "webrtc/media/engine/webrtcvideoframe.h" 28 #include "webrtc/media/engine/webrtcvideoframe.h"
29 #include "webrtc/media/engine/webrtcvoiceengine.h" 29 #include "webrtc/media/engine/webrtcvoiceengine.h"
30 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 30 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
31 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" 31 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h"
32 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
32 #include "webrtc/system_wrappers/include/field_trial.h" 33 #include "webrtc/system_wrappers/include/field_trial.h"
33 #include "webrtc/video_decoder.h" 34 #include "webrtc/video_decoder.h"
34 #include "webrtc/video_encoder.h" 35 #include "webrtc/video_encoder.h"
35 36
36 namespace cricket { 37 namespace cricket {
37 namespace { 38 namespace {
38 39
39 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. 40 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory.
40 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory { 41 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
41 public: 42 public:
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // A list of encoders that were created without being wrapped in a 153 // A list of encoders that were created without being wrapped in a
153 // SimulcastEncoderAdapter. 154 // SimulcastEncoderAdapter.
154 std::vector<webrtc::VideoEncoder*> non_simulcast_encoders_; 155 std::vector<webrtc::VideoEncoder*> non_simulcast_encoders_;
155 }; 156 };
156 157
157 bool CodecIsInternallySupported(const std::string& codec_name) { 158 bool CodecIsInternallySupported(const std::string& codec_name) {
158 if (CodecNamesEq(codec_name, kVp8CodecName)) { 159 if (CodecNamesEq(codec_name, kVp8CodecName)) {
159 return true; 160 return true;
160 } 161 }
161 if (CodecNamesEq(codec_name, kVp9CodecName)) { 162 if (CodecNamesEq(codec_name, kVp9CodecName)) {
162 return true; 163 return webrtc::VP9Encoder::IsSupported() &&
164 webrtc::VP9Decoder::IsSupported();
163 } 165 }
164 if (CodecNamesEq(codec_name, kH264CodecName)) { 166 if (CodecNamesEq(codec_name, kH264CodecName)) {
165 return webrtc::H264Encoder::IsSupported() && 167 return webrtc::H264Encoder::IsSupported() &&
166 webrtc::H264Decoder::IsSupported(); 168 webrtc::H264Decoder::IsSupported();
167 } 169 }
168 return false; 170 return false;
169 } 171 }
170 172
171 void AddDefaultFeedbackParams(VideoCodec* codec) { 173 void AddDefaultFeedbackParams(VideoCodec* codec) {
172 codec->AddFeedbackParam(FeedbackParam(kRtcpFbParamCcm, kRtcpFbCcmParamFir)); 174 codec->AddFeedbackParam(FeedbackParam(kRtcpFbParamCcm, kRtcpFbCcmParamFir));
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 rtx_mapping[video_codecs[i].codec.id] != 2589 rtx_mapping[video_codecs[i].codec.id] !=
2588 fec_settings.red_payload_type) { 2590 fec_settings.red_payload_type) {
2589 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2591 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2590 } 2592 }
2591 } 2593 }
2592 2594
2593 return video_codecs; 2595 return video_codecs;
2594 } 2596 }
2595 2597
2596 } // namespace cricket 2598 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/build/common.gypi ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698