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

Unified Diff: remoting/protocol/frame_stats.h

Issue 2113523007: More cleanups in FrameStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 years, 5 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/protocol/fake_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
index 96661476a3458200ca636e6ba1c24d1b6c807ad7..c2c5ad9d2a743c9566f68524ef0178e47ec0cf3b 100644
--- a/remoting/protocol/frame_stats.h
+++ b/remoting/protocol/frame_stats.h
@@ -10,20 +10,20 @@
namespace remoting {
class VideoPacket;
+class FrameStatsMessage;
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();
+struct HostFrameStats {
+ HostFrameStats();
+ HostFrameStats(const HostFrameStats&);
+ ~HostFrameStats();
- // Copies timing fields from the |packet|.
- static FrameStats GetForVideoPacket(const VideoPacket& packet);
+ // Extracts timing fields from the |packet|.
+ static HostFrameStats GetForVideoPacket(const VideoPacket& packet);
- int frame_size = 0;
+ // Frame Size.
+ int frame_size {};
// Set to null for frames that were not sent after a fresh input event.
base::TimeTicks latest_event_timestamp;
@@ -35,12 +35,35 @@ struct FrameStats {
base::TimeDelta capture_overhead_delay = base::TimeDelta::Max();
base::TimeDelta encode_pending_delay = base::TimeDelta::Max();
base::TimeDelta send_pending_delay = base::TimeDelta::Max();
+};
+
+struct ClientFrameStats {
+ ClientFrameStats();
+ ClientFrameStats(const ClientFrameStats&);
+ ~ClientFrameStats();
+ ClientFrameStats& operator=(const ClientFrameStats&);
base::TimeTicks time_received;
base::TimeTicks time_decoded;
base::TimeTicks time_rendered;
};
+struct FrameStats {
+ FrameStats();
+ FrameStats(const FrameStats&);
+ ~FrameStats();
+
+ HostFrameStats host_stats;
+ ClientFrameStats client_stats;
+};
+
+class FrameStatsConsumer {
+ public:
+ virtual void OnVideoFrameStats(const FrameStats& stats) = 0;
+ protected:
+ virtual ~FrameStatsConsumer() {}
+};
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/fake_video_renderer.cc ('k') | remoting/protocol/frame_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698