OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 <stdio.h> | 11 #include <stdio.h> |
12 | 12 |
13 #include "webrtc/base/format_macros.h" | 13 #include "webrtc/base/format_macros.h" |
14 #include "webrtc/base/scoped_ptr.h" | 14 #include "webrtc/base/scoped_ptr.h" |
15 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 15 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
16 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h" | 16 #include "webrtc/modules/remote_bitrate_estimator/tools/bwe_rtp.h" |
17 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" | 17 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
18 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h" | 18 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
19 #include "webrtc/test/rtp_file_reader.h" | 19 #include "webrtc/test/rtp_file_reader.h" |
20 | 20 |
21 class Observer : public webrtc::RemoteBitrateObserver { | 21 class Observer : public webrtc::RemoteBitrateObserver { |
22 public: | 22 public: |
23 explicit Observer(webrtc::Clock* clock) : clock_(clock) {} | 23 explicit Observer(webrtc::Clock* clock) : clock_(clock) {} |
24 | 24 |
25 // Called when a receive channel group has a new bitrate estimate for the | 25 // Called when a receive channel group has a new bitrate estimate for the |
26 // incoming streams. | 26 // incoming streams. |
27 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs, | 27 virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs, |
28 unsigned int bitrate) { | 28 unsigned int bitrate) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 clock.TimeInMilliseconds()); | 104 clock.TimeInMilliseconds()); |
105 printf("Estimator used: %s\n", estimator_used.c_str()); | 105 printf("Estimator used: %s\n", estimator_used.c_str()); |
106 printf("Packets with absolute send time: %d\n", | 106 printf("Packets with absolute send time: %d\n", |
107 abs_send_time_count); | 107 abs_send_time_count); |
108 printf("Packets with timestamp offset: %d\n", | 108 printf("Packets with timestamp offset: %d\n", |
109 ts_offset_count); | 109 ts_offset_count); |
110 printf("Packets with no extension: %d\n", | 110 printf("Packets with no extension: %d\n", |
111 packet_counter - ts_offset_count - abs_send_time_count); | 111 packet_counter - ts_offset_count - abs_send_time_count); |
112 return 0; | 112 return 0; |
113 } | 113 } |
OLD | NEW |