| 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_ENCODER_H_ | 5 #ifndef REMOTING_BASE_ENCODER_H_ |
| 6 #define REMOTING_BASE_ENCODER_H_ | 6 #define REMOTING_BASE_ENCODER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "media/base/data_buffer.h" | 10 #include "media/base/data_buffer.h" |
| 11 // TODO(hclam): Should not depend on internal.pb.h. | |
| 12 #include "remoting/proto/internal.pb.h" | |
| 13 | 11 |
| 14 namespace media { | 12 namespace media { |
| 15 class DataBuffer; | 13 class DataBuffer; |
| 16 } | 14 } |
| 17 | 15 |
| 18 namespace remoting { | 16 namespace remoting { |
| 19 | 17 |
| 20 class CaptureData; | 18 class CaptureData; |
| 19 class VideoPacket; |
| 21 | 20 |
| 22 // A class to perform the task of encoding a continous stream of | 21 // A class to perform the task of encoding a continous stream of |
| 23 // images. | 22 // images. |
| 24 // This class operates asynchronously to enable maximum throughput. | 23 // This class operates asynchronously to enable maximum throughput. |
| 25 class Encoder { | 24 class Encoder { |
| 26 public: | 25 public: |
| 27 | 26 |
| 28 // DataAvailableCallback is called as blocks of data are made available | 27 // DataAvailableCallback is called as blocks of data are made available |
| 29 // from the encoder. Data made available by the encoder is in the form | 28 // from the encoder. Data made available by the encoder is in the form |
| 30 // of HostMessage to reduce the amount of memory copies. | 29 // of HostMessage to reduce the amount of memory copies. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 // When encoded data is available, partial or full |data_available_callback| | 41 // When encoded data is available, partial or full |data_available_callback| |
| 43 // is called. | 42 // is called. |
| 44 virtual void Encode(scoped_refptr<CaptureData> capture_data, | 43 virtual void Encode(scoped_refptr<CaptureData> capture_data, |
| 45 bool key_frame, | 44 bool key_frame, |
| 46 DataAvailableCallback* data_available_callback) = 0; | 45 DataAvailableCallback* data_available_callback) = 0; |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 } // namespace remoting | 48 } // namespace remoting |
| 50 | 49 |
| 51 #endif // REMOTING_BASE_ENCODER_H_ | 50 #endif // REMOTING_BASE_ENCODER_H_ |
| OLD | NEW |