Revert of Remove OneClickSigninHelper since it is no longer used. (patchset #5 id...
[chromium-blink-merge.git] / remoting / codec / video_decoder_verbatim.h
blob6a9ba40b2597df19f07532be4d70ffabcd88c36a
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_DECODER_VERBATIM_H_
6 #define REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/codec/video_decoder.h"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
14 namespace remoting {
16 // Video decoder implementations that decodes video packet encoded by
17 // VideoEncoderVerbatim. It just copies data from incoming packets to the
18 // video frames.
19 class VideoDecoderVerbatim : public VideoDecoder {
20 public:
21 ~VideoDecoderVerbatim() override;
23 VideoDecoderVerbatim();
25 // VideoDecoder implementation.
26 void Initialize(const webrtc::DesktopSize& screen_size) override;
27 bool DecodePacket(const VideoPacket& packet) override;
28 void Invalidate(const webrtc::DesktopSize& view_size,
29 const webrtc::DesktopRegion& region) override;
30 void RenderFrame(const webrtc::DesktopSize& view_size,
31 const webrtc::DesktopRect& clip_area,
32 uint8* image_buffer,
33 int image_stride,
34 webrtc::DesktopRegion* output_region) override;
35 const webrtc::DesktopRegion* GetImageShape() override;
37 private:
38 // The region updated that hasn't been copied to the screen yet.
39 webrtc::DesktopRegion updated_region_;
41 // Size of the remote screen.
42 webrtc::DesktopSize screen_size_;
44 // The bitmap holding the remote screen bits.
45 scoped_ptr<uint8[]> screen_buffer_;
47 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVerbatim);
50 } // namespace remoting
52 #endif // REMOTING_CODEC_VIDEO_DECODER_VERBATIM_H_