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_BASE_DECODER_H_ | 5 #ifndef REMOTING_BASE_DECODER_H_ |
6 #define REMOTING_BASE_DECODER_H_ | 6 #define REMOTING_BASE_DECODER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 // Initializes the decoder to draw into the given |frame|. | 40 // Initializes the decoder to draw into the given |frame|. |
41 virtual void Initialize(scoped_refptr<media::VideoFrame> frame) = 0; | 41 virtual void Initialize(scoped_refptr<media::VideoFrame> frame) = 0; |
42 | 42 |
43 // Feeds more data into the decoder. | 43 // Feeds more data into the decoder. |
44 virtual DecodeResult DecodePacket(const VideoPacket* packet) = 0; | 44 virtual DecodeResult DecodePacket(const VideoPacket* packet) = 0; |
45 | 45 |
46 // Returns rects that were updated in the last frame. Can be called only | 46 // Returns rects that were updated in the last frame. Can be called only |
47 // after DecodePacket returned DECODE_DONE. Caller keeps ownership of | 47 // after DecodePacket returned DECODE_DONE. Caller keeps ownership of |
48 // |rects|. |rects| is kept empty if whole screen needs to be updated. | 48 // |rects|. |rects| is kept empty if whole screen needs to be updated. |
| 49 // TODO(dmaclach): Move this over to using SkRegion. |
| 50 // http://crbug.com/92085 |
49 virtual void GetUpdatedRects(UpdatedRects* rects) = 0; | 51 virtual void GetUpdatedRects(UpdatedRects* rects) = 0; |
50 | 52 |
51 // Reset the decoder to an uninitialized state. Release all references to | 53 // Reset the decoder to an uninitialized state. Release all references to |
52 // the initialized |frame|. Initialize() must be called before the decoder | 54 // the initialized |frame|. Initialize() must be called before the decoder |
53 // is used again. | 55 // is used again. |
54 virtual void Reset() = 0; | 56 virtual void Reset() = 0; |
55 | 57 |
56 // Returns true if decoder is ready to accept data via DecodePacket. | 58 // Returns true if decoder is ready to accept data via DecodePacket. |
57 virtual bool IsReadyForData() = 0; | 59 virtual bool IsReadyForData() = 0; |
58 | 60 |
(...skipping 15 matching lines...) Expand all Loading... |
74 // Force decoder to output a video frame with content in |rects| using the | 76 // Force decoder to output a video frame with content in |rects| using the |
75 // last decoded video frame. | 77 // last decoded video frame. |
76 // | 78 // |
77 // Coordinates of rectangles supplied here are before scaling. | 79 // Coordinates of rectangles supplied here are before scaling. |
78 virtual void RefreshRects(const std::vector<gfx::Rect>& rects) {} | 80 virtual void RefreshRects(const std::vector<gfx::Rect>& rects) {} |
79 }; | 81 }; |
80 | 82 |
81 } // namespace remoting | 83 } // namespace remoting |
82 | 84 |
83 #endif // REMOTING_BASE_DECODER_H_ | 85 #endif // REMOTING_BASE_DECODER_H_ |
OLD | NEW |