| 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 | 10 |
| 11 #ifndef WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 11 #ifndef WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
| 12 #define WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 12 #define WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
| 13 | 13 |
| 14 #include <map> | 14 #include <map> |
| 15 #include <memory> | 15 #include <memory> |
| 16 #include <string> | 16 #include <string> |
| 17 #include <vector> |
| 17 | 18 |
| 18 #include "webrtc/base/criticalsection.h" | 19 #include "webrtc/base/criticalsection.h" |
| 19 #include "webrtc/base/exp_filter.h" | 20 #include "webrtc/base/exp_filter.h" |
| 20 #include "webrtc/base/ratetracker.h" | 21 #include "webrtc/base/ratetracker.h" |
| 21 #include "webrtc/base/thread_annotations.h" | 22 #include "webrtc/base/thread_annotations.h" |
| 22 #include "webrtc/common_types.h" | 23 #include "webrtc/common_types.h" |
| 23 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | 24 #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
| 24 #include "webrtc/modules/video_coding/include/video_coding_defines.h" | 25 #include "webrtc/modules/video_coding/include/video_coding_defines.h" |
| 25 #include "webrtc/system_wrappers/include/clock.h" | 26 #include "webrtc/system_wrappers/include/clock.h" |
| 26 #include "webrtc/video/overuse_frame_detector.h" | 27 #include "webrtc/video/overuse_frame_detector.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 50 virtual void OnSendEncodedImage(const EncodedImage& encoded_image, | 51 virtual void OnSendEncodedImage(const EncodedImage& encoded_image, |
| 51 const CodecSpecificInfo* codec_info); | 52 const CodecSpecificInfo* codec_info); |
| 52 // Used to update incoming frame rate. | 53 // Used to update incoming frame rate. |
| 53 void OnIncomingFrame(int width, int height); | 54 void OnIncomingFrame(int width, int height); |
| 54 | 55 |
| 55 void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate); | 56 void OnEncoderStatsUpdate(uint32_t framerate, uint32_t bitrate); |
| 56 void OnSuspendChange(bool is_suspended); | 57 void OnSuspendChange(bool is_suspended); |
| 57 void OnInactiveSsrc(uint32_t ssrc); | 58 void OnInactiveSsrc(uint32_t ssrc); |
| 58 | 59 |
| 59 // Used to indicate change in content type, which may require a change in | 60 // Used to indicate change in content type, which may require a change in |
| 60 // how stats are collected. | 61 // how stats are collected and set the configured preferred media bitrate. |
| 61 void SetContentType(VideoEncoderConfig::ContentType content_type); | 62 void OnEncoderReconfigured(const VideoEncoderConfig& encoder_config, |
| 63 uint32_t preferred_bitrate_bps); |
| 62 | 64 |
| 63 // Used to update the encoder target rate. | 65 // Used to update the encoder target rate. |
| 64 void OnSetEncoderTargetRate(uint32_t bitrate_bps); | 66 void OnSetEncoderTargetRate(uint32_t bitrate_bps); |
| 65 | 67 |
| 66 // Implements CpuOveruseMetricsObserver. | 68 // Implements CpuOveruseMetricsObserver. |
| 67 void OnEncodedFrameTimeMeasured(int encode_time_ms, | 69 void OnEncodedFrameTimeMeasured(int encode_time_ms, |
| 68 const CpuOveruseMetrics& metrics) override; | 70 const CpuOveruseMetrics& metrics) override; |
| 69 | 71 |
| 70 int GetSendFrameRate() const; | 72 int GetSendFrameRate() const; |
| 71 | 73 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 const VideoSendStream::Stats start_stats_; | 182 const VideoSendStream::Stats start_stats_; |
| 181 std::map<int, QpCounters> | 183 std::map<int, QpCounters> |
| 182 qp_counters_; // QP counters mapped by spatial idx. | 184 qp_counters_; // QP counters mapped by spatial idx. |
| 183 }; | 185 }; |
| 184 | 186 |
| 185 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); | 187 std::unique_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); |
| 186 }; | 188 }; |
| 187 | 189 |
| 188 } // namespace webrtc | 190 } // namespace webrtc |
| 189 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 191 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
| OLD | NEW |