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

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

Issue 2001533003: Refactoring: Hide VideoCodec.codecSpecific as "private" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use initializers instead of memset 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
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
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 codec.codecType = kVideoCodecVP8; 120 codec.codecType = kVideoCodecVP8;
121 } else if (decoder.payload_name == "VP9") { 121 } else if (decoder.payload_name == "VP9") {
122 codec.codecType = kVideoCodecVP9; 122 codec.codecType = kVideoCodecVP9;
123 } else if (decoder.payload_name == "H264") { 123 } else if (decoder.payload_name == "H264") {
124 codec.codecType = kVideoCodecH264; 124 codec.codecType = kVideoCodecH264;
125 } else { 125 } else {
126 codec.codecType = kVideoCodecGeneric; 126 codec.codecType = kVideoCodecGeneric;
127 } 127 }
128 128
129 if (codec.codecType == kVideoCodecVP8) { 129 if (codec.codecType == kVideoCodecVP8) {
130 codec.codecSpecific.VP8 = VideoEncoder::GetDefaultVp8Settings(); 130 *(codec.VP8()) = VideoEncoder::GetDefaultVp8Settings();
131 } else if (codec.codecType == kVideoCodecVP9) { 131 } else if (codec.codecType == kVideoCodecVP9) {
132 codec.codecSpecific.VP9 = VideoEncoder::GetDefaultVp9Settings(); 132 *(codec.VP9()) = VideoEncoder::GetDefaultVp9Settings();
133 } else if (codec.codecType == kVideoCodecH264) { 133 } else if (codec.codecType == kVideoCodecH264) {
134 codec.codecSpecific.H264 = VideoEncoder::GetDefaultH264Settings(); 134 *(codec.H264()) = VideoEncoder::GetDefaultH264Settings();
135 } 135 }
136 136
137 codec.width = 320; 137 codec.width = 320;
138 codec.height = 180; 138 codec.height = 180;
139 codec.startBitrate = codec.minBitrate = codec.maxBitrate = 139 codec.startBitrate = codec.minBitrate = codec.maxBitrate =
140 Call::Config::kDefaultStartBitrateBps / 1000; 140 Call::Config::kDefaultStartBitrateBps / 1000;
141 141
142 return codec; 142 return codec;
143 } 143 }
144 } // namespace 144 } // namespace
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 const std::vector<uint16_t>& sequence_numbers) { 354 const std::vector<uint16_t>& sequence_numbers) {
355 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers); 355 rtp_stream_receiver_.RequestPacketRetransmit(sequence_numbers);
356 } 356 }
357 357
358 void VideoReceiveStream::RequestKeyFrame() { 358 void VideoReceiveStream::RequestKeyFrame() {
359 rtp_stream_receiver_.RequestKeyFrame(); 359 rtp_stream_receiver_.RequestKeyFrame();
360 } 360 }
361 361
362 } // namespace internal 362 } // namespace internal
363 } // namespace webrtc 363 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698