Changes to RenderFrameProxy:
[chromium-blink-merge.git] / media / cast / cast_config.cc
blobf74121632c5dd1bf3cf514e77290732b3edaec86
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
3 // found in the LICENSE file.
5 #include "media/cast/cast_config.h"
7 namespace media {
8 namespace cast {
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.
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?
18 // TODO(miu): Provide IsValidConfig() functions?
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?
24 VideoSenderConfig::VideoSenderConfig()
25 : ssrc(0),
26 incoming_feedback_ssrc(0),
27 rtcp_interval(kDefaultRtcpIntervalMs),
28 rtcp_mode(kRtcpReducedSize),
29 target_playout_delay(
30 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)),
31 rtp_payload_type(0),
32 use_external_encoder(false),
33 width(0),
34 height(0),
35 congestion_control_back_off(kDefaultCongestionControlBackOff),
36 max_bitrate(5000000),
37 min_bitrate(1000000),
38 start_bitrate(5000000),
39 max_qp(kDefaultMaxQp),
40 min_qp(kDefaultMinQp),
41 max_frame_rate(kDefaultMaxFrameRate),
42 max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers),
43 codec(CODEC_VIDEO_VP8),
44 number_of_encode_threads(1) {}
46 VideoSenderConfig::~VideoSenderConfig() {}
48 AudioSenderConfig::AudioSenderConfig()
49 : ssrc(0),
50 incoming_feedback_ssrc(0),
51 rtcp_interval(kDefaultRtcpIntervalMs),
52 rtcp_mode(kRtcpReducedSize),
53 target_playout_delay(
54 base::TimeDelta::FromMilliseconds(kDefaultRtpMaxDelayMs)),
55 rtp_payload_type(0),
56 use_external_encoder(false),
57 frequency(0),
58 channels(0),
59 bitrate(0),
60 codec(CODEC_AUDIO_OPUS) {}
62 AudioSenderConfig::~AudioSenderConfig() {}
64 FrameReceiverConfig::FrameReceiverConfig()
65 : feedback_ssrc(0),
66 incoming_ssrc(0),
67 rtcp_interval(kDefaultRtcpIntervalMs),
68 rtcp_mode(kRtcpReducedSize),
69 rtp_max_delay_ms(kDefaultRtpMaxDelayMs),
70 rtp_payload_type(0),
71 frequency(0),
72 channels(0),
73 max_frame_rate(0),
74 codec(CODEC_UNKNOWN) {}
76 FrameReceiverConfig::~FrameReceiverConfig() {}
78 } // namespace cast
79 } // namespace media