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

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

Issue 1012573002: Remove rtcp_interval from cast_config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « media/cast/cast_config.h ('k') | media/cast/receiver/frame_receiver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. There are a number of 10 // TODO(miu): Revisit code factoring of these structs. There are a number of
11 // common elements between them all, so it might be reasonable to only have one 11 // common elements between them all, so it might be reasonable to only have one
12 // or two structs; or, at least a common base class. 12 // or two structs; or, at least a common base class.
13 13
14 // TODO(miu): Make sure all POD members are initialized by ctors. Policy 14 // TODO(miu): Make sure all POD members are initialized by ctors. Policy
15 // decision: Reasonable defaults or use invalid placeholder values to expose 15 // decision: Reasonable defaults or use invalid placeholder values to expose
16 // unset members? 16 // unset members?
17 17
18 // TODO(miu): Provide IsValidConfig() functions? 18 // TODO(miu): Provide IsValidConfig() functions?
19 19
20 // TODO(miu): Throughout the code, there is a lot of copy-and-paste of the same 20 // TODO(miu): Throughout the code, there is a lot of copy-and-paste of the same
21 // calculations based on these config values. So, why don't we add methods to 21 // calculations based on these config values. So, why don't we add methods to
22 // these classes to centralize the logic? 22 // these classes to centralize the logic?
23 23
24 VideoSenderConfig::VideoSenderConfig() 24 VideoSenderConfig::VideoSenderConfig()
25 : ssrc(0), 25 : ssrc(0),
26 receiver_ssrc(0), 26 receiver_ssrc(0),
27 rtcp_interval(kDefaultRtcpIntervalMs),
28 max_playout_delay( 27 max_playout_delay(
29 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)), 28 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)),
30 rtp_payload_type(0), 29 rtp_payload_type(0),
31 use_external_encoder(false), 30 use_external_encoder(false),
32 congestion_control_back_off(kDefaultCongestionControlBackOff), 31 congestion_control_back_off(kDefaultCongestionControlBackOff),
33 max_bitrate(5000000), 32 max_bitrate(5000000),
34 min_bitrate(1000000), 33 min_bitrate(1000000),
35 start_bitrate(5000000), 34 start_bitrate(5000000),
36 max_qp(kDefaultMaxQp), 35 max_qp(kDefaultMaxQp),
37 min_qp(kDefaultMinQp), 36 min_qp(kDefaultMinQp),
38 max_frame_rate(kDefaultMaxFrameRate), 37 max_frame_rate(kDefaultMaxFrameRate),
39 max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers), 38 max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers),
40 codec(CODEC_VIDEO_VP8), 39 codec(CODEC_VIDEO_VP8),
41 number_of_encode_threads(1) {} 40 number_of_encode_threads(1) {}
42 41
43 VideoSenderConfig::~VideoSenderConfig() {} 42 VideoSenderConfig::~VideoSenderConfig() {}
44 43
45 AudioSenderConfig::AudioSenderConfig() 44 AudioSenderConfig::AudioSenderConfig()
46 : ssrc(0), 45 : ssrc(0),
47 receiver_ssrc(0), 46 receiver_ssrc(0),
48 rtcp_interval(kDefaultRtcpIntervalMs),
49 max_playout_delay( 47 max_playout_delay(
50 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)), 48 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)),
51 rtp_payload_type(0), 49 rtp_payload_type(0),
52 use_external_encoder(false), 50 use_external_encoder(false),
53 frequency(0), 51 frequency(0),
54 channels(0), 52 channels(0),
55 bitrate(0), 53 bitrate(0),
56 codec(CODEC_AUDIO_OPUS) {} 54 codec(CODEC_AUDIO_OPUS) {}
57 55
58 AudioSenderConfig::~AudioSenderConfig() {} 56 AudioSenderConfig::~AudioSenderConfig() {}
59 57
60 FrameReceiverConfig::FrameReceiverConfig() 58 FrameReceiverConfig::FrameReceiverConfig()
61 : receiver_ssrc(0), 59 : receiver_ssrc(0),
62 sender_ssrc(0), 60 sender_ssrc(0),
63 rtcp_interval(kDefaultRtcpIntervalMs),
64 rtp_max_delay_ms(kDefaultRtpMaxDelayMs), 61 rtp_max_delay_ms(kDefaultRtpMaxDelayMs),
65 rtp_payload_type(0), 62 rtp_payload_type(0),
66 rtp_timebase(0), 63 rtp_timebase(0),
67 channels(0), 64 channels(0),
68 target_frame_rate(0), 65 target_frame_rate(0),
69 codec(CODEC_UNKNOWN) {} 66 codec(CODEC_UNKNOWN) {}
70 67
71 FrameReceiverConfig::~FrameReceiverConfig() {} 68 FrameReceiverConfig::~FrameReceiverConfig() {}
72 69
73 } // namespace cast 70 } // namespace cast
74 } // namespace media 71 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_config.h ('k') | media/cast/receiver/frame_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698