| 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_HOST_ENCODER_VP8_H_ | 5 #ifndef REMOTING_HOST_ENCODER_VP8_H_ |
| 6 #define REMOTING_HOST_ENCODER_VP8_H_ | 6 #define REMOTING_HOST_ENCODER_VP8_H_ |
| 7 | 7 |
| 8 #include "remoting/host/encoder.h" | 8 #include "remoting/host/encoder.h" |
| 9 | 9 |
| 10 #include "remoting/base/protocol/chromotocol.pb.h" | 10 #include "remoting/base/protocol/chromotocol.pb.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // A class that uses VP8 to perform encoding. | 25 // A class that uses VP8 to perform encoding. |
| 26 class EncoderVp8 : public Encoder { | 26 class EncoderVp8 : public Encoder { |
| 27 public: | 27 public: |
| 28 EncoderVp8(); | 28 EncoderVp8(); |
| 29 virtual ~EncoderVp8(); | 29 virtual ~EncoderVp8(); |
| 30 | 30 |
| 31 virtual void Encode(const DirtyRects& dirty_rects, | 31 virtual void Encode(const DirtyRects& dirty_rects, |
| 32 const uint8** input_data, | 32 const uint8** input_data, |
| 33 const int* strides, | 33 const int* strides, |
| 34 bool key_frame, | 34 bool key_frame, |
| 35 chromotocol_pb::UpdateStreamPacketHeader* header, | 35 UpdateStreamPacketHeader* header, |
| 36 scoped_refptr<media::DataBuffer>* output_data, | 36 scoped_refptr<media::DataBuffer>* output_data, |
| 37 bool* encode_done, | 37 bool* encode_done, |
| 38 Task* data_available_task); | 38 Task* data_available_task); |
| 39 virtual void SetSize(int width, int height); | 39 virtual void SetSize(int width, int height); |
| 40 virtual void SetPixelFormat(PixelFormat pixel_format); | 40 virtual void SetPixelFormat(PixelFormat pixel_format); |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // Setup the VP8 encoder. | 43 // Setup the VP8 encoder. |
| 44 bool Init(); | 44 bool Init(); |
| 45 | 45 |
| 46 // True if the encoder is initialized. | 46 // True if the encoder is initialized. |
| 47 bool initialized_; | 47 bool initialized_; |
| 48 | 48 |
| 49 int width_; | 49 int width_; |
| 50 int height_; | 50 int height_; |
| 51 PixelFormat pixel_format_; | 51 PixelFormat pixel_format_; |
| 52 on2_codec_ctx_t codec_; | 52 on2_codec_ctx_t codec_; |
| 53 on2_image_t image_; | 53 on2_image_t image_; |
| 54 int last_timestamp_; | 54 int last_timestamp_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(EncoderVp8); | 56 DISALLOW_COPY_AND_ASSIGN(EncoderVp8); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace remoting | 59 } // namespace remoting |
| 60 | 60 |
| 61 #endif // REMOTING_HOST_ENCODER_VP8_H_ | 61 #endif // REMOTING_HOST_ENCODER_VP8_H_ |
| OLD | NEW |