| OLD | NEW | 
|---|
| 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 | 
|  | 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. | 
|  | 13 | 
|  | 14 // TODO(miu): Make sure all POD members are initialized by ctors.  Policy | 
|  | 15 // decision: Reasonable defaults or use invalid placeholder values to expose | 
|  | 16 // unset members? | 
|  | 17 | 
|  | 18 // TODO(miu): Provide IsValidConfig() functions? | 
|  | 19 | 
|  | 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 | 
|  | 22 // these classes to centralize the logic? | 
|  | 23 | 
| 10 VideoSenderConfig::VideoSenderConfig() | 24 VideoSenderConfig::VideoSenderConfig() | 
| 11     : sender_ssrc(0), | 25     : sender_ssrc(0), | 
| 12       incoming_feedback_ssrc(0), | 26       incoming_feedback_ssrc(0), | 
| 13       rtcp_interval(kDefaultRtcpIntervalMs), | 27       rtcp_interval(kDefaultRtcpIntervalMs), | 
| 14       rtcp_mode(kRtcpReducedSize), | 28       rtcp_mode(kRtcpReducedSize), | 
| 15       use_external_encoder(false), | 29       use_external_encoder(false), | 
| 16       width(0), | 30       width(0), | 
| 17       height(0), | 31       height(0), | 
| 18       congestion_control_back_off(kDefaultCongestionControlBackOff), | 32       congestion_control_back_off(kDefaultCongestionControlBackOff), | 
|  | 33       max_bitrate(5000000), | 
|  | 34       min_bitrate(1000000), | 
|  | 35       start_bitrate(5000000), | 
| 19       max_qp(kDefaultMaxQp), | 36       max_qp(kDefaultMaxQp), | 
| 20       min_qp(kDefaultMinQp), | 37       min_qp(kDefaultMinQp), | 
| 21       max_frame_rate(kDefaultMaxFrameRate), | 38       max_frame_rate(kDefaultMaxFrameRate), | 
| 22       max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers) {} | 39       max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers), | 
|  | 40       codec(transport::kVp8), | 
|  | 41       number_of_cores(0) {} | 
| 23 | 42 | 
| 24 AudioSenderConfig::AudioSenderConfig() | 43 AudioSenderConfig::AudioSenderConfig() | 
| 25     : sender_ssrc(0), | 44     : sender_ssrc(0), | 
| 26       incoming_feedback_ssrc(0), | 45       incoming_feedback_ssrc(0), | 
| 27       rtcp_interval(kDefaultRtcpIntervalMs), | 46       rtcp_interval(kDefaultRtcpIntervalMs), | 
| 28       rtcp_mode(kRtcpReducedSize), | 47       rtcp_mode(kRtcpReducedSize), | 
| 29       use_external_encoder(false), | 48       use_external_encoder(false), | 
| 30       frequency(0), | 49       frequency(0), | 
| 31       channels(0), | 50       channels(0), | 
| 32       bitrate(0) {} | 51       bitrate(0) {} | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 44 | 63 | 
| 45 VideoReceiverConfig::VideoReceiverConfig() | 64 VideoReceiverConfig::VideoReceiverConfig() | 
| 46     : feedback_ssrc(0), | 65     : feedback_ssrc(0), | 
| 47       incoming_ssrc(0), | 66       incoming_ssrc(0), | 
| 48       rtcp_interval(kDefaultRtcpIntervalMs), | 67       rtcp_interval(kDefaultRtcpIntervalMs), | 
| 49       rtcp_mode(kRtcpReducedSize), | 68       rtcp_mode(kRtcpReducedSize), | 
| 50       rtp_max_delay_ms(kDefaultRtpMaxDelayMs), | 69       rtp_max_delay_ms(kDefaultRtpMaxDelayMs), | 
| 51       rtp_payload_type(0), | 70       rtp_payload_type(0), | 
| 52       use_external_decoder(false), | 71       use_external_decoder(false), | 
| 53       max_frame_rate(kDefaultMaxFrameRate), | 72       max_frame_rate(kDefaultMaxFrameRate), | 
| 54       decoder_faster_than_max_frame_rate(true) {} | 73       decoder_faster_than_max_frame_rate(true), | 
|  | 74       codec(transport::kVp8) {} | 
| 55 | 75 | 
| 56 }  // namespace cast | 76 }  // namespace cast | 
| 57 }  // namespace media | 77 }  // namespace media | 
| OLD | NEW | 
|---|