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

Unified Diff: remoting/protocol/video_stream.h

Issue 2083843002: Replace VideoStream::SizeCallback with VideoStream::Observer interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-sched-stream
Patch Set: 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/protocol/video_frame_pump.cc ('k') | remoting/protocol/webrtc_video_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « remoting/protocol/video_frame_pump.cc ('k') | remoting/protocol/webrtc_video_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698