OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #include "webrtc/media/base/rtpdataengine.h" | 11 #include "webrtc/media/base/rtpdataengine.h" |
12 | 12 |
13 #include "webrtc/base/buffer.h" | 13 #include "webrtc/base/buffer.h" |
14 #include "webrtc/base/helpers.h" | 14 #include "webrtc/base/helpers.h" |
15 #include "webrtc/base/logging.h" | 15 #include "webrtc/base/logging.h" |
16 #include "webrtc/base/ratelimiter.h" | 16 #include "webrtc/base/ratelimiter.h" |
17 #include "webrtc/base/timing.h" | 17 #include "webrtc/base/timing.h" |
18 #include "webrtc/media/base/codec.h" | 18 #include "webrtc/media/base/codec.h" |
19 #include "webrtc/media/base/constants.h" | 19 #include "webrtc/media/base/mediaconstants.h" |
20 #include "webrtc/media/base/rtputils.h" | 20 #include "webrtc/media/base/rtputils.h" |
21 #include "webrtc/media/base/streamparams.h" | 21 #include "webrtc/media/base/streamparams.h" |
22 | 22 |
23 namespace cricket { | 23 namespace cricket { |
24 | 24 |
25 // We want to avoid IP fragmentation. | 25 // We want to avoid IP fragmentation. |
26 static const size_t kDataMaxRtpPacketLen = 1200U; | 26 static const size_t kDataMaxRtpPacketLen = 1200U; |
27 // We reserve space after the RTP header for future wiggle room. | 27 // We reserve space after the RTP header for future wiggle room. |
28 static const unsigned char kReservedSpace[] = { | 28 static const unsigned char kReservedSpace[] = { |
29 0x00, 0x00, 0x00, 0x00 | 29 0x00, 0x00, 0x00, 0x00 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 MediaChannel::SendPacket(&packet, rtc::PacketOptions()); | 345 MediaChannel::SendPacket(&packet, rtc::PacketOptions()); |
346 send_limiter_->Use(packet_len, now); | 346 send_limiter_->Use(packet_len, now); |
347 if (result) { | 347 if (result) { |
348 *result = SDR_SUCCESS; | 348 *result = SDR_SUCCESS; |
349 } | 349 } |
350 return true; | 350 return true; |
351 } | 351 } |
352 | 352 |
353 } // namespace cricket | 353 } // namespace cricket |
OLD | NEW |