diff --git a/webrtc/video_engine/new_include/common.h b/webrtc/video_engine/new_include/common.h index 799ea9ad2..ca35ecec4 100644 --- a/webrtc/video_engine/new_include/common.h +++ b/webrtc/video_engine/new_include/common.h @@ -63,6 +63,11 @@ class Transport { }; struct RtpStatistics { + RtpStatistics() + : ssrc(0), + fraction_loss(0), + cumulative_loss(0), + extended_max_sequence_number(0) {} uint32_t ssrc; int fraction_loss; int cumulative_loss; @@ -70,7 +75,7 @@ struct RtpStatistics { std::string c_name; }; -// RTCP mode to use. Compound mode is described by RFC 4585 and reduced sized +// RTCP mode to use. Compound mode is described by RFC 4585 and reduced-size // RTCP mode is described by RFC 5506. enum RtcpMode { kRtcpCompound, @@ -79,16 +84,18 @@ enum RtcpMode { // Settings for NACK, see RFC 4585 for details. struct NackConfig { + NackConfig() : rtp_history_ms(0) {} // Send side: the time RTP packets are stored for retransmissions. // Receive side: the time the receiver is prepared to wait for // retransmissions. - // Set to '0' to disable + // Set to '0' to disable. int rtp_history_ms; }; // Settings for forward error correction, see RFC 5109 for details. Set the // payload types to '-1' to disable. struct FecConfig { + FecConfig() : ulpfec_payload_type(-1), red_payload_type(-1) {} // Payload type used for ULPFEC packets. int ulpfec_payload_type; @@ -98,7 +105,8 @@ struct FecConfig { // Settings for RTP retransmission payload format, see RFC 4588 for details. struct RtxConfig { - // SSRC to use for the RTX stream, set to '0' for a random generated SSRC. + RtxConfig() : ssrc(0), rtx_payload_type(0), video_payload_type(0) {} + // SSRC to use for the RTX stream. uint32_t ssrc; // Payload type to use for the RTX stream. @@ -110,6 +118,7 @@ struct RtxConfig { // RTP header extension to use for the video stream, see RFC 5285. struct RtpExtension { + RtpExtension() : id(0) {} // TODO(mflodman) Add API to query supported extensions. std::string name; int id; diff --git a/webrtc/video_engine/new_include/video_receive_stream.h b/webrtc/video_engine/new_include/video_receive_stream.h index 668628308..a23b6b646 100644 --- a/webrtc/video_engine/new_include/video_receive_stream.h +++ b/webrtc/video_engine/new_include/video_receive_stream.h @@ -41,6 +41,7 @@ struct ReceiveStatistics { // Receive stream specific RTP settings. struct RtpReceiveConfig { + RtpReceiveConfig() : ssrc(0), nack(NULL), fec(NULL) {} // TODO(mflodman) Do we require a set ssrc? What happens if the ssrc changes? uint32_t ssrc; @@ -60,6 +61,8 @@ struct RtpReceiveConfig { // TODO(mflodman) Move all these settings to VideoDecoder and move the // declaration to common_types.h. struct ExternalVideoDecoder { + ExternalVideoDecoder() + : decoder(NULL), payload_type(0), renderer(false), expected_delay_ms(0) {} // The actual decoder. VideoDecoder* decoder; @@ -78,6 +81,13 @@ struct ExternalVideoDecoder { }; struct VideoReceiveStreamConfig { + VideoReceiveStreamConfig() + : renderer(NULL), + render_delay_ms(0), + audio_channel_id(0), + pre_decode_callback(NULL), + post_decode_callback(NULL), + target_delay_ms(0) {} // Codecs the receive stream std::vector codecs; diff --git a/webrtc/video_engine/new_include/video_send_stream.h b/webrtc/video_engine/new_include/video_send_stream.h index 04d953c01..7899e9cbe 100644 --- a/webrtc/video_engine/new_include/video_send_stream.h +++ b/webrtc/video_engine/new_include/video_send_stream.h @@ -27,6 +27,17 @@ namespace newapi { struct SendStreamState; struct SendStatistics { + SendStatistics() + : input_frame_rate(0), + encode_frame(0), + key_frames(0), + delta_frames(0), + video_packets(0), + retransmitted_packets(0), + fec_packets(0), + padding_packets(0), + send_bitrate_bps(0), + delay_ms(0) {} RtpStatistics rtp; int input_frame_rate; int encode_frame; @@ -53,6 +64,12 @@ class VideoSendStreamInput { }; struct RtpSendConfig { + RtpSendConfig() + : mode(kRtcpReducedSize), + max_packet_size(0), + nack(NULL), + fec(NULL), + rtx(NULL) {} RtcpMode mode; std::vector ssrcs; @@ -77,6 +94,15 @@ struct RtpSendConfig { }; struct VideoSendStreamConfig { + VideoSendStreamConfig() + : pre_encode_callback(NULL), + encoded_callback(NULL), + local_renderer(NULL), + render_delay_ms(0), + encoder(NULL), + internal_source(false), + target_delay_ms(0), + start_state(NULL) {} VideoCodec codec; RtpSendConfig rtp;