Add Net.WebSocket.HandshakeResult to histograms.xml
[chromium-blink-merge.git] / remoting / codec / video_encoder_verbatim.h
blob54a8a033fa978370eacb2919d0bdf27f6806bbe6
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"
12 namespace remoting {
14 // VideoEncoderVerbatim implements a VideoEncoder that sends image data as a
15 // sequence of RGB values, without compression.
16 class VideoEncoderVerbatim : public VideoEncoder {
17 public:
18 VideoEncoderVerbatim();
19 virtual ~VideoEncoderVerbatim();
21 // VideoEncoder interface.
22 virtual scoped_ptr<VideoPacket> Encode(
23 const webrtc::DesktopFrame& frame) OVERRIDE;
25 private:
26 // Allocates a buffer of the specified |size| inside |packet| and returns the
27 // pointer to it.
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_