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 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 VideoEncoderConfig::ContentType content_type); | 45 VideoEncoderConfig::ContentType content_type); |
46 virtual ~SendStatisticsProxy(); | 46 virtual ~SendStatisticsProxy(); |
47 | 47 |
48 VideoSendStream::Stats GetStats(); | 48 VideoSendStream::Stats GetStats(); |
49 | 49 |
50 virtual void OnSendEncodedImage(const EncodedImage& encoded_image, | 50 virtual void OnSendEncodedImage(const EncodedImage& encoded_image, |
51 const RTPVideoHeader* rtp_video_header); | 51 const RTPVideoHeader* rtp_video_header); |
52 // Used to update incoming frame rate. | 52 // Used to update incoming frame rate. |
53 void OnIncomingFrame(int width, int height); | 53 void OnIncomingFrame(int width, int height); |
54 | 54 |
55 // Used to update encode time of frames. | |
56 void OnEncodedFrame(int encode_time_ms); | |
57 | |
58 // From VideoEncoderRateObserver. | 55 // From VideoEncoderRateObserver. |
59 void OnSetRates(uint32_t bitrate_bps, int framerate) override; | 56 void OnSetRates(uint32_t bitrate_bps, int framerate) override; |
60 | 57 |
61 void OnEncoderImplementationName(const char* implementation_name); | 58 void OnEncoderImplementationName(const char* implementation_name); |
62 void OnOutgoingRate(uint32_t framerate, uint32_t bitrate); | 59 void OnOutgoingRate(uint32_t framerate, uint32_t bitrate); |
63 void OnSuspendChange(bool is_suspended); | 60 void OnSuspendChange(bool is_suspended); |
64 void OnInactiveSsrc(uint32_t ssrc); | 61 void OnInactiveSsrc(uint32_t ssrc); |
65 | 62 |
66 // Used to indicate change in content type, which may require a change in | 63 // Used to indicate change in content type, which may require a change in |
67 // how stats are collected. | 64 // how stats are collected. |
68 void SetContentType(VideoEncoderConfig::ContentType content_type); | 65 void SetContentType(VideoEncoderConfig::ContentType content_type); |
69 | 66 |
| 67 // From CpuOveruseMetricsObserver. |
| 68 void OnEncodedFrameTimeMeasured(int encode_time_ms, |
| 69 const CpuOveruseMetrics& metrics) override; |
| 70 |
70 protected: | 71 protected: |
71 // From CpuOveruseMetricsObserver. | |
72 void CpuOveruseMetricsUpdated(const CpuOveruseMetrics& metrics) override; | |
73 // From RtcpStatisticsCallback. | 72 // From RtcpStatisticsCallback. |
74 void StatisticsUpdated(const RtcpStatistics& statistics, | 73 void StatisticsUpdated(const RtcpStatistics& statistics, |
75 uint32_t ssrc) override; | 74 uint32_t ssrc) override; |
76 void CNameChanged(const char* cname, uint32_t ssrc) override; | 75 void CNameChanged(const char* cname, uint32_t ssrc) override; |
77 // From RtcpPacketTypeCounterObserver. | 76 // From RtcpPacketTypeCounterObserver. |
78 void RtcpPacketTypesCounterUpdated( | 77 void RtcpPacketTypesCounterUpdated( |
79 uint32_t ssrc, | 78 uint32_t ssrc, |
80 const RtcpPacketTypeCounter& packet_counter) override; | 79 const RtcpPacketTypeCounter& packet_counter) override; |
81 // From StreamDataCountersCallback. | 80 // From StreamDataCountersCallback. |
82 void DataCountersUpdated(const StreamDataCounters& counters, | 81 void DataCountersUpdated(const StreamDataCounters& counters, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 SampleCounter max_delay_counter_; | 163 SampleCounter max_delay_counter_; |
165 rtc::RateTracker input_frame_rate_tracker_; | 164 rtc::RateTracker input_frame_rate_tracker_; |
166 rtc::RateTracker sent_frame_rate_tracker_; | 165 rtc::RateTracker sent_frame_rate_tracker_; |
167 }; | 166 }; |
168 | 167 |
169 rtc::scoped_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); | 168 rtc::scoped_ptr<UmaSamplesContainer> uma_container_ GUARDED_BY(crit_); |
170 }; | 169 }; |
171 | 170 |
172 } // namespace webrtc | 171 } // namespace webrtc |
173 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ | 172 #endif // WEBRTC_VIDEO_SEND_STATISTICS_PROXY_H_ |
OLD | NEW |