Remove redundant deinitialization code from HttpCache::Transaction.
[chromium-blink-merge.git] / remoting / codec / video_encoder.h
bloba89e1e70ccd349e751edfe8bb7a8a47bb0ef30ff
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_H_
6 #define REMOTING_CODEC_VIDEO_ENCODER_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
11 class SkRegion;
13 namespace webrtc {
14 class DesktopFrame;
15 } // namespace webrtc
17 namespace remoting {
19 class VideoPacket;
21 // A class to perform the task of encoding a continuous stream of images. The
22 // interface is asynchronous to enable maximum throughput.
23 class VideoEncoder {
24 public:
26 // DataAvailableCallback is called one or more times, for each chunk the
27 // underlying video encoder generates.
28 typedef base::Callback<void(scoped_ptr<VideoPacket>)> DataAvailableCallback;
30 virtual ~VideoEncoder() {}
32 // Encode an image stored in |frame|. Doesn't take ownership of |frame|. When
33 // encoded data is available, partial or full |data_available_callback| is
34 // called.
35 virtual void Encode(const webrtc::DesktopFrame* frame,
36 const DataAvailableCallback& data_available_callback) = 0;
39 } // namespace remoting
41 #endif // REMOTING_CODEC_VIDEO_ENCODER_H_