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

Unified Diff: talk/media/webrtc/webrtcvideoengine2.h

Issue 1561073006: Consolidate SetSendParameters into one setter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 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 | « no previous file | talk/media/webrtc/webrtcvideoengine2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2.h
diff --git a/talk/media/webrtc/webrtcvideoengine2.h b/talk/media/webrtc/webrtcvideoengine2.h
index 6bace03c20fdbcf2db835f958ecdd81b81564d7b..b327956aac2f633fcfb315326bef4f5bc6e9684e 100644
--- a/talk/media/webrtc/webrtcvideoengine2.h
+++ b/talk/media/webrtc/webrtcvideoengine2.h
@@ -128,8 +128,6 @@ class WebRtcVideoEngine2 {
virtual void SetExternalEncoderFactory(
WebRtcVideoEncoderFactory* encoder_factory);
- bool EnableTimedRender();
-
bool FindCodec(const VideoCodec& in);
// Check whether the supplied trace should be ignored.
bool ShouldIgnoreTrace(const std::string& trace);
@@ -195,14 +193,32 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
uint32_t GetDefaultSendChannelSsrc() { return default_send_ssrc_; }
private:
+ struct VideoCodecSettings {
+ VideoCodecSettings();
+
+ bool operator==(const VideoCodecSettings& other) const;
+ bool operator!=(const VideoCodecSettings& other) const;
+
+ VideoCodec codec;
+ webrtc::FecConfig fec;
+ int rtx_payload_type;
+ };
+
+ struct ChangedSendParameters {
+ // These optionals are unset if not changed.
+ rtc::Optional<VideoCodecSettings> codec;
+ rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions;
+ rtc::Optional<int> max_bandwidth_bps;
+ rtc::Optional<VideoOptions> options;
+ rtc::Optional<webrtc::RtcpMode> rtcp_mode;
+ };
+ bool GetChangedSendParameters(const VideoSendParameters& params,
+ ChangedSendParameters* changed_params) const;
bool MuteStream(uint32_t ssrc, bool mute);
class WebRtcVideoReceiveStream;
- bool SetSendCodecs(const std::vector<VideoCodec>& codecs);
- bool SetSendRtpHeaderExtensions(
- const std::vector<RtpHeaderExtension>& extensions);
- bool SetMaxSendBandwidth(int bps);
- bool SetOptions(const VideoOptions& options);
+ void SetMaxSendBandwidth(int bps);
+ void SetOptions(const VideoOptions& options);
bool SetRecvCodecs(const std::vector<VideoCodec>& codecs);
bool SetRecvRtpHeaderExtensions(
const std::vector<RtpHeaderExtension>& extensions);
@@ -217,17 +233,6 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
void DeleteReceiveStream(WebRtcVideoReceiveStream* stream)
EXCLUSIVE_LOCKS_REQUIRED(stream_crit_);
- struct VideoCodecSettings {
- VideoCodecSettings();
-
- bool operator==(const VideoCodecSettings& other) const;
- bool operator!=(const VideoCodecSettings& other) const;
-
- VideoCodec codec;
- webrtc::FecConfig fec;
- int rtx_payload_type;
- };
-
static std::string CodecSettingsVectorToString(
const std::vector<VideoCodecSettings>& codecs);
@@ -248,12 +253,8 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
~WebRtcVideoSendStream();
void SetOptions(const VideoOptions& options);
- void SetCodec(const VideoCodecSettings& codec);
- void SetRtpExtensions(
- const std::vector<webrtc::RtpExtension>& rtp_extensions);
- // TODO(deadbeef): Move logic from SetCodec/SetRtpExtensions/etc.
- // into this method. Currently this method only sets the RTCP mode.
- void SetSendParameters(const VideoSendParameters& send_params);
+ // TODO(pbos): Move logic from SetOptions into this method.
+ void SetSendParameters(const ChangedSendParameters& send_params);
void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
bool SetCapturer(VideoCapturer* capturer);
@@ -261,8 +262,6 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
void MuteStream(bool mute);
bool DisconnectCapturer();
- void SetApplyRotation(bool apply_rotation);
-
void Start();
void Stop();
@@ -270,8 +269,6 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
VideoSenderInfo GetVideoSenderInfo();
void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info);
- void SetMaxBitrateBps(int max_bitrate_bps);
-
private:
// Parameters needed to reconstruct the underlying stream.
// webrtc::VideoSendStream doesn't support setting a lot of options on the
@@ -362,6 +359,7 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
rtc::CriticalSection lock_;
webrtc::VideoSendStream* stream_ GUARDED_BY(lock_);
VideoSendStreamParameters parameters_ GUARDED_BY(lock_);
+ bool pending_encoder_reconfiguration_ GUARDED_BY(lock_);
VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_);
AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_);
Dimensions last_dimensions_ GUARDED_BY(lock_);
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698