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

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

Issue 2474993002: Pass selected cricket::VideoCodec down to internal H264 encoder (Closed)
Patch Set: Rebase 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 supported_codecs_.push_back(cricket::VideoCodec(kUlpfecCodecName)); 44 supported_codecs_.push_back(cricket::VideoCodec(kUlpfecCodecName));
45 } 45 }
46 46
47 InternalEncoderFactory::~InternalEncoderFactory() {} 47 InternalEncoderFactory::~InternalEncoderFactory() {}
48 48
49 // WebRtcVideoEncoderFactory implementation. 49 // WebRtcVideoEncoderFactory implementation.
50 webrtc::VideoEncoder* InternalEncoderFactory::CreateVideoEncoder( 50 webrtc::VideoEncoder* InternalEncoderFactory::CreateVideoEncoder(
51 const cricket::VideoCodec& codec) { 51 const cricket::VideoCodec& codec) {
52 switch (CodecTypeFromName(codec.name)) { 52 switch (CodecTypeFromName(codec.name)) {
53 case webrtc::kVideoCodecH264: 53 case webrtc::kVideoCodecH264:
54 return webrtc::H264Encoder::Create(); 54 return webrtc::H264Encoder::Create(codec);
55 case webrtc::kVideoCodecVP8: 55 case webrtc::kVideoCodecVP8:
56 return webrtc::VP8Encoder::Create(); 56 return webrtc::VP8Encoder::Create();
57 case webrtc::kVideoCodecVP9: 57 case webrtc::kVideoCodecVP9:
58 return webrtc::VP9Encoder::Create(); 58 return webrtc::VP9Encoder::Create();
59 default: 59 default:
60 return nullptr; 60 return nullptr;
61 } 61 }
62 } 62 }
63 63
64 const std::vector<cricket::VideoCodec>& 64 const std::vector<cricket::VideoCodec>&
65 InternalEncoderFactory::supported_codecs() const { 65 InternalEncoderFactory::supported_codecs() const {
66 return supported_codecs_; 66 return supported_codecs_;
67 } 67 }
68 68
69 void InternalEncoderFactory::DestroyVideoEncoder( 69 void InternalEncoderFactory::DestroyVideoEncoder(
70 webrtc::VideoEncoder* encoder) { 70 webrtc::VideoEncoder* encoder) {
71 delete encoder; 71 delete encoder;
72 } 72 }
73 73
74 } // namespace cricket 74 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/BUILD.gn » ('j') | webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698