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

Side by Side Diff: webrtc/video/video_receive_stream.cc

Issue 2529153002: Reland of Add H264 profile to webrtc::VideoCodecH264 and webrtc::VideoPayload (Closed)
Patch Set: Set profile information in CreatePayloadType for video. 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/modules/video_coding/codec_database.cc ('k') | no next file » | 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #include "webrtc/video/video_receive_stream.h" 11 #include "webrtc/video/video_receive_stream.h"
12 12
13 #include <stdlib.h> 13 #include <stdlib.h>
14 14
15 #include <set> 15 #include <set>
16 #include <string> 16 #include <string>
17 #include <utility> 17 #include <utility>
18 18
19 #include "webrtc/base/checks.h" 19 #include "webrtc/base/checks.h"
20 #include "webrtc/base/logging.h" 20 #include "webrtc/base/logging.h"
21 #include "webrtc/base/optional.h" 21 #include "webrtc/base/optional.h"
22 #include "webrtc/common_video/h264/profile_level_id.h"
22 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 23 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
23 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" 24 #include "webrtc/modules/congestion_controller/include/congestion_controller.h"
24 #include "webrtc/modules/utility/include/process_thread.h" 25 #include "webrtc/modules/utility/include/process_thread.h"
25 #include "webrtc/modules/video_coding/frame_object.h" 26 #include "webrtc/modules/video_coding/frame_object.h"
26 #include "webrtc/modules/video_coding/include/video_coding.h" 27 #include "webrtc/modules/video_coding/include/video_coding.h"
27 #include "webrtc/modules/video_coding/jitter_estimator.h" 28 #include "webrtc/modules/video_coding/jitter_estimator.h"
28 #include "webrtc/modules/video_coding/timing.h" 29 #include "webrtc/modules/video_coding/timing.h"
29 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" 30 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h"
30 #include "webrtc/system_wrappers/include/clock.h" 31 #include "webrtc/system_wrappers/include/clock.h"
31 #include "webrtc/system_wrappers/include/field_trial.h" 32 #include "webrtc/system_wrappers/include/field_trial.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } else { 163 } else {
163 codec.codecType = kVideoCodecGeneric; 164 codec.codecType = kVideoCodecGeneric;
164 } 165 }
165 166
166 if (codec.codecType == kVideoCodecVP8) { 167 if (codec.codecType == kVideoCodecVP8) {
167 *(codec.VP8()) = VideoEncoder::GetDefaultVp8Settings(); 168 *(codec.VP8()) = VideoEncoder::GetDefaultVp8Settings();
168 } else if (codec.codecType == kVideoCodecVP9) { 169 } else if (codec.codecType == kVideoCodecVP9) {
169 *(codec.VP9()) = VideoEncoder::GetDefaultVp9Settings(); 170 *(codec.VP9()) = VideoEncoder::GetDefaultVp9Settings();
170 } else if (codec.codecType == kVideoCodecH264) { 171 } else if (codec.codecType == kVideoCodecH264) {
171 *(codec.H264()) = VideoEncoder::GetDefaultH264Settings(); 172 *(codec.H264()) = VideoEncoder::GetDefaultH264Settings();
173 codec.H264()->profile =
174 H264::ParseSdpProfileLevelId(decoder.codec_params)->profile;
172 } 175 }
173 176
174 codec.width = 320; 177 codec.width = 320;
175 codec.height = 180; 178 codec.height = 180;
176 const int kDefaultStartBitrate = 300; 179 const int kDefaultStartBitrate = 300;
177 codec.startBitrate = codec.minBitrate = codec.maxBitrate = 180 codec.startBitrate = codec.minBitrate = codec.maxBitrate =
178 kDefaultStartBitrate; 181 kDefaultStartBitrate;
179 182
180 return codec; 183 return codec;
181 } 184 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 RequestKeyFrame(); 485 RequestKeyFrame();
483 } 486 }
484 } 487 }
485 488
486 void VideoReceiveStream::RequestKeyFrame() { 489 void VideoReceiveStream::RequestKeyFrame() {
487 rtp_stream_receiver_.RequestKeyFrame(); 490 rtp_stream_receiver_.RequestKeyFrame();
488 } 491 }
489 492
490 } // namespace internal 493 } // namespace internal
491 } // namespace webrtc 494 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698