| Index: remoting/codec/video_decoder_vpx.cc
|
| diff --git a/remoting/codec/video_decoder_vpx.cc b/remoting/codec/video_decoder_vpx.cc
|
| index a312ba059fe769837f157387f01db42e9e79c045..fd0069d3ed9bf265914215c8d394a239781a2ba2 100644
|
| --- a/remoting/codec/video_decoder_vpx.cc
|
| +++ b/remoting/codec/video_decoder_vpx.cc
|
| @@ -61,6 +61,26 @@ scoped_ptr<VideoDecoderVpx> VideoDecoderVpx::CreateForVP8() {
|
| return scoped_ptr<VideoDecoderVpx>(new VideoDecoderVpx(codec.Pass()));
|
| }
|
|
|
| +// static
|
| +scoped_ptr<VideoDecoderVpx> VideoDecoderVpx::CreateForVP9() {
|
| + ScopedVpxCodec codec(new vpx_codec_ctx_t);
|
| +
|
| + // TODO(hclam): Scale the number of threads with number of cores of the
|
| + // machine.
|
| + vpx_codec_dec_cfg config;
|
| + config.w = 0;
|
| + config.h = 0;
|
| + config.threads = 2;
|
| + vpx_codec_err_t ret =
|
| + vpx_codec_dec_init(codec.get(), vpx_codec_vp9_dx(), &config, 0);
|
| + if (ret != VPX_CODEC_OK) {
|
| + LOG(INFO) << "Cannot initialize codec.";
|
| + return scoped_ptr<VideoDecoderVpx>();
|
| + }
|
| +
|
| + return scoped_ptr<VideoDecoderVpx>(new VideoDecoderVpx(codec.Pass()));
|
| +}
|
| +
|
| VideoDecoderVpx::~VideoDecoderVpx() {}
|
|
|
| void VideoDecoderVpx::Initialize(const webrtc::DesktopSize& screen_size) {
|
|
|