Index: remoting/host/mouse_clamping_filter.cc |
diff --git a/remoting/host/mouse_clamping_filter.cc b/remoting/host/mouse_clamping_filter.cc |
index 04ee46cfe70f4bfb288166dc8252aeba5efa292a..afb1577df0328077b315b83df8bfbe0e3b590e96 100644 |
--- a/remoting/host/mouse_clamping_filter.cc |
+++ b/remoting/host/mouse_clamping_filter.cc |
@@ -4,24 +4,34 @@ |
#include "remoting/host/mouse_clamping_filter.h" |
-#include "remoting/capturer/video_frame_capturer.h" |
#include "remoting/proto/event.pb.h" |
+#include "remoting/proto/video.pb.h" |
namespace remoting { |
-MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer, |
- protocol::InputStub* input_stub) |
- : MouseInputFilter(input_stub), capturer_(capturer) { |
+MouseClampingFilter::MouseClampingFilter( |
+ protocol::InputStub* input_stub, |
+ protocol::VideoStub* video_stub) |
+ : MouseInputFilter(input_stub), |
+ video_stub_(video_stub) { |
} |
MouseClampingFilter::~MouseClampingFilter() { |
} |
-void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) { |
+void MouseClampingFilter::ProcessVideoPacket( |
+ scoped_ptr<VideoPacket> video_packet, |
+ const base::Closure& done) { |
// Ensure that the MouseInputFilter is clamping to the current dimensions. |
Wez
2013/01/08 18:34:00
nit: "Configure the MouseInputFilter to clamp to t
alexeypa (please no reviews)
2013/01/08 20:00:14
Done.
|
- set_output_size(capturer_->size_most_recent()); |
- set_input_size(capturer_->size_most_recent()); |
Wez
2013/01/08 18:34:00
How close are we to being able to remove size_most
alexeypa (please no reviews)
2013/01/08 20:00:14
I should be able to remove it completely in a foll
|
- MouseInputFilter::InjectMouseEvent(event); |
+ if (video_packet->format().has_screen_width() && |
+ video_packet->format().has_screen_height()) { |
Wez
2013/01/08 18:34:00
VideoPacket always has valid width & height in our
alexeypa (please no reviews)
2013/01/08 20:00:14
Verbatim codec does not always set the width and h
Wez
2013/01/08 21:02:42
Hmmm... you really only need width & height on eac
|
+ SkISize screen_size = SkISize::Make(video_packet->format().screen_width(), |
+ video_packet->format().screen_height()); |
+ set_input_size(screen_size); |
+ set_output_size(screen_size); |
+ } |
+ |
+ video_stub_->ProcessVideoPacket(video_packet.Pass(), done); |
} |
} // namespace remoting |