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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // Reset the decoder to an uninitialized state. Release all references to | 50 // Reset the decoder to an uninitialized state. Release all references to |
51 // the initialized |frame|. Initialize() must be called before the decoder | 51 // the initialized |frame|. Initialize() must be called before the decoder |
52 // is used again. | 52 // is used again. |
53 virtual void Reset() = 0; | 53 virtual void Reset() = 0; |
54 | 54 |
55 // Returns true if decoder is ready to accept data via DecodePacket. | 55 // Returns true if decoder is ready to accept data via DecodePacket. |
56 virtual bool IsReadyForData() = 0; | 56 virtual bool IsReadyForData() = 0; |
57 | 57 |
58 virtual VideoPacketFormat::Encoding Encoding() = 0; | 58 virtual VideoPacketFormat::Encoding Encoding() = 0; |
59 | 59 |
60 // Set the scale factors of the decoded output. If the decoder doesn't support | 60 // Set the output dimensions for the decoder. If the dimensions are empty |
61 // scaling then this all is ignored. | 61 // then the source is rendered without scaling. |
62 // If both |horizontal_ratio| and |vertical_ratio| equal 1.0 then scaling is | 62 // Output dimensions are ignored if the decoder doesn't support scaling. |
63 // turned off. | 63 virtual void SetOutputSize(const SkISize& size) {} |
64 virtual void SetScaleRatios(double horizontal_ratio, double vertical_ratio) {} | |
65 | 64 |
66 // Set the clipping rectangle to the decoder. Decoder should respect this and | 65 // Set the clipping rectangle to the decoder. Decoder should respect this and |
67 // only output changes in this rectangle. The new clipping rectangle will be | 66 // only output changes in this rectangle. The new clipping rectangle will be |
68 // effective on the next decoded video frame. | 67 // effective on the next decoded video frame. |
69 // | 68 // |
70 // When scaling is enabled clipping rectangles are ignored. | 69 // When scaling is enabled clipping rectangles are ignored. |
71 virtual void SetClipRect(const SkIRect& clip_rect) {} | 70 virtual void SetClipRect(const SkIRect& clip_rect) {} |
72 | 71 |
73 // Force decoder to output a video frame with content in |rects| using the | 72 // Force decoder to output a video frame with content in |rects| using the |
74 // last decoded video frame. | 73 // last decoded video frame. |rects| are expressed in video frame rather |
75 // | 74 // than output coordinates. |
76 // Coordinates of rectangles supplied here are before scaling. | |
77 virtual void RefreshRects(const RectVector& rects) {} | 75 virtual void RefreshRects(const RectVector& rects) {} |
78 }; | 76 }; |
79 | 77 |
80 } // namespace remoting | 78 } // namespace remoting |
81 | 79 |
82 #endif // REMOTING_BASE_DECODER_H_ | 80 #endif // REMOTING_BASE_DECODER_H_ |
OLD | NEW |