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

Side by Side Diff: remoting/base/decoder_vp8.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: Rebase. 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
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_VP8_H_ 5 #ifndef REMOTING_BASE_DECODER_VP8_H_
6 #define REMOTING_BASE_DECODER_VP8_H_ 6 #define REMOTING_BASE_DECODER_VP8_H_
7 7
8 #include "remoting/base/decoder.h" 8 #include "remoting/base/decoder.h"
9 9
10 typedef struct vpx_codec_ctx vpx_codec_ctx_t; 10 typedef struct vpx_codec_ctx vpx_codec_ctx_t;
11 typedef struct vpx_image vpx_image_t; 11 typedef struct vpx_image vpx_image_t;
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 class DecoderVp8 : public Decoder { 15 class DecoderVp8 : public Decoder {
16 public: 16 public:
17 DecoderVp8(); 17 DecoderVp8();
18 virtual ~DecoderVp8(); 18 virtual ~DecoderVp8();
19 19
20 // Decoder implementations. 20 // Decoder implementations.
21 virtual void Initialize(scoped_refptr<media::VideoFrame> frame) OVERRIDE; 21 virtual void Initialize(scoped_refptr<media::VideoFrame> frame) OVERRIDE;
22 virtual DecodeResult DecodePacket(const VideoPacket* packet) OVERRIDE; 22 virtual DecodeResult DecodePacket(const VideoPacket* packet) OVERRIDE;
23 virtual void GetUpdatedRects(RectVector* rects) OVERRIDE; 23 virtual void GetUpdatedRects(RectVector* rects) OVERRIDE;
24 virtual bool IsReadyForData() OVERRIDE; 24 virtual bool IsReadyForData() OVERRIDE;
25 virtual void Reset() OVERRIDE; 25 virtual void Reset() OVERRIDE;
26 virtual VideoPacketFormat::Encoding Encoding() OVERRIDE; 26 virtual VideoPacketFormat::Encoding Encoding() OVERRIDE;
27 virtual void SetScaleRatios(double horizontal_ratio, 27 virtual void SetOutputSize(const SkISize& size) OVERRIDE;
28 double vertical_ratio) OVERRIDE;
29 virtual void SetClipRect(const SkIRect& clip_rect) OVERRIDE; 28 virtual void SetClipRect(const SkIRect& clip_rect) OVERRIDE;
30 virtual void RefreshRects(const RectVector& rects) OVERRIDE; 29 virtual void RefreshRects(const RectVector& rects) OVERRIDE;
31 30
32 private: 31 private:
33 enum State { 32 enum State {
34 kUninitialized, 33 kUninitialized,
35 kReady, 34 kReady,
36 kError, 35 kError,
37 }; 36 };
38 37
(...skipping 21 matching lines...) Expand all
60 59
61 // Pointer to the last decoded image. 60 // Pointer to the last decoded image.
62 vpx_image_t* last_image_; 61 vpx_image_t* last_image_;
63 62
64 // Record the updated rects in the last decode. 63 // Record the updated rects in the last decode.
65 RectVector updated_rects_; 64 RectVector updated_rects_;
66 65
67 // Clipping rect for the output of the decoder. 66 // Clipping rect for the output of the decoder.
68 SkIRect clip_rect_; 67 SkIRect clip_rect_;
69 68
70 // Scale factors of the decoded output. 69 // Output dimensions.
71 double horizontal_scale_ratio_; 70 SkISize output_size_;
72 double vertical_scale_ratio_;
73 71
74 DISALLOW_COPY_AND_ASSIGN(DecoderVp8); 72 DISALLOW_COPY_AND_ASSIGN(DecoderVp8);
75 }; 73 };
76 74
77 } // namespace remoting 75 } // namespace remoting
78 76
79 #endif // REMOTING_BASE_DECODER_VP8_H_ 77 #endif // REMOTING_BASE_DECODER_VP8_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698