aboutsummaryrefslogtreecommitdiff
path: root/webrtc/call.h
diff options
context:
space:
mode:
authorFredrik Solenberg <solenberg@webrtc.org>2015-06-11 12:38:38 +0200
committerFredrik Solenberg <solenberg@webrtc.org>2015-06-11 10:38:46 +0000
commit78fb3b3f8f8f46e3b5b62c94177713dc05f53947 (patch)
tree182d91e99fc4fe9eb74d8f42a5616f269bab7e42 /webrtc/call.h
parenteb82309d066305e5d8e94ba1f58a4cbdbcb4f9bb (diff)
downloadwebrtc-78fb3b3f8f8f46e3b5b62c94177713dc05f53947.tar.gz
C++11 in-class member initialization in Call configs.
BUG= R=mflodman@webrtc.org, pbos@webrtc.org Review URL: https://codereview.webrtc.org/1166263004. Cr-Commit-Position: refs/heads/master@{#9416}
Diffstat (limited to 'webrtc/call.h')
-rw-r--r--webrtc/call.h43
1 files changed, 16 insertions, 27 deletions
diff --git a/webrtc/call.h b/webrtc/call.h
index ac11794ca2..d1a45c8bab 100644
--- a/webrtc/call.h
+++ b/webrtc/call.h
@@ -73,54 +73,43 @@ class Call {
kNetworkDown,
};
struct Config {
+ Config() = delete;
explicit Config(newapi::Transport* send_transport)
- : send_transport(send_transport),
- voice_engine(NULL),
- overuse_callback(NULL) {}
+ : send_transport(send_transport) {}
static const int kDefaultStartBitrateBps;
// TODO(solenberg): Need to add media type to the interface for outgoing
// packets too.
- newapi::Transport* send_transport;
+ newapi::Transport* send_transport = nullptr;
// VoiceEngine used for audio/video synchronization for this Call.
- VoiceEngine* voice_engine;
+ VoiceEngine* voice_engine = nullptr;
// Callback for overuse and normal usage based on the jitter of incoming
- // captured frames. 'NULL' disables the callback.
- LoadObserver* overuse_callback;
+ // captured frames. 'nullptr' disables the callback.
+ LoadObserver* overuse_callback = nullptr;
// Bitrate config used until valid bitrate estimates are calculated. Also
// used to cap total bitrate used.
struct BitrateConfig {
- BitrateConfig()
- : min_bitrate_bps(0),
- start_bitrate_bps(kDefaultStartBitrateBps),
- max_bitrate_bps(-1) {}
- int min_bitrate_bps;
- int start_bitrate_bps;
- int max_bitrate_bps;
+ int min_bitrate_bps = 0;
+ int start_bitrate_bps = kDefaultStartBitrateBps;
+ int max_bitrate_bps = -1;
} bitrate_config;
struct AudioConfig {
- AudioDeviceModule* audio_device_manager;
- AudioProcessing* audio_processing;
- VoiceEngineObserver* voice_engine_observer;
+ AudioDeviceModule* audio_device_manager = nullptr;
+ AudioProcessing* audio_processing = nullptr;
+ VoiceEngineObserver* voice_engine_observer = nullptr;
} audio_config;
};
struct Stats {
- Stats()
- : send_bandwidth_bps(0),
- recv_bandwidth_bps(0),
- pacer_delay_ms(0),
- rtt_ms(-1) {}
-
- int send_bandwidth_bps;
- int recv_bandwidth_bps;
- int64_t pacer_delay_ms;
- int64_t rtt_ms;
+ int send_bandwidth_bps = 0;
+ int recv_bandwidth_bps = 0;
+ int64_t pacer_delay_ms = 0;
+ int64_t rtt_ms = -1;
};
static Call* Create(const Call::Config& config);