cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / remoting / codec / video_decoder_vpx.h
blob81ba9e447ff17eb7e19a7e02a1d2704b44bacb04
1 // Copyright 2013 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_VPX_H_
6 #define REMOTING_CODEC_VIDEO_DECODER_VPX_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/codec/scoped_vpx_codec.h"
11 #include "remoting/codec/video_decoder.h"
13 typedef const struct vpx_codec_iface vpx_codec_iface_t;
14 typedef struct vpx_image vpx_image_t;
16 namespace webrtc {
17 class DesktopRect;
18 class DesktopRegion;
19 } // namespace webrtc
21 namespace remoting {
23 class VideoDecoderVpx : public VideoDecoder {
24 public:
25 // Create decoders for the specified protocol.
26 static scoped_ptr<VideoDecoderVpx> CreateForVP8();
27 static scoped_ptr<VideoDecoderVpx> CreateForVP9();
29 ~VideoDecoderVpx() override;
31 // VideoDecoder interface.
32 bool DecodePacket(const VideoPacket& packet,
33 webrtc::DesktopFrame* frame) override;
35 private:
36 explicit VideoDecoderVpx(vpx_codec_iface_t* codec);
38 ScopedVpxCodec codec_;
40 // The shape of the most-recent frame, if any.
41 scoped_ptr<webrtc::DesktopRegion> desktop_shape_;
43 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx);
46 } // namespace remoting
48 #endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_