OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_CODEC_VIDEO_DECODER_VPX_H_ | 5 #ifndef REMOTING_CODEC_VIDEO_DECODER_VPX_H_ |
6 #define REMOTING_CODEC_VIDEO_DECODER_VPX_H_ | 6 #define REMOTING_CODEC_VIDEO_DECODER_VPX_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "remoting/codec/scoped_vpx_codec.h" | 10 #include "remoting/codec/scoped_vpx_codec.h" |
11 #include "remoting/codec/video_decoder.h" | 11 #include "remoting/codec/video_decoder.h" |
12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
13 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 13 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
14 | 14 |
15 typedef const struct vpx_codec_iface vpx_codec_iface_t; | 15 typedef const struct vpx_codec_iface vpx_codec_iface_t; |
16 typedef struct vpx_image vpx_image_t; | 16 typedef struct vpx_image vpx_image_t; |
17 | 17 |
18 namespace remoting { | 18 namespace remoting { |
19 | 19 |
20 class VideoDecoderVpx : public VideoDecoder { | 20 class VideoDecoderVpx : public VideoDecoder { |
21 public: | 21 public: |
22 // Create decoders for the specified protocol. | 22 // Create decoders for the specified protocol. |
23 static scoped_ptr<VideoDecoderVpx> CreateForVP8(); | 23 static scoped_ptr<VideoDecoderVpx> CreateForVP8(); |
24 static scoped_ptr<VideoDecoderVpx> CreateForVP9(); | 24 static scoped_ptr<VideoDecoderVpx> CreateForVP9(); |
25 | 25 |
26 ~VideoDecoderVpx() override; | 26 ~VideoDecoderVpx() override; |
27 | 27 |
28 // VideoDecoder interface. | 28 // VideoDecoder interface. |
29 void Initialize(const webrtc::DesktopSize& source_size) override; | |
30 bool DecodePacket(const VideoPacket& packet) override; | 29 bool DecodePacket(const VideoPacket& packet) override; |
31 void Invalidate(const webrtc::DesktopSize& view_size, | 30 void Invalidate(const webrtc::DesktopSize& view_size, |
32 const webrtc::DesktopRegion& region) override; | 31 const webrtc::DesktopRegion& region) override; |
33 void RenderFrame(const webrtc::DesktopSize& view_size, | 32 void RenderFrame(const webrtc::DesktopSize& view_size, |
34 const webrtc::DesktopRect& clip_area, | 33 const webrtc::DesktopRect& clip_area, |
35 uint8* image_buffer, | 34 uint8* image_buffer, |
36 int image_stride, | 35 int image_stride, |
37 webrtc::DesktopRegion* output_region) override; | 36 webrtc::DesktopRegion* output_region) override; |
38 const webrtc::DesktopRegion* GetImageShape() override; | 37 const webrtc::DesktopRegion* GetImageShape() override; |
39 | 38 |
(...skipping 13 matching lines...) Expand all Loading... |
53 | 52 |
54 // The shape of the most-recent frame, if any. | 53 // The shape of the most-recent frame, if any. |
55 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; | 54 scoped_ptr<webrtc::DesktopRegion> desktop_shape_; |
56 | 55 |
57 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx); | 56 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx); |
58 }; | 57 }; |
59 | 58 |
60 } // namespace remoting | 59 } // namespace remoting |
61 | 60 |
62 #endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_ | 61 #endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_ |
OLD | NEW |