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