| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H | 5 #ifndef REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H |
| 6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H | 6 #define REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // TODO(ajwong): Re-examine this API, especially with regards to how error | 27 // TODO(ajwong): Re-examine this API, especially with regards to how error |
| 28 // conditions on each step are reported. Should they be CHECKs? Logs? Other? | 28 // conditions on each step are reported. Should they be CHECKs? Logs? Other? |
| 29 // TODO(sergeyu): Rename this class. | 29 // TODO(sergeyu): Rename this class. |
| 30 class RectangleUpdateDecoder : | 30 class RectangleUpdateDecoder : |
| 31 public base::RefCountedThreadSafe<RectangleUpdateDecoder> { | 31 public base::RefCountedThreadSafe<RectangleUpdateDecoder> { |
| 32 public: | 32 public: |
| 33 RectangleUpdateDecoder(MessageLoop* message_loop, | 33 RectangleUpdateDecoder(MessageLoop* message_loop, |
| 34 FrameConsumer* consumer); | 34 FrameConsumer* consumer); |
| 35 | 35 |
| 36 // Initializes decoder with the infromation from the protocol config. | 36 // Initializes decoder with the infromation from the protocol config. |
| 37 void Initialize(const protocol::SessionConfig* config); | 37 void Initialize(const protocol::SessionConfig& config); |
| 38 | 38 |
| 39 // Decodes the contents of |packet| calling OnPartialFrameOutput() in the | 39 // Decodes the contents of |packet| calling OnPartialFrameOutput() in the |
| 40 // regsitered as data is avaialable. DecodePacket may keep a reference to | 40 // regsitered as data is avaialable. DecodePacket may keep a reference to |
| 41 // |packet| so the |packet| must remain alive and valid until |done| is | 41 // |packet| so the |packet| must remain alive and valid until |done| is |
| 42 // executed. | 42 // executed. |
| 43 // | 43 // |
| 44 // TODO(ajwong): Should packet be a const pointer to make the lifetime | 44 // TODO(ajwong): Should packet be a const pointer to make the lifetime |
| 45 // more clear? | 45 // more clear? |
| 46 void DecodePacket(const VideoPacket* packet, Task* done); | 46 void DecodePacket(const VideoPacket* packet, Task* done); |
| 47 | 47 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // True if |consumer_| is currently using the frame. | 98 // True if |consumer_| is currently using the frame. |
| 99 bool frame_is_consuming_; | 99 bool frame_is_consuming_; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace remoting | 102 } // namespace remoting |
| 103 | 103 |
| 104 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::RectangleUpdateDecoder); | 104 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::RectangleUpdateDecoder); |
| 105 | 105 |
| 106 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H | 106 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H |
| OLD | NEW |