1 // Copyright (c) 2011 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_VERBATIM_H_
6 #define REMOTING_CODEC_VIDEO_ENCODER_VERBATIM_H_
8 #include "remoting/codec/video_encoder.h"
9 #include "remoting/proto/video.pb.h"
10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
14 // VideoEncoderVerbatim implements a VideoEncoder that sends image data as a
15 // sequence of RGB values, without compression.
16 class VideoEncoderVerbatim
: public VideoEncoder
{
18 VideoEncoderVerbatim();
19 virtual ~VideoEncoderVerbatim();
21 // VideoEncoder interface.
22 virtual scoped_ptr
<VideoPacket
> Encode(
23 const webrtc::DesktopFrame
& frame
) OVERRIDE
;
26 // Allocates a buffer of the specified |size| inside |packet| and returns the
28 uint8
* GetOutputBuffer(VideoPacket
* packet
, size_t size
);
30 // The most recent screen size. Used to detect screen size changes.
31 webrtc::DesktopSize screen_size_
;
34 } // namespace remoting
36 #endif // REMOTING_CODEC_VIDEO_ENCODER_VERBATIM_H_