Simplify VideoDecoder interface
Previously VideoDecoder allowed to resize the frames. It's no longer
used anywhere, so the interface can be simplified.
BUG=256850, 486917
Review URL: https://codereview.chromium.org/1301233002
Cr-Commit-Position: refs/heads/master@{#344603}
diff --git a/remoting/codec/video_decoder_vpx.h b/remoting/codec/video_decoder_vpx.h
index ea72defc..81ba9e4 100644
--- a/remoting/codec/video_decoder_vpx.h
+++ b/remoting/codec/video_decoder_vpx.h
@@ -9,12 +9,15 @@
#include "base/memory/scoped_ptr.h"
#include "remoting/codec/scoped_vpx_codec.h"
#include "remoting/codec/video_decoder.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
-#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
typedef const struct vpx_codec_iface vpx_codec_iface_t;
typedef struct vpx_image vpx_image_t;
+namespace webrtc {
+class DesktopRect;
+class DesktopRegion;
+} // namespace webrtc
+
namespace remoting {
class VideoDecoderVpx : public VideoDecoder {
@@ -26,30 +29,14 @@
~VideoDecoderVpx() override;
// VideoDecoder interface.
- bool DecodePacket(const VideoPacket& packet) override;
- void Invalidate(const webrtc::DesktopSize& view_size,
- const webrtc::DesktopRegion& region) override;
- void RenderFrame(const webrtc::DesktopSize& view_size,
- const webrtc::DesktopRect& clip_area,
- uint8* image_buffer,
- int image_stride,
- webrtc::DesktopRegion* output_region) override;
- const webrtc::DesktopRegion* GetImageShape() override;
+ bool DecodePacket(const VideoPacket& packet,
+ webrtc::DesktopFrame* frame) override;
private:
explicit VideoDecoderVpx(vpx_codec_iface_t* codec);
- // Returns the dimensions of the most recent frame as a DesktopSize.
- webrtc::DesktopSize image_size() const;
-
ScopedVpxCodec codec_;
- // Pointer to the most recently decoded image.
- vpx_image_t* image_;
-
- // Area of the source that has changed since the last RenderFrame call.
- webrtc::DesktopRegion updated_region_;
-
// The shape of the most-recent frame, if any.
scoped_ptr<webrtc::DesktopRegion> desktop_shape_;