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

Unified Diff: webrtc/media/base/mediachannel.h

Issue 1904063003: Fixing the interaction between codec bitrate limit and "b=AS". (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 bd1185f7220154f950604fa0cbc12c3d724e0441..61ef648b1aa22cf6b204f9c1c2cd58c2c97ba506 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -93,6 +93,17 @@ static T MinPositive(T a, T b) {
return std::min(a, b);
}
+template <typename T>
+static T MinNonNegative(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.
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698