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

Side by Side Diff: webrtc/media/base/mediachannel.h

Issue 2924393002: Move MinPositive to call.h (Closed)
Patch Set: Rebase Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/media/engine/webrtcvideoengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
13 13
14 #include <algorithm>
15 #include <memory> 14 #include <memory>
16 #include <string> 15 #include <string>
17 #include <vector> 16 #include <vector>
18 17
19 #include "webrtc/api/rtpparameters.h" 18 #include "webrtc/api/rtpparameters.h"
20 #include "webrtc/base/basictypes.h" 19 #include "webrtc/base/basictypes.h"
21 #include "webrtc/base/buffer.h" 20 #include "webrtc/base/buffer.h"
22 #include "webrtc/base/copyonwritebuffer.h" 21 #include "webrtc/base/copyonwritebuffer.h"
23 #include "webrtc/base/dscp.h" 22 #include "webrtc/base/dscp.h"
24 #include "webrtc/base/logging.h" 23 #include "webrtc/base/logging.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 for (size_t i = 0; i < vals.size(); ++i) { 73 for (size_t i = 0; i < vals.size(); ++i) {
75 if (i > 0) { 74 if (i > 0) {
76 ost << ", "; 75 ost << ", ";
77 } 76 }
78 ost << vals[i].ToString(); 77 ost << vals[i].ToString();
79 } 78 }
80 ost << "]"; 79 ost << "]";
81 return ost.str(); 80 return ost.str();
82 } 81 }
83 82
84 template <typename T>
85 static T MinPositive(T a, T b) {
86 if (a <= 0) {
87 return b;
88 }
89 if (b <= 0) {
90 return a;
91 }
92 return std::min(a, b);
93 }
94
95 // Construction-time settings, passed on when creating 83 // Construction-time settings, passed on when creating
96 // MediaChannels. 84 // MediaChannels.
97 struct MediaConfig { 85 struct MediaConfig {
98 // Set DSCP value on packets. This flag comes from the 86 // Set DSCP value on packets. This flag comes from the
99 // PeerConnection constraint 'googDscp'. 87 // PeerConnection constraint 'googDscp'.
100 bool enable_dscp = false; 88 bool enable_dscp = false;
101 89
102 // Video-specific config. 90 // Video-specific config.
103 struct Video { 91 struct Video {
104 // Enable WebRTC CPU Overuse Detection. This flag comes from the 92 // Enable WebRTC CPU Overuse Detection. This flag comes from the
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 const char*, 1203 const char*,
1216 size_t> SignalDataReceived; 1204 size_t> SignalDataReceived;
1217 // Signal when the media channel is ready to send the stream. Arguments are: 1205 // Signal when the media channel is ready to send the stream. Arguments are:
1218 // writable(bool) 1206 // writable(bool)
1219 sigslot::signal1<bool> SignalReadyToSend; 1207 sigslot::signal1<bool> SignalReadyToSend;
1220 }; 1208 };
1221 1209
1222 } // namespace cricket 1210 } // namespace cricket
1223 1211
1224 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1212 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/media/engine/webrtcvideoengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698