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/modules/rtp_rtcp/source/rtp_receiver_impl.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <math.h> | 14 #include <math.h> |
15 #include <stdlib.h> | 15 #include <stdlib.h> |
16 #include <string.h> | 16 #include <string.h> |
17 | 17 |
18 #include <set> | 18 #include <set> |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
| 21 #include "webrtc/base/logging.h" |
21 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
22 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 23 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 24 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
24 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" | 25 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h" |
25 #include "webrtc/rtc_base/logging.h" | |
26 | 26 |
27 namespace webrtc { | 27 namespace webrtc { |
28 | 28 |
29 using RtpUtility::Payload; | 29 using RtpUtility::Payload; |
30 | 30 |
31 // Only return the sources in the last 10 seconds. | 31 // Only return the sources in the last 10 seconds. |
32 const int64_t kGetSourcesTimeoutMs = 10000; | 32 const int64_t kGetSourcesTimeoutMs = 10000; |
33 | 33 |
34 RtpReceiver* RtpReceiver::CreateVideoReceiver( | 34 RtpReceiver* RtpReceiver::CreateVideoReceiver( |
35 Clock* clock, | 35 Clock* clock, |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 for (vec_it = ssrc_sources_.begin(); vec_it != ssrc_sources_.end(); | 544 for (vec_it = ssrc_sources_.begin(); vec_it != ssrc_sources_.end(); |
545 ++vec_it) { | 545 ++vec_it) { |
546 if ((now_ms - vec_it->timestamp_ms()) <= kGetSourcesTimeoutMs) { | 546 if ((now_ms - vec_it->timestamp_ms()) <= kGetSourcesTimeoutMs) { |
547 break; | 547 break; |
548 } | 548 } |
549 } | 549 } |
550 ssrc_sources_.erase(ssrc_sources_.begin(), vec_it); | 550 ssrc_sources_.erase(ssrc_sources_.begin(), vec_it); |
551 } | 551 } |
552 | 552 |
553 } // namespace webrtc | 553 } // namespace webrtc |
OLD | NEW |