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

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

Issue 2558463002: Reland of H.264 packetization mode 0 (try 3) (Closed)
Patch Set: Lengthened timeout Created 4 years 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/media/base/codec.cc ('k') | webrtc/modules/BUILD.gn » ('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) 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 19 matching lines...) Expand all
30 } // namespace 30 } // namespace
31 31
32 InternalEncoderFactory::InternalEncoderFactory() { 32 InternalEncoderFactory::InternalEncoderFactory() {
33 supported_codecs_.push_back(cricket::VideoCodec(kVp8CodecName)); 33 supported_codecs_.push_back(cricket::VideoCodec(kVp8CodecName));
34 if (webrtc::VP9Encoder::IsSupported()) 34 if (webrtc::VP9Encoder::IsSupported())
35 supported_codecs_.push_back(cricket::VideoCodec(kVp9CodecName)); 35 supported_codecs_.push_back(cricket::VideoCodec(kVp9CodecName));
36 if (webrtc::H264Encoder::IsSupported()) { 36 if (webrtc::H264Encoder::IsSupported()) {
37 cricket::VideoCodec codec(kH264CodecName); 37 cricket::VideoCodec codec(kH264CodecName);
38 // TODO(magjed): Move setting these parameters into webrtc::H264Encoder 38 // TODO(magjed): Move setting these parameters into webrtc::H264Encoder
39 // instead. 39 // instead.
40 // TODO(hta): Set FMTP parameters for all codecs of type H264.
41 codec.SetParam(kH264FmtpProfileLevelId, 40 codec.SetParam(kH264FmtpProfileLevelId,
42 kH264ProfileLevelConstrainedBaseline); 41 kH264ProfileLevelConstrainedBaseline);
43 codec.SetParam(kH264FmtpLevelAsymmetryAllowed, "1"); 42 codec.SetParam(kH264FmtpLevelAsymmetryAllowed, "1");
44 codec.SetParam(kH264FmtpPacketizationMode, "1");
45 supported_codecs_.push_back(std::move(codec)); 43 supported_codecs_.push_back(std::move(codec));
46 } 44 }
47 45
48 supported_codecs_.push_back(cricket::VideoCodec(kRedCodecName)); 46 supported_codecs_.push_back(cricket::VideoCodec(kRedCodecName));
49 supported_codecs_.push_back(cricket::VideoCodec(kUlpfecCodecName)); 47 supported_codecs_.push_back(cricket::VideoCodec(kUlpfecCodecName));
50 48
51 if (IsFlexfecFieldTrialEnabled()) { 49 if (IsFlexfecFieldTrialEnabled()) {
52 cricket::VideoCodec flexfec_codec(kFlexfecCodecName); 50 cricket::VideoCodec flexfec_codec(kFlexfecCodecName);
53 // This value is currently arbitrarily set to 10 seconds. (The unit 51 // This value is currently arbitrarily set to 10 seconds. (The unit
54 // is microseconds.) This parameter MUST be present in the SDP, but 52 // is microseconds.) This parameter MUST be present in the SDP, but
(...skipping 28 matching lines...) Expand all
83 InternalEncoderFactory::supported_codecs() const { 81 InternalEncoderFactory::supported_codecs() const {
84 return supported_codecs_; 82 return supported_codecs_;
85 } 83 }
86 84
87 void InternalEncoderFactory::DestroyVideoEncoder( 85 void InternalEncoderFactory::DestroyVideoEncoder(
88 webrtc::VideoEncoder* encoder) { 86 webrtc::VideoEncoder* encoder) {
89 delete encoder; 87 delete encoder;
90 } 88 }
91 89
92 } // namespace cricket 90 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/codec.cc ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698