OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_CALL_CALL_H_ | 10 #ifndef WEBRTC_CALL_CALL_H_ |
11 #define WEBRTC_CALL_CALL_H_ | 11 #define WEBRTC_CALL_CALL_H_ |
12 | 12 |
13 #include <algorithm> | |
13 #include <memory> | 14 #include <memory> |
14 #include <string> | 15 #include <string> |
15 #include <vector> | 16 #include <vector> |
16 | 17 |
17 #include "webrtc/api/rtcerror.h" | 18 #include "webrtc/api/rtcerror.h" |
18 #include "webrtc/base/networkroute.h" | 19 #include "webrtc/base/networkroute.h" |
19 #include "webrtc/base/platform_file.h" | 20 #include "webrtc/base/platform_file.h" |
20 #include "webrtc/base/socket.h" | 21 #include "webrtc/base/socket.h" |
21 #include "webrtc/call/audio_receive_stream.h" | 22 #include "webrtc/call/audio_receive_stream.h" |
22 #include "webrtc/call/audio_send_stream.h" | 23 #include "webrtc/call/audio_send_stream.h" |
23 #include "webrtc/call/audio_state.h" | 24 #include "webrtc/call/audio_state.h" |
24 #include "webrtc/call/flexfec_receive_stream.h" | 25 #include "webrtc/call/flexfec_receive_stream.h" |
25 #include "webrtc/call/rtp_transport_controller_send_interface.h" | 26 #include "webrtc/call/rtp_transport_controller_send_interface.h" |
26 #include "webrtc/common_types.h" | 27 #include "webrtc/common_types.h" |
27 #include "webrtc/video_receive_stream.h" | 28 #include "webrtc/video_receive_stream.h" |
28 #include "webrtc/video_send_stream.h" | 29 #include "webrtc/video_send_stream.h" |
29 | 30 |
30 namespace webrtc { | 31 namespace webrtc { |
31 | 32 |
32 class AudioProcessing; | 33 class AudioProcessing; |
33 class RtcEventLog; | 34 class RtcEventLog; |
34 | 35 |
35 enum class MediaType { | 36 enum class MediaType { |
36 ANY, | 37 ANY, |
37 AUDIO, | 38 AUDIO, |
38 VIDEO, | 39 VIDEO, |
39 DATA | 40 DATA |
40 }; | 41 }; |
41 | 42 |
43 template <typename T> | |
44 static T MinPositive(T a, T b) { | |
Taylor Brandstetter
2017/06/09 17:43:58
As long as we're moving this, can we add a comment
holmer
2017/06/12 11:46:56
+1
| |
45 if (a <= 0) { | |
46 return b; | |
47 } | |
48 if (b <= 0) { | |
49 return a; | |
50 } | |
51 return std::min(a, b); | |
52 } | |
53 | |
42 class PacketReceiver { | 54 class PacketReceiver { |
43 public: | 55 public: |
44 enum DeliveryStatus { | 56 enum DeliveryStatus { |
45 DELIVERY_OK, | 57 DELIVERY_OK, |
46 DELIVERY_UNKNOWN_SSRC, | 58 DELIVERY_UNKNOWN_SSRC, |
47 DELIVERY_PACKET_ERROR, | 59 DELIVERY_PACKET_ERROR, |
48 }; | 60 }; |
49 | 61 |
50 virtual DeliveryStatus DeliverPacket(MediaType media_type, | 62 virtual DeliveryStatus DeliverPacket(MediaType media_type, |
51 const uint8_t* packet, | 63 const uint8_t* packet, |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 const rtc::NetworkRoute& network_route) = 0; | 196 const rtc::NetworkRoute& network_route) = 0; |
185 | 197 |
186 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; | 198 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; |
187 | 199 |
188 virtual ~Call() {} | 200 virtual ~Call() {} |
189 }; | 201 }; |
190 | 202 |
191 } // namespace webrtc | 203 } // namespace webrtc |
192 | 204 |
193 #endif // WEBRTC_CALL_CALL_H_ | 205 #endif // WEBRTC_CALL_CALL_H_ |
OLD | NEW |