| 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_H_ | 5 #ifndef REMOTING_HOST_ENCODER_H_ |
| 6 #define REMOTING_HOST_ENCODER_H_ | 6 #define REMOTING_HOST_ENCODER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "remoting/base/protocol/chromotocol.pb.h" | 10 #include "remoting/base/protocol/chromotocol.pb.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // |encode_done| is set to true and |data_available_task| is deleted. | 37 // |encode_done| is set to true and |data_available_task| is deleted. |
| 38 // | 38 // |
| 39 // Note that |input_data| and |stride| are arrays of 3 elements. | 39 // Note that |input_data| and |stride| are arrays of 3 elements. |
| 40 // | 40 // |
| 41 // Implementation has to ensure that when |data_available_task| is called | 41 // Implementation has to ensure that when |data_available_task| is called |
| 42 // output parameters are stable. | 42 // output parameters are stable. |
| 43 virtual void Encode(const DirtyRects& dirty_rects, | 43 virtual void Encode(const DirtyRects& dirty_rects, |
| 44 const uint8** input_data, | 44 const uint8** input_data, |
| 45 const int* strides, | 45 const int* strides, |
| 46 bool key_frame, | 46 bool key_frame, |
| 47 chromotocol_pb::UpdateStreamPacketHeader* header, | 47 UpdateStreamPacketHeader* header, |
| 48 scoped_refptr<media::DataBuffer>* output_data, | 48 scoped_refptr<media::DataBuffer>* output_data, |
| 49 bool* encode_done, | 49 bool* encode_done, |
| 50 Task* data_available_task) = 0; | 50 Task* data_available_task) = 0; |
| 51 | 51 |
| 52 // Set the dimension of the incoming images. Need to call this before | 52 // Set the dimension of the incoming images. Need to call this before |
| 53 // calling Encode(). | 53 // calling Encode(). |
| 54 virtual void SetSize(int width, int height) = 0; | 54 virtual void SetSize(int width, int height) = 0; |
| 55 | 55 |
| 56 // Set the pixel format of the incoming images. Need to call this before | 56 // Set the pixel format of the incoming images. Need to call this before |
| 57 // calling Encode(). | 57 // calling Encode(). |
| 58 virtual void SetPixelFormat(chromotocol_pb::PixelFormat pixel_format) = 0; | 58 virtual void SetPixelFormat(PixelFormat pixel_format) = 0; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace remoting | 61 } // namespace remoting |
| 62 | 62 |
| 63 #endif // REMOTING_HOST_ENCODER_H_ | 63 #endif // REMOTING_HOST_ENCODER_H_ |
| OLD | NEW |