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

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

Issue 1788583004: Enable setting the maximum bitrate limit in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed support for bitrate limits for audio streams; corrected code review issues Created 4 years, 9 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
Index: webrtc/media/engine/webrtcvideoengine2.h
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
index ccf753e9fc663bb6cec50bc7ea364b08df80adbf..b09f632bc6eee94af5795b784794093dfd77750b 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -145,6 +145,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool SetSendParameters(const VideoSendParameters& params) override;
bool SetRecvParameters(const VideoRecvParameters& params) override;
+ webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const override;
+ bool SetRtpParameters(uint32_t ssrc,
+ const webrtc::RtpParameters& parameters) override;
bool GetSendCodec(VideoCodec* send_codec) override;
bool SetSend(bool send) override;
bool SetVideoSend(uint32_t ssrc,
@@ -245,6 +248,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
void SetOptions(const VideoOptions& options);
// TODO(pbos): Move logic from SetOptions into this method.
void SetSendParameters(const ChangedSendParameters& send_params);
+ bool SetRtpParameters(const webrtc::RtpParameters& parameters);
void OnFrame(const cricket::VideoFrame& frame) override;
bool SetCapturer(VideoCapturer* capturer);
@@ -254,6 +258,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
void Start();
void Stop();
+ webrtc::RtpParameters rtp_parameters() const { return rtp_parameters_; }
+
// Implements webrtc::LoadObserver.
void OnLoadUpdate(Load load) override;
@@ -338,6 +344,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
const VideoCodec& codec) const EXCLUSIVE_LOCKS_REQUIRED(lock_);
void SetDimensions(int width, int height)
EXCLUSIVE_LOCKS_REQUIRED(lock_);
+ bool ValidateRtpParameters(const webrtc::RtpParameters& parameters);
+ void ApplyBitrateLimit(int max_bitrate_bps) EXCLUSIVE_LOCKS_REQUIRED(lock_);
rtc::ThreadChecker thread_checker_;
rtc::AsyncInvoker invoker_;
@@ -376,6 +384,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
// The timestamp of the last frame received
// Used to generate timestamp for the black frame when capturer is removed
int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_);
+
+ webrtc::RtpParameters rtp_parameters_;
+ int global_max_bitrate_;
pthatcher1 2016/03/16 00:48:42 We have: parameters_; rtp_parameters_; global_max
skvlad 2016/03/16 02:29:22 Done.
};
// Wrapper for the receiver part, contains configs etc. that are needed to

Powered by Google App Engine
This is Rietveld 408576698