| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 struct vpx_image vpx_image_t; | 15 typedef struct vpx_image vpx_image_t; |
| 16 | 16 |
| 17 namespace remoting { | 17 namespace remoting { |
| 18 | 18 |
| 19 class VideoDecoderVpx : public VideoDecoder { | 19 class VideoDecoderVpx : public VideoDecoder { |
| 20 public: | 20 public: |
| 21 // Creates a decoder for VP8. | 21 // Create decoders for the specified protocol. |
| 22 static scoped_ptr<VideoDecoderVpx> CreateForVP8(); | 22 static scoped_ptr<VideoDecoderVpx> CreateForVP8(); |
| 23 static scoped_ptr<VideoDecoderVpx> CreateForVP9(); |
| 23 | 24 |
| 24 virtual ~VideoDecoderVpx(); | 25 virtual ~VideoDecoderVpx(); |
| 25 | 26 |
| 26 // VideoDecoder interface. | 27 // VideoDecoder interface. |
| 27 virtual void Initialize(const webrtc::DesktopSize& screen_size) OVERRIDE; | 28 virtual void Initialize(const webrtc::DesktopSize& screen_size) OVERRIDE; |
| 28 virtual bool DecodePacket(const VideoPacket& packet) OVERRIDE; | 29 virtual bool DecodePacket(const VideoPacket& packet) OVERRIDE; |
| 29 virtual void Invalidate(const webrtc::DesktopSize& view_size, | 30 virtual void Invalidate(const webrtc::DesktopSize& view_size, |
| 30 const webrtc::DesktopRegion& region) OVERRIDE; | 31 const webrtc::DesktopRegion& region) OVERRIDE; |
| 31 virtual void RenderFrame(const webrtc::DesktopSize& view_size, | 32 virtual void RenderFrame(const webrtc::DesktopSize& view_size, |
| 32 const webrtc::DesktopRect& clip_area, | 33 const webrtc::DesktopRect& clip_area, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 59 | 60 |
| 60 // The region that should be make transparent. | 61 // The region that should be make transparent. |
| 61 webrtc::DesktopRegion transparent_region_; | 62 webrtc::DesktopRegion transparent_region_; |
| 62 | 63 |
| 63 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx); | 64 DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx); |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace remoting | 67 } // namespace remoting |
| 67 | 68 |
| 68 #endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_ | 69 #endif // REMOTING_CODEC_VIDEO_DECODER_VP8_H_ |
| OLD | NEW |