blob: 81ba9e447ff17eb7e19a7e02a1d2704b44bacb04 [file] [log] [blame]
[email protected]a43cfae2013-10-19 22:14:541// Copyright 2013 The Chromium Authors. All rights reserved.
[email protected]622b7882010-09-29 17:34:322// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]a43cfae2013-10-19 22:14:545#ifndef REMOTING_CODEC_VIDEO_DECODER_VPX_H_
6#define REMOTING_CODEC_VIDEO_DECODER_VPX_H_
[email protected]622b7882010-09-29 17:34:327
[email protected]71f40a72012-05-16 07:26:598#include "base/compiler_specific.h"
[email protected]a43cfae2013-10-19 22:14:549#include "base/memory/scoped_ptr.h"
10#include "remoting/codec/scoped_vpx_codec.h"
[email protected]38609832012-08-23 01:36:1011#include "remoting/codec/video_decoder.h"
[email protected]622b7882010-09-29 17:34:3212
wez070889b2015-07-17 03:19:1513typedef const struct vpx_codec_iface vpx_codec_iface_t;
[email protected]47379e92011-07-26 15:33:1514typedef struct vpx_image vpx_image_t;
[email protected]622b7882010-09-29 17:34:3215
sergeyuef92de202015-08-20 22:47:3716namespace webrtc {
17class DesktopRect;
18class DesktopRegion;
19} // namespace webrtc
20
[email protected]622b7882010-09-29 17:34:3221namespace remoting {
22
[email protected]a43cfae2013-10-19 22:14:5423class VideoDecoderVpx : public VideoDecoder {
[email protected]622b7882010-09-29 17:34:3224 public:
[email protected]87196ce2013-10-22 01:53:3925 // Create decoders for the specified protocol.
[email protected]a43cfae2013-10-19 22:14:5426 static scoped_ptr<VideoDecoderVpx> CreateForVP8();
[email protected]87196ce2013-10-22 01:53:3927 static scoped_ptr<VideoDecoderVpx> CreateForVP9();
[email protected]622b7882010-09-29 17:34:3228
dcheng562aba52014-10-21 12:30:1429 ~VideoDecoderVpx() override;
[email protected]a43cfae2013-10-19 22:14:5430
31 // VideoDecoder interface.
sergeyuef92de202015-08-20 22:47:3732 bool DecodePacket(const VideoPacket& packet,
33 webrtc::DesktopFrame* frame) override;
[email protected]622b7882010-09-29 17:34:3234
35 private:
wez070889b2015-07-17 03:19:1536 explicit VideoDecoderVpx(vpx_codec_iface_t* codec);
[email protected]da4daa7f2013-06-21 10:16:4137
[email protected]a43cfae2013-10-19 22:14:5438 ScopedVpxCodec codec_;
[email protected]622b7882010-09-29 17:34:3239
wez070889b2015-07-17 03:19:1540 // The shape of the most-recent frame, if any.
41 scoped_ptr<webrtc::DesktopRegion> desktop_shape_;
[email protected]da4daa7f2013-06-21 10:16:4142
[email protected]a43cfae2013-10-19 22:14:5443 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx);
[email protected]622b7882010-09-29 17:34:3244};
45
46} // namespace remoting
47
[email protected]38609832012-08-23 01:36:1048#endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_