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

Unified Diff: webrtc/media/base/mediachannel.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/base/mediachannel.h
diff --git a/webrtc/media/base/mediachannel.h b/webrtc/media/base/mediachannel.h
index d7aefe54ec4f238b0bb006a83968c69cdc0ab10b..b4a53cda4d7508176a2a7e6ff3df839e9569a8b3 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+#include "webrtc/api/rtpparameters.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/buffer.h"
#include "webrtc/base/dscp.h"
@@ -79,6 +80,17 @@ static std::string VectorToString(const std::vector<T>& vals) {
return ost.str();
}
+template <typename T>
+static T MinPositive(T a, T b) {
+ if (a <= 0) {
+ return b;
+ }
+ if (b <= 0) {
+ return a;
+ }
+ return std::min(a, b);
+}
+
// Construction-time settings, passed to
// MediaControllerInterface::Create, and passed on when creating
// MediaChannels.
@@ -965,6 +977,9 @@ class VideoMediaChannel : public MediaChannel {
virtual bool SetSendParameters(const VideoSendParameters& params) = 0;
virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0;
+ virtual webrtc::RtpParameters GetRtpParameters(uint32_t ssrc) const = 0;
+ virtual bool SetRtpParameters(uint32_t ssrc,
+ const webrtc::RtpParameters& parameters) = 0;
// Gets the currently set codecs/payload types to be used for outgoing media.
virtual bool GetSendCodec(VideoCodec* send_codec) = 0;
// Starts or stops transmission (and potentially capture) of local video.

Powered by Google App Engine
This is Rietveld 408576698