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 | |
51 virtual void GetUpdatedRects(UpdatedRects* rects) = 0; | 49 virtual void GetUpdatedRects(UpdatedRects* rects) = 0; |
52 | 50 |
53 // Reset the decoder to an uninitialized state. Release all references to | 51 // Reset the decoder to an uninitialized state. Release all references to |
54 // the initialized |frame|. Initialize() must be called before the decoder | 52 // the initialized |frame|. Initialize() must be called before the decoder |
55 // is used again. | 53 // is used again. |
56 virtual void Reset() = 0; | 54 virtual void Reset() = 0; |
57 | 55 |
58 // Returns true if decoder is ready to accept data via DecodePacket. | 56 // Returns true if decoder is ready to accept data via DecodePacket. |
59 virtual bool IsReadyForData() = 0; | 57 virtual bool IsReadyForData() = 0; |
60 | 58 |
(...skipping 15 matching lines...) Expand all Loading... |
76 // Force decoder to output a video frame with content in |rects| using the | 74 // Force decoder to output a video frame with content in |rects| using the |
77 // last decoded video frame. | 75 // last decoded video frame. |
78 // | 76 // |
79 // Coordinates of rectangles supplied here are before scaling. | 77 // Coordinates of rectangles supplied here are before scaling. |
80 virtual void RefreshRects(const std::vector<gfx::Rect>& rects) {} | 78 virtual void RefreshRects(const std::vector<gfx::Rect>& rects) {} |
81 }; | 79 }; |
82 | 80 |
83 } // namespace remoting | 81 } // namespace remoting |
84 | 82 |
85 #endif // REMOTING_BASE_DECODER_H_ | 83 #endif // REMOTING_BASE_DECODER_H_ |
OLD | NEW |