X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmedia%2Fcast%2Fcast_config.cc;h=c4702697751c12c167fa6c61fd7bd867ad2ffb2d;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=85231407ad4fa915b58e40c0206e85bcd9516acf;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/media/cast/cast_config.cc b/src/media/cast/cast_config.cc index 8523140..c470269 100644 --- a/src/media/cast/cast_config.cc +++ b/src/media/cast/cast_config.cc @@ -7,23 +7,40 @@ namespace media { namespace cast { +// TODO(miu): Revisit code factoring of these structs. There are a number of +// common elements between them all, so it might be reasonable to only have one +// or two structs; or, at least a common base class. + +// TODO(miu): Make sure all POD members are initialized by ctors. Policy +// decision: Reasonable defaults or use invalid placeholder values to expose +// unset members? + +// TODO(miu): Provide IsValidConfig() functions? + +// TODO(miu): Throughout the code, there is a lot of copy-and-paste of the same +// calculations based on these config values. So, why don't we add methods to +// these classes to centralize the logic? + VideoSenderConfig::VideoSenderConfig() - : sender_ssrc(0), - incoming_feedback_ssrc(0), + : incoming_feedback_ssrc(0), rtcp_interval(kDefaultRtcpIntervalMs), rtcp_mode(kRtcpReducedSize), use_external_encoder(false), width(0), height(0), congestion_control_back_off(kDefaultCongestionControlBackOff), + max_bitrate(5000000), + min_bitrate(1000000), + start_bitrate(5000000), max_qp(kDefaultMaxQp), min_qp(kDefaultMinQp), max_frame_rate(kDefaultMaxFrameRate), - max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers) {} + max_number_of_video_buffers_used(kDefaultNumberOfVideoBuffers), + codec(transport::kVp8), + number_of_encode_threads(1) {} AudioSenderConfig::AudioSenderConfig() - : sender_ssrc(0), - incoming_feedback_ssrc(0), + : incoming_feedback_ssrc(0), rtcp_interval(kDefaultRtcpIntervalMs), rtcp_mode(kRtcpReducedSize), use_external_encoder(false), @@ -51,10 +68,8 @@ VideoReceiverConfig::VideoReceiverConfig() rtp_payload_type(0), use_external_decoder(false), max_frame_rate(kDefaultMaxFrameRate), - decoder_faster_than_max_frame_rate(true) {} - -PcmAudioFrame::PcmAudioFrame() {} -PcmAudioFrame::~PcmAudioFrame() {} + decoder_faster_than_max_frame_rate(true), + codec(transport::kVp8) {} } // namespace cast } // namespace media