| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/task.h" | 8 #include "base/task.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "gfx/rect.h" | 10 #include "gfx/rect.h" |
| 11 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
| 12 #include "remoting/proto/video.pb.h" | 12 #include "remoting/proto/event.pb.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 | 15 |
| 16 typedef std::vector<gfx::Rect> UpdatedRects; | 16 typedef std::vector<gfx::Rect> UpdatedRects; |
| 17 | 17 |
| 18 // Interface for a decoder that takes a stream of bytes from the network and | 18 // Interface for a decoder that takes a stream of bytes from the network and |
| 19 // outputs frames of data. | 19 // outputs frames of data. |
| 20 // | 20 // |
| 21 // TODO(ajwong): Beef up this documentation once the API stablizes. | 21 // TODO(ajwong): Beef up this documentation once the API stablizes. |
| 22 class Decoder { | 22 class Decoder { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 // the initialized |frame|. Initialize() must be called before the decoder | 44 // the initialized |frame|. Initialize() must be called before the decoder |
| 45 // is used again. | 45 // is used again. |
| 46 virtual void Reset() = 0; | 46 virtual void Reset() = 0; |
| 47 | 47 |
| 48 // Feeds more data into the decoder. | 48 // Feeds more data into the decoder. |
| 49 virtual void DecodeBytes(const std::string& encoded_bytes) = 0; | 49 virtual void DecodeBytes(const std::string& encoded_bytes) = 0; |
| 50 | 50 |
| 51 // Returns true if decoder is ready to accept data via ProcessRectangleData. | 51 // Returns true if decoder is ready to accept data via ProcessRectangleData. |
| 52 virtual bool IsReadyForData() = 0; | 52 virtual bool IsReadyForData() = 0; |
| 53 | 53 |
| 54 virtual VideoPacketFormat::Encoding Encoding() = 0; | 54 virtual UpdateStreamEncoding Encoding() = 0; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace remoting | 57 } // namespace remoting |
| 58 | 58 |
| 59 #endif // REMOTING_BASE_DECODER_H_ | 59 #endif // REMOTING_BASE_DECODER_H_ |
| OLD | NEW |