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

Unified Diff: webrtc/video_send_stream.h

Issue 1166263004: C++11 in-class member initialization in Call configs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: merge master Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_send_stream.h
diff --git a/webrtc/video_send_stream.h b/webrtc/video_send_stream.h
index 4dc9a6bb4a904abad15333bf0e1c11bea1ebae02..4c4960aa944f66ac7ff0c89ddfcb6a4530b38a7d 100644
--- a/webrtc/video_send_stream.h
+++ b/webrtc/video_send_stream.h
@@ -52,56 +52,38 @@ class VideoSendStream {
};
struct Stats {
- Stats()
- : input_frame_rate(0),
- encode_frame_rate(0),
- avg_encode_time_ms(0),
- encode_usage_percent(0),
- target_media_bitrate_bps(0),
- media_bitrate_bps(0),
- suspended(false) {}
- int input_frame_rate;
- int encode_frame_rate;
- int avg_encode_time_ms;
- int encode_usage_percent;
- int target_media_bitrate_bps;
- int media_bitrate_bps;
- bool suspended;
+ int input_frame_rate = 0;
+ int encode_frame_rate = 0;
+ int avg_encode_time_ms = 0;
+ int encode_usage_percent = 0;
+ int target_media_bitrate_bps = 0;
+ int media_bitrate_bps = 0;
+ bool suspended = false;
std::map<uint32_t, StreamStats> substreams;
};
struct Config {
- Config()
- : pre_encode_callback(NULL),
- post_encode_callback(NULL),
- local_renderer(NULL),
- render_delay_ms(0),
- target_delay_ms(0),
- suspend_below_min_bitrate(false) {}
std::string ToString() const;
struct EncoderSettings {
- EncoderSettings() : payload_type(-1), encoder(NULL) {}
-
std::string ToString() const;
std::string payload_name;
- int payload_type;
+ int payload_type = -1;
// Uninitialized VideoEncoder instance to be used for encoding. Will be
// initialized from inside the VideoSendStream.
- VideoEncoder* encoder;
+ VideoEncoder* encoder = nullptr;
} encoder_settings;
static const size_t kDefaultMaxPacketSize = 1500 - 40; // TCP over IPv4.
struct Rtp {
- Rtp() : max_packet_size(kDefaultMaxPacketSize) {}
std::string ToString() const;
std::vector<uint32_t> ssrcs;
// Max RTP packet size delivered to send transport from VideoEngine.
- size_t max_packet_size;
+ size_t max_packet_size = kDefaultMaxPacketSize;
// RTP header extensions to use for this send stream.
std::vector<RtpExtension> extensions;
@@ -115,13 +97,12 @@ class VideoSendStream {
// Settings for RTP retransmission payload format, see RFC 4588 for
// details.
struct Rtx {
- Rtx() : payload_type(-1) {}
std::string ToString() const;
// SSRCs to use for the RTX streams.
std::vector<uint32_t> ssrcs;
// Payload type to use for the RTX stream.
- int payload_type;
+ int payload_type = -1;
} rtx;
// RTCP CNAME, see RFC 3550.
@@ -129,30 +110,30 @@ class VideoSendStream {
} rtp;
// Called for each I420 frame before encoding the frame. Can be used for
- // effects, snapshots etc. 'NULL' disables the callback.
- I420FrameCallback* pre_encode_callback;
+ // effects, snapshots etc. 'nullptr' disables the callback.
+ I420FrameCallback* pre_encode_callback = nullptr;
- // Called for each encoded frame, e.g. used for file storage. 'NULL'
+ // Called for each encoded frame, e.g. used for file storage. 'nullptr'
// disables the callback.
- EncodedFrameObserver* post_encode_callback;
+ EncodedFrameObserver* post_encode_callback = nullptr;
// Renderer for local preview. The local renderer will be called even if
- // sending hasn't started. 'NULL' disables local rendering.
- VideoRenderer* local_renderer;
+ // sending hasn't started. 'nullptr' disables local rendering.
+ VideoRenderer* local_renderer = nullptr;
// Expected delay needed by the renderer, i.e. the frame will be delivered
// this many milliseconds, if possible, earlier than expected render time.
// Only valid if |local_renderer| is set.
- int render_delay_ms;
+ int render_delay_ms = 0;
// Target delay in milliseconds. A positive value indicates this stream is
// used for streaming instead of a real-time call.
- int target_delay_ms;
+ int target_delay_ms = 0;
// True if the stream should be suspended when the available bitrate fall
// below the minimum configured bitrate. If this variable is false, the
// stream may send at a rate higher than the estimated available bitrate.
- bool suspend_below_min_bitrate;
+ bool suspend_below_min_bitrate = false;
};
// Gets interface used to insert captured frames. Valid as long as the
« no previous file with comments | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698