diff options
author | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 12:15:31 +0000 |
---|---|---|
committer | simonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 12:15:31 +0000 |
commit | e1a6c46256722e10c73a3ce6e210cf7b7dbb065f (patch) | |
tree | bcbbf08f932c7aa8a239d791d98ee9d93b5a02b1 /remoting/client/rectangle_update_decoder.h | |
parent | bcb343aa6775b6b473389c3dcf4d5946b7ae0107 (diff) | |
download | chromium_src-e1a6c46256722e10c73a3ce6e210cf7b7dbb065f.zip chromium_src-e1a6c46256722e10c73a3ce6e210cf7b7dbb065f.tar.gz chromium_src-e1a6c46256722e10c73a3ce6e210cf7b7dbb065f.tar.bz2 |
Let the host change resolution.
The screen size flows through the video pipeline, instead of
being set statically when that pipeline is constructed.
Only the Windows host actually detects when the screen size has changed.
BUG=72469
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76747
Review URL: http://codereview.chromium.org/6573005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/rectangle_update_decoder.h')
-rw-r--r-- | remoting/client/rectangle_update_decoder.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/remoting/client/rectangle_update_decoder.h b/remoting/client/rectangle_update_decoder.h index bcd521a..fbcc69b 100644 --- a/remoting/client/rectangle_update_decoder.h +++ b/remoting/client/rectangle_update_decoder.h @@ -8,13 +8,13 @@ #include "base/scoped_ptr.h" #include "base/task.h" #include "media/base/video_frame.h" +#include "remoting/base/decoder.h" #include "ui/gfx/size.h" class MessageLoop; namespace remoting { -class Decoder; class FrameConsumer; class VideoPacketFormat; class VideoPacket; @@ -26,11 +26,11 @@ class SessionConfig; // TODO(ajwong): Re-examine this API, especially with regards to how error // conditions on each step are reported. Should they be CHECKs? Logs? Other? // TODO(sergeyu): Rename this class. -class RectangleUpdateDecoder { +class RectangleUpdateDecoder : + public base::RefCountedThreadSafe<RectangleUpdateDecoder> { public: RectangleUpdateDecoder(MessageLoop* message_loop, FrameConsumer* consumer); - ~RectangleUpdateDecoder(); // Initializes decoder with the infromation from the protocol config. void Initialize(const protocol::SessionConfig* config); @@ -45,20 +45,23 @@ class RectangleUpdateDecoder { void DecodePacket(const VideoPacket* packet, Task* done); private: - void InitializeDecoder(Task* done); + friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>; + ~RectangleUpdateDecoder(); + void AllocateFrame(const VideoPacket* packet, Task* done); void ProcessPacketData(const VideoPacket* packet, Task* done); // Pointers to infrastructure objects. Not owned. MessageLoop* message_loop_; FrameConsumer* consumer_; - gfx::Size screen_size_; + gfx::Size initial_screen_size_; scoped_ptr<Decoder> decoder_; - // Framebuffer for the decoder. + // The video frame that the decoder writes to. scoped_refptr<media::VideoFrame> frame_; + bool frame_is_new_; }; } // namespace remoting |