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

Side by Side Diff: media/cast/cast_config.cc

Issue 225023010: [Cast] Refactor/clean-up VideoReceiver to match AudioReceiver as closely as possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/cast_config.h" 5 #include "media/cast/cast_config.h"
6 6
7 namespace media { 7 namespace media {
8 namespace cast { 8 namespace cast {
9 9
10 // TODO(miu): Revisit code factoring of these structs.
hubbe 2014/04/07 18:40:17 I don't understand this TODO.
miu 2014/04/08 00:59:41 Added detail.
11
12 // TODO(miu): Make sure all POD members are initialized by ctors. Policy
13 // decision: Reasonable defaults or use invalid placeholder values to expose
14 // unset members?
15
16 // TODO(miu): Provide IsValidConfig() functions?
17
18 // TODO(miu): Throughout the code, there is a lot of copy-and-paste of the same
19 // calculations based on these config values. So, why don't we add methods to
20 // these classes to centralize the logic?
21
10 VideoSenderConfig::VideoSenderConfig() 22 VideoSenderConfig::VideoSenderConfig()
11 : sender_ssrc(0), 23 : sender_ssrc(0),
12 incoming_feedback_ssrc(0), 24 incoming_feedback_ssrc(0),
13 rtcp_interval(kDefaultRtcpIntervalMs), 25 rtcp_interval(kDefaultRtcpIntervalMs),
14 rtcp_mode(kRtcpReducedSize), 26 rtcp_mode(kRtcpReducedSize),
15 use_external_encoder(false), 27 use_external_encoder(false),
16 width(0), 28 width(0),
17 height(0), 29 height(0),
18 congestion_control_back_off(kDefaultCongestionControlBackOff), 30 congestion_control_back_off(kDefaultCongestionControlBackOff),
31 max_bitrate(5000000),
32 min_bitrate(1000000),
33 start_bitrate(5000000),
19 max_qp(kDefaultMaxQp), 34 max_qp(kDefaultMaxQp),
20 min_qp(kDefaultMinQp), 35 min_qp(kDefaultMinQp),
21 max_frame_rate(kDefaultMaxFrameRate), 36 max_frame_rate(kDefaultMaxFrameRate),
22 max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers) {} 37 max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers),
38 codec(transport::kVp8),
39 number_of_cores(0) {}
23 40
24 AudioSenderConfig::AudioSenderConfig() 41 AudioSenderConfig::AudioSenderConfig()
25 : sender_ssrc(0), 42 : sender_ssrc(0),
26 incoming_feedback_ssrc(0), 43 incoming_feedback_ssrc(0),
27 rtcp_interval(kDefaultRtcpIntervalMs), 44 rtcp_interval(kDefaultRtcpIntervalMs),
28 rtcp_mode(kRtcpReducedSize), 45 rtcp_mode(kRtcpReducedSize),
29 use_external_encoder(false), 46 use_external_encoder(false),
30 frequency(0), 47 frequency(0),
31 channels(0), 48 channels(0),
32 bitrate(0) {} 49 bitrate(0) {}
(...skipping 11 matching lines...) Expand all
44 61
45 VideoReceiverConfig::VideoReceiverConfig() 62 VideoReceiverConfig::VideoReceiverConfig()
46 : feedback_ssrc(0), 63 : feedback_ssrc(0),
47 incoming_ssrc(0), 64 incoming_ssrc(0),
48 rtcp_interval(kDefaultRtcpIntervalMs), 65 rtcp_interval(kDefaultRtcpIntervalMs),
49 rtcp_mode(kRtcpReducedSize), 66 rtcp_mode(kRtcpReducedSize),
50 rtp_max_delay_ms(kDefaultRtpMaxDelayMs), 67 rtp_max_delay_ms(kDefaultRtpMaxDelayMs),
51 rtp_payload_type(0), 68 rtp_payload_type(0),
52 use_external_decoder(false), 69 use_external_decoder(false),
53 max_frame_rate(kDefaultMaxFrameRate), 70 max_frame_rate(kDefaultMaxFrameRate),
54 decoder_faster_than_max_frame_rate(true) {} 71 decoder_faster_than_max_frame_rate(true),
72 codec(transport::kVp8) {}
55 73
56 PcmAudioFrame::PcmAudioFrame() {} 74 PcmAudioFrame::PcmAudioFrame() {}
57 PcmAudioFrame::~PcmAudioFrame() {} 75 PcmAudioFrame::~PcmAudioFrame() {}
58 76
59 } // namespace cast 77 } // namespace cast
60 } // namespace media 78 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698