| Index: remoting/codec/video_encoder_vpx.h
|
| diff --git a/remoting/codec/video_encoder_vpx.h b/remoting/codec/video_encoder_vpx.h
|
| index dd7fb2ee516c4eff1445972ed4e83b2f039a57b7..8a8d68be642b8999c66cf3c6fbf8a0febb609cb9 100644
|
| --- a/remoting/codec/video_encoder_vpx.h
|
| +++ b/remoting/codec/video_encoder_vpx.h
|
| @@ -23,7 +23,8 @@ class VideoEncoderVpx : public VideoEncoder {
|
| public:
|
| // Create encoder for the specified protocol.
|
| static scoped_ptr<VideoEncoderVpx> CreateForVP8();
|
| - static scoped_ptr<VideoEncoderVpx> CreateForVP9();
|
| + static scoped_ptr<VideoEncoderVpx> CreateForVP9I420();
|
| + static scoped_ptr<VideoEncoderVpx> CreateForVP9I444();
|
|
|
| virtual ~VideoEncoderVpx();
|
|
|
| @@ -33,9 +34,14 @@ class VideoEncoderVpx : public VideoEncoder {
|
|
|
| private:
|
| typedef base::Callback<ScopedVpxCodec(const webrtc::DesktopSize&)>
|
| - InitializeCodecCallback;
|
| + CreateCodecCallback;
|
| + typedef base::Callback<void(const webrtc::DesktopSize&,
|
| + scoped_ptr<vpx_image_t>* out_image,
|
| + scoped_ptr<uint8[]>* out_image_buffer)>
|
| + CreateImageCallback;
|
|
|
| - VideoEncoderVpx(const InitializeCodecCallback& init_codec);
|
| + VideoEncoderVpx(const CreateCodecCallback& create_codec,
|
| + const CreateImageCallback& create_image);
|
|
|
| // Initializes the codec for frames of |size|. Returns true if successful.
|
| bool Initialize(const webrtc::DesktopSize& size);
|
| @@ -49,17 +55,20 @@ class VideoEncoderVpx : public VideoEncoder {
|
| // given to the encoder to speed up encoding.
|
| void PrepareActiveMap(const webrtc::DesktopRegion& updated_region);
|
|
|
| - InitializeCodecCallback init_codec_;
|
| + CreateCodecCallback create_codec_;
|
| + CreateImageCallback create_image_;
|
|
|
| ScopedVpxCodec codec_;
|
| + base::TimeTicks timestamp_base_;
|
| +
|
| + // VPX image and buffer to hold the actual YUV planes.
|
| scoped_ptr<vpx_image_t> image_;
|
| + scoped_ptr<uint8[]> image_buffer_;
|
| +
|
| + // Active map used to optimize out processing of un-changed macroblocks.
|
| scoped_ptr<uint8[]> active_map_;
|
| int active_map_width_;
|
| int active_map_height_;
|
| - base::TimeTicks timestamp_base_;
|
| -
|
| - // Buffer for storing the yuv image.
|
| - scoped_ptr<uint8[]> yuv_image_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(VideoEncoderVpx);
|
| };
|
|
|