Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Side by Side Diff: remoting/base/decoder.h

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/base/decoder_vp8.h » ('j') | remoting/base/decoder_vp8.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 SetOutputDimensions(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.
75 // 74 //
76 // Coordinates of rectangles supplied here are before scaling. 75 // Coordinates of rectangles supplied here are before scaling.
77 virtual void RefreshRects(const RectVector& rects) {} 76 virtual void RefreshRects(const RectVector& rects) {}
78 }; 77 };
79 78
80 } // namespace remoting 79 } // namespace remoting
81 80
82 #endif // REMOTING_BASE_DECODER_H_ 81 #endif // REMOTING_BASE_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/base/decoder_vp8.h » ('j') | remoting/base/decoder_vp8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698