Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: webrtc/video_send_stream.h

Issue 2133073002: Add periodic logging of video stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 23 matching lines...) Expand all
34 // externally to make sure that any old frames are not delivered concurrently. 34 // externally to make sure that any old frames are not delivered concurrently.
35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0; 35 virtual void IncomingCapturedFrame(const VideoFrame& video_frame) = 0;
36 36
37 protected: 37 protected:
38 virtual ~VideoCaptureInput() {} 38 virtual ~VideoCaptureInput() {}
39 }; 39 };
40 40
41 class VideoSendStream { 41 class VideoSendStream {
42 public: 42 public:
43 struct StreamStats { 43 struct StreamStats {
44 std::string ToString() const;
45
44 FrameCounts frame_counts; 46 FrameCounts frame_counts;
47 bool is_rtx = false;
45 int width = 0; 48 int width = 0;
46 int height = 0; 49 int height = 0;
47 // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer. 50 // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer.
48 int total_bitrate_bps = 0; 51 int total_bitrate_bps = 0;
49 int retransmit_bitrate_bps = 0; 52 int retransmit_bitrate_bps = 0;
50 int avg_delay_ms = 0; 53 int avg_delay_ms = 0;
51 int max_delay_ms = 0; 54 int max_delay_ms = 0;
52 StreamDataCounters rtp_stats; 55 StreamDataCounters rtp_stats;
53 RtcpPacketTypeCounter rtcp_packet_type_counts; 56 RtcpPacketTypeCounter rtcp_packet_type_counts;
54 RtcpStatistics rtcp_stats; 57 RtcpStatistics rtcp_stats;
55 }; 58 };
56 59
57 struct Stats { 60 struct Stats {
61 std::string ToString(int64_t time_ms) const;
58 std::string encoder_implementation_name = "unknown"; 62 std::string encoder_implementation_name = "unknown";
59 int input_frame_rate = 0; 63 int input_frame_rate = 0;
60 int encode_frame_rate = 0; 64 int encode_frame_rate = 0;
61 int avg_encode_time_ms = 0; 65 int avg_encode_time_ms = 0;
62 int encode_usage_percent = 0; 66 int encode_usage_percent = 0;
63 int target_media_bitrate_bps = 0; 67 int target_media_bitrate_bps = 0;
64 int media_bitrate_bps = 0; 68 int media_bitrate_bps = 0;
65 bool suspended = false; 69 bool suspended = false;
66 bool bw_limited_resolution = false; 70 bool bw_limited_resolution = false;
67 std::map<uint32_t, StreamStats> substreams; 71 std::map<uint32_t, StreamStats> substreams;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 188
185 virtual Stats GetStats() = 0; 189 virtual Stats GetStats() = 0;
186 190
187 protected: 191 protected:
188 virtual ~VideoSendStream() {} 192 virtual ~VideoSendStream() {}
189 }; 193 };
190 194
191 } // namespace webrtc 195 } // namespace webrtc
192 196
193 #endif // WEBRTC_VIDEO_SEND_STREAM_H_ 197 #endif // WEBRTC_VIDEO_SEND_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video_receive_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698