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

Unified Diff: remoting/client/chromoting_view.h

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 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/client/chromoting_client.cc ('k') | remoting/client/chromoting_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/chromoting_view.h
diff --git a/remoting/client/chromoting_view.h b/remoting/client/chromoting_view.h
index d785b291f891ac18a63fb771bced157f48c9a8e2..d1c978b145b97bcb0f08648f6ef0ec22bf023fde 100644
--- a/remoting/client/chromoting_view.h
+++ b/remoting/client/chromoting_view.h
@@ -6,13 +6,19 @@
#define REMOTING_CLIENT_CHROMOTING_VIEW_H_
#include "base/ref_counted.h"
-#include "remoting/base/decoder.h"
+#include "media/base/video_frame.h"
+
+class MessageLoop;
+
+namespace base {
+class WaitableEvent;
+} // namespace base
namespace remoting {
// ChromotingView defines the behavior of an object that draws a view of the
-// remote desktop. Its main function is to choose the right decoder and render
-// the update stream onto the screen.
+// remote desktop. Its main function is to render the update stream onto the
+// screen.
class ChromotingView {
public:
ChromotingView();
@@ -44,70 +50,13 @@ class ChromotingView {
// extends past the end of the backing store, it is filled with black.
virtual void SetViewport(int x, int y, int width, int height) = 0;
- // Resize the underlying image that contains the host screen buffer.
- // This should match the size of the output from the decoder.
- //
- // TODO(garykac): This handles only 1 screen. We need multi-screen support.
- virtual void SetHostScreenSize(int width, int height) = 0;
-
- // Handle the BeginUpdateStream message.
- // This method should perform the following tasks:
- // (1) Perform any platform-specific tasks for start of update stream.
- // (2) Make sure the |frame_| has been initialized.
- // (3) Delete the HostMessage.
- virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg) = 0;
-
- // Handle the UpdateStreamPacket message.
- // This method should perform the following tasks:
- // (1) Extract the decoding from the update packet message.
- // (2) Call SetupDecoder with the encoding to lazily initialize the decoder.
- // We don't do this in BeginUpdateStream because the begin message
- // doesn't contain the encoding.
- // (3) Call BeginDecoding if this is the first packet of the stream.
- // (4) Call the decoder's PartialDecode() method to decode the packet.
- // This call will delete the HostMessage.
- // Note:
- // * For a given begin/end update stream, the encodings specified in the
- // update packets must all match. We may revisit this constraint at a
- // later date.
- virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg) = 0;
-
- // Handle the EndUpdateStream message.
- // This method should perform the following tasks:
- // (1) Call EndDecoding().
- // (2) Perform any platform-specific tasks for end of update stream.
- // (3) Delete the HostMessage.
- virtual void HandleEndUpdateStream(ChromotingHostMessage* msg) = 0;
-
protected:
- // Setup the decoder based on the given encoding.
- // Returns true if a new decoder has already been started (with a call to
- // BeginDecoding).
- bool SetupDecoder(UpdateStreamEncoding encoding);
-
- // Prepare the decoder to start decoding a chunk of data.
- // This needs to be called if SetupDecoder() returns false.
- bool BeginDecoding(Task* partial_decode_done, Task* decode_done);
-
- // Decode the given message.
- // BeginDecoding() must be called before any calls to Decode().
- bool Decode(ChromotingHostMessage* msg);
-
- // Finish decoding and send notifications to update the view.
- bool EndDecoding();
-
- // Decoder used to decode the video frames (or frame fragements).
- scoped_ptr<Decoder> decoder_;
-
// Framebuffer for the decoder.
scoped_refptr<media::VideoFrame> frame_;
// Dimensions of |frame_| bitmap.
int frame_width_;
int frame_height_;
-
- UpdatedRects update_rects_;
- UpdatedRects all_update_rects_;
};
} // namespace remoting
« no previous file with comments | « remoting/client/chromoting_client.cc ('k') | remoting/client/chromoting_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698