Index: remoting/protocol/video_stream.h |
diff --git a/remoting/protocol/video_stream.h b/remoting/protocol/video_stream.h |
index 4e18ea9d8f69af287644c66d51be528aa05f3e49..b6c721fc5d3ac6622ccf6de1bc03933ece471b4f 100644 |
--- a/remoting/protocol/video_stream.h |
+++ b/remoting/protocol/video_stream.h |
@@ -21,11 +21,21 @@ namespace protocol { |
class VideoStream { |
public: |
- // Callback used to notify about screen size changes. The size must be |
- // specified in physical pixels. |
- typedef base::Callback<void(const webrtc::DesktopSize& size, |
- const webrtc::DesktopVector& dpi)> |
- SizeCallback; |
+ class Observer { |
+ public: |
+ // Called to notify about screen size changes. The size is specified in |
+ // physical pixels. |
+ virtual void OnVideoSizeChanged(VideoStream* stream, |
+ const webrtc::DesktopSize& size, |
+ const webrtc::DesktopVector& dpi) = 0; |
+ |
+ // Called to notify about an outgoing video frame. |input_event_timestamp| |
+ // corresponds to the last input event that was injected before the frame |
+ // was captured. |
+ virtual void OnVideoFrameSent(VideoStream* stream, |
+ uint32_t frame_id, |
+ int64_t event_timestamp) = 0; |
+ }; |
VideoStream() {} |
virtual ~VideoStream() {} |
@@ -42,8 +52,8 @@ class VideoStream { |
virtual void SetLosslessEncode(bool want_lossless) = 0; |
virtual void SetLosslessColor(bool want_lossless) = 0; |
- // Sets SizeCallback to be called when screen size is changed. |
- virtual void SetSizeCallback(const SizeCallback& size_callback) = 0; |
+ // Sets stream observer. |
+ virtual void SetObserver(Observer* observer) = 0; |
}; |
} // namespace protocol |