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

Side by Side Diff: remoting/host/mouse_clamping_filter.cc

Issue 11781003: Connect to DesktopEnvironment's stubs only when audio/video schedulers are about to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/mouse_clamping_filter.h" 5 #include "remoting/host/mouse_clamping_filter.h"
6 6
7 #include "remoting/capturer/video_frame_capturer.h"
8 #include "remoting/proto/event.pb.h" 7 #include "remoting/proto/event.pb.h"
8 #include "remoting/proto/video.pb.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer, 12 MouseClampingFilter::MouseClampingFilter(
13 protocol::InputStub* input_stub) 13 protocol::InputStub* input_stub,
14 : MouseInputFilter(input_stub), capturer_(capturer) { 14 protocol::VideoStub* video_stub)
15 : MouseInputFilter(input_stub),
16 video_stub_(video_stub) {
15 } 17 }
16 18
17 MouseClampingFilter::~MouseClampingFilter() { 19 MouseClampingFilter::~MouseClampingFilter() {
18 } 20 }
19 21
20 void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) { 22 void MouseClampingFilter::ProcessVideoPacket(
23 scoped_ptr<VideoPacket> video_packet,
24 const base::Closure& done) {
21 // Ensure that the MouseInputFilter is clamping to the current dimensions. 25 // 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.
22 set_output_size(capturer_->size_most_recent()); 26 if (video_packet->format().has_screen_width() &&
23 set_input_size(capturer_->size_most_recent()); 27 video_packet->format().has_screen_height()) {
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
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
24 MouseInputFilter::InjectMouseEvent(event); 28 SkISize screen_size = SkISize::Make(video_packet->format().screen_width(),
29 video_packet->format().screen_height());
30 set_input_size(screen_size);
31 set_output_size(screen_size);
32 }
33
34 video_stub_->ProcessVideoPacket(video_packet.Pass(), done);
25 } 35 }
26 36
27 } // namespace remoting 37 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698