Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/renderer/pepper/video_encoder_shim.h" | 5 #include "content/renderer/pepper/video_encoder_shim.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 *cpu_used = kVp8DefaultCpuUsed; | 70 *cpu_used = kVp8DefaultCpuUsed; |
| 71 break; | 71 break; |
| 72 case media::VP9PROFILE_ANY: | 72 case media::VP9PROFILE_ANY: |
| 73 *vpx_codec = vpx_codec_vp9_cx(); | 73 *vpx_codec = vpx_codec_vp9_cx(); |
| 74 *min_quantizer = kVp9DefaultMinQuantizer; | 74 *min_quantizer = kVp9DefaultMinQuantizer; |
| 75 *max_quantizer = kVp9DefaultMaxQuantizer; | 75 *max_quantizer = kVp9DefaultMaxQuantizer; |
| 76 *cpu_used = kVp9DefaultCpuUsed; | 76 *cpu_used = kVp9DefaultCpuUsed; |
| 77 break; | 77 break; |
| 78 default: | 78 default: |
| 79 *vpx_codec = nullptr; | 79 *vpx_codec = nullptr; |
| 80 *min_quantizer = kVp9DefaultMinQuantizer; | |
| 81 *max_quantizer = kVp9DefaultMaxQuantizer; | |
| 82 *cpu_used = kVp9DefaultCpuUsed; | |
|
bbudge-google
2015/08/06 12:26:25
nit: Just zero them to make it clear this is an er
| |
| 80 NOTREACHED(); | 83 NOTREACHED(); |
| 81 } | 84 } |
| 82 } | 85 } |
| 83 | 86 |
| 84 } // namespace | 87 } // namespace |
| 85 | 88 |
| 86 class VideoEncoderShim::EncoderImpl { | 89 class VideoEncoderShim::EncoderImpl { |
| 87 public: | 90 public: |
| 88 explicit EncoderImpl(const base::WeakPtr<VideoEncoderShim>& shim); | 91 explicit EncoderImpl(const base::WeakPtr<VideoEncoderShim>& shim); |
| 89 ~EncoderImpl(); | 92 ~EncoderImpl(); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 459 } | 462 } |
| 460 | 463 |
| 461 void VideoEncoderShim::OnNotifyError( | 464 void VideoEncoderShim::OnNotifyError( |
| 462 media::VideoEncodeAccelerator::Error error) { | 465 media::VideoEncodeAccelerator::Error error) { |
| 463 DCHECK(RenderThreadImpl::current()); | 466 DCHECK(RenderThreadImpl::current()); |
| 464 | 467 |
| 465 host_->NotifyError(error); | 468 host_->NotifyError(error); |
| 466 } | 469 } |
| 467 | 470 |
| 468 } // namespace content | 471 } // namespace content |
| OLD | NEW |