Chromium Code Reviews| Index: content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| index 14ffe34355012f74e4ce4e72c13f24ae8b915b7a..7dd076a0dabaca680fa4dd5d46119b21b93b1205 100644 |
| --- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| +++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc |
| @@ -113,8 +113,7 @@ VaapiVideoEncodeAccelerator::GetSupportedProfiles() { |
| return profiles; |
| std::vector<media::VideoCodecProfile> hw_profiles = |
| - VaapiWrapper::GetSupportedEncodeProfiles( |
| - x_display_, base::Bind(&base::DoNothing)); |
| + VaapiWrapper::GetSupportedEncodeProfiles(base::Bind(&base::DoNothing)); |
| media::VideoEncodeAccelerator::SupportedProfile profile; |
| profile.max_resolution.SetSize(1920, 1088); |
| @@ -139,12 +138,11 @@ static unsigned int Log2OfPowerOf2(unsigned int x) { |
| return log; |
| } |
| -VaapiVideoEncodeAccelerator::VaapiVideoEncodeAccelerator(Display* x_display) |
| +VaapiVideoEncodeAccelerator::VaapiVideoEncodeAccelerator() |
| : profile_(media::VIDEO_CODEC_PROFILE_UNKNOWN), |
| mb_width_(0), |
| mb_height_(0), |
| output_buffer_byte_size_(0), |
| - x_display_(x_display), |
| state_(kUninitialized), |
| frame_num_(0), |
| last_idr_frame_num_(0), |
| @@ -217,9 +215,8 @@ bool VaapiVideoEncodeAccelerator::Initialize( |
| vaapi_wrapper_ = VaapiWrapper::Create(VaapiWrapper::kEncode, |
| output_profile, |
| - x_display_, |
| base::Bind(&ReportToUMA, VAAPI_ERROR)); |
| - if (!vaapi_wrapper_) { |
| + if (!vaapi_wrapper_.get()) { |
|
Pawel Osciak
2014/12/08 10:55:15
Is this required?
llandwerlin-old
2014/12/08 16:42:06
Removed by using scoped_refptr.
Pawel Osciak
2014/12/09 01:19:25
What I meant was, do we need to add '.get()'.
llandwerlin-old
2014/12/09 11:19:47
I think that was required at some point with scope
|
| LOG(ERROR) << "Failed initializing VAAPI"; |
| return false; |
| } |
| @@ -605,12 +602,12 @@ bool VaapiVideoEncodeAccelerator::PrepareNextJob() { |
| return false; |
| } |
| - current_encode_job_->input_surface = |
| - new VASurface(available_va_surface_ids_.back(), va_surface_release_cb_); |
| + current_encode_job_->input_surface = new VASurface( |
| + available_va_surface_ids_.back(), coded_size_, va_surface_release_cb_); |
| available_va_surface_ids_.pop_back(); |
| - current_encode_job_->recon_surface = |
| - new VASurface(available_va_surface_ids_.back(), va_surface_release_cb_); |
| + current_encode_job_->recon_surface = new VASurface( |
| + available_va_surface_ids_.back(), coded_size_, va_surface_release_cb_); |
| available_va_surface_ids_.pop_back(); |
| // Reference surfaces are needed until the job is done, but they get |