| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void RefreshFullFrame(); | 55 void RefreshFullFrame(); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>; | 58 friend class base::RefCountedThreadSafe<RectangleUpdateDecoder>; |
| 59 friend class PartialFrameCleanup; | 59 friend class PartialFrameCleanup; |
| 60 | 60 |
| 61 ~RectangleUpdateDecoder(); | 61 ~RectangleUpdateDecoder(); |
| 62 | 62 |
| 63 void AllocateFrame(const VideoPacket* packet, const base::Closure& done); | 63 void AllocateFrame(const VideoPacket* packet, const base::Closure& done); |
| 64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done); | 64 void ProcessPacketData(const VideoPacket* packet, const base::Closure& done); |
| 65 void RefreshRects(const RectVector& rects); | |
| 66 | 65 |
| 67 // Obtain updated rectangles from decoder and submit it to the consumer. | 66 // Obtain updated rectangles from decoder and submit it to the consumer. |
| 68 void SubmitToConsumer(); | 67 void SubmitToConsumer(); |
| 69 | 68 |
| 70 // Use |refresh_rects_| to do a refresh to the backing video frame. | 69 // Use |refresh_rects_| to do a refresh to the backing video frame. |
| 71 // When done the affected rectangles are submitted to the consumer. | 70 // When done the affected rectangles are submitted to the consumer. |
| 72 void DoRefresh(); | 71 void DoRefresh(); |
| 73 | 72 |
| 74 // Callback for FrameConsumer::OnPartialFrameOutput() | 73 // Callback for FrameConsumer::OnPartialFrameOutput() |
| 75 void OnFrameConsumed(RectVector* rects); | 74 void OnFrameConsumed(RectVector* rects); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 88 scoped_refptr<media::VideoFrame> frame_; | 87 scoped_refptr<media::VideoFrame> frame_; |
| 89 bool frame_is_new_; | 88 bool frame_is_new_; |
| 90 | 89 |
| 91 // True if |consumer_| is currently using the frame. | 90 // True if |consumer_| is currently using the frame. |
| 92 bool frame_is_consuming_; | 91 bool frame_is_consuming_; |
| 93 }; | 92 }; |
| 94 | 93 |
| 95 } // namespace remoting | 94 } // namespace remoting |
| 96 | 95 |
| 97 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ | 96 #endif // REMOTING_CLIENT_RECTANGLE_UPDATE_DECODER_H_ |
| OLD | NEW |