summaryrefslogtreecommitdiff
path: root/video_send_stream.h
diff options
context:
space:
mode:
authorpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-06 10:49:19 +0000
committerpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-06-06 10:49:19 +0000
commitbdfcddf7091e92134143e9a2d9ccce908e43979e (patch)
tree67cc1c487386c2b9e2e02e1555b63cd273ccd9f5 /video_send_stream.h
parent64027c58f80f0414cc1a4e48f8e122e6c53b549d (diff)
downloadwebrtc-bdfcddf7091e92134143e9a2d9ccce908e43979e.tar.gz
Make VideoSendStream/VideoReceiveStream configs const.
Benefits of this is that the send config previously had unclear locking requirements, a lock was used to lock parts parts of it while reconfiguring the VideoEncoder. Primary work was splitting out video streams from config as well as encoder_settings as these change on ReconfigureVideoEncoder. Now threading requirements for both member configs are clear (as they are read-only), and encoder_settings doesn't stay in the config as a stale pointer. CreateVideoSendStream now takes video streams separately as well as the encoder_settings pointer, analogous to ReconfigureVideoEncoder. This change required changing so that pacing is silently enabled when using suspend_below_min_bitrate rather than silently setting it. R=henrik.lundin@webrtc.org, mflodman@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org BUG=3260 Review URL: https://webrtc-codereview.appspot.com/20409004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6349 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_send_stream.h')
-rw-r--r--video_send_stream.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/video_send_stream.h b/video_send_stream.h
index e173e3be..b33f3893 100644
--- a/video_send_stream.h
+++ b/video_send_stream.h
@@ -66,8 +66,7 @@ class VideoSendStream {
std::string ToString() const;
struct EncoderSettings {
- EncoderSettings()
- : payload_type(-1), encoder(NULL), encoder_settings(NULL) {}
+ EncoderSettings() : payload_type(-1), encoder(NULL) {}
std::string ToString() const;
std::string payload_name;
@@ -76,13 +75,6 @@ class VideoSendStream {
// Uninitialized VideoEncoder instance to be used for encoding. Will be
// initialized from inside the VideoSendStream.
webrtc::VideoEncoder* encoder;
- // TODO(pbos): Wire up encoder-specific settings.
- // Encoder-specific settings, will be passed to the encoder during
- // initialization.
- void* encoder_settings;
-
- // List of stream settings to encode (resolution, bitrates, framerate).
- std::vector<VideoStream> streams;
} encoder_settings;
static const size_t kDefaultMaxPacketSize = 1500 - 40; // TCP over IPv4.
@@ -155,8 +147,7 @@ class VideoSendStream {
// 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.
- // Enabling suspend_below_min_bitrate will also enable pacing and padding,
- // otherwise, the video will be unable to recover from suspension.
+ // |suspend_below_min_bitrate| requires |pacing| to be enabled as well.
bool suspend_below_min_bitrate;
};
@@ -171,7 +162,7 @@ class VideoSendStream {
// in the config. Encoder settings are passed on to the encoder instance along
// with the VideoStream settings.
virtual bool ReconfigureVideoEncoder(const std::vector<VideoStream>& streams,
- void* encoder_settings) = 0;
+ const void* encoder_settings) = 0;
virtual Stats GetStats() const = 0;