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 |