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

Unified Diff: remoting/protocol/frame_stats.h

Issue 2096643003: Rework PerformanceTracker to make it usable with WebRTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/software_video_renderer.cc ('k') | remoting/protocol/frame_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/frame_stats.h
diff --git a/remoting/protocol/frame_stats.h b/remoting/protocol/frame_stats.h
new file mode 100644
index 0000000000000000000000000000000000000000..96661476a3458200ca636e6ba1c24d1b6c807ad7
--- /dev/null
+++ b/remoting/protocol/frame_stats.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_PROTOCOL_FRAME_STATS_H_
+#define REMOTING_PROTOCOL_FRAME_STATS_H_
+
+#include "base/time/time.h"
+
+namespace remoting {
+
+class VideoPacket;
+
+namespace protocol {
+
+// Struct used to track timestamp for various events in the video pipeline for a
+// single video frame
+struct FrameStats {
+ FrameStats();
+ FrameStats(const FrameStats&);
+ ~FrameStats();
+
+ // Copies timing fields from the |packet|.
+ static FrameStats GetForVideoPacket(const VideoPacket& packet);
+
+ int frame_size = 0;
+
+ // Set to null for frames that were not sent after a fresh input event.
+ base::TimeTicks latest_event_timestamp;
+
+ // Set to TimeDelta::Max() when unknown.
+ base::TimeDelta capture_delay = base::TimeDelta::Max();
+ base::TimeDelta encode_delay = base::TimeDelta::Max();
+ base::TimeDelta capture_pending_delay = base::TimeDelta::Max();
+ base::TimeDelta capture_overhead_delay = base::TimeDelta::Max();
+ base::TimeDelta encode_pending_delay = base::TimeDelta::Max();
+ base::TimeDelta send_pending_delay = base::TimeDelta::Max();
+
+ base::TimeTicks time_received;
+ base::TimeTicks time_decoded;
+ base::TimeTicks time_rendered;
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_FRAME_STATS_H_
« no previous file with comments | « remoting/client/software_video_renderer.cc ('k') | remoting/protocol/frame_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698