Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: content/common/gpu/media/vaapi_video_encode_accelerator.cc

Issue 804353003: Revert of Refactor Vaapi video decoder/encoder in preparation of Freon support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.h ('k') | content/common/gpu/media/vaapi_wrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fa3a60070629f3a0d630141133440fed1f5b61ce..19e1c0820dd1b4d7c741e30935cee9de30f7de28 100644
--- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -113,7 +113,8 @@
return profiles;
std::vector<media::VideoCodecProfile> hw_profiles =
- VaapiWrapper::GetSupportedEncodeProfiles(base::Bind(&base::DoNothing));
+ VaapiWrapper::GetSupportedEncodeProfiles(
+ x_display_, base::Bind(&base::DoNothing));
media::VideoEncodeAccelerator::SupportedProfile profile;
profile.max_resolution.SetSize(1920, 1088);
@@ -138,11 +139,12 @@
return log;
}
-VaapiVideoEncodeAccelerator::VaapiVideoEncodeAccelerator()
+VaapiVideoEncodeAccelerator::VaapiVideoEncodeAccelerator(Display* x_display)
: 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),
@@ -215,8 +217,9 @@
vaapi_wrapper_ = VaapiWrapper::Create(VaapiWrapper::kEncode,
output_profile,
+ x_display_,
base::Bind(&ReportToUMA, VAAPI_ERROR));
- if (!vaapi_wrapper_.get()) {
+ if (!vaapi_wrapper_) {
LOG(ERROR) << "Failed initializing VAAPI";
return false;
}
@@ -601,12 +604,12 @@
return false;
}
- current_encode_job_->input_surface = new VASurface(
- available_va_surface_ids_.back(), coded_size_, va_surface_release_cb_);
+ current_encode_job_->input_surface =
+ new VASurface(available_va_surface_ids_.back(), va_surface_release_cb_);
available_va_surface_ids_.pop_back();
- current_encode_job_->recon_surface = new VASurface(
- available_va_surface_ids_.back(), coded_size_, va_surface_release_cb_);
+ current_encode_job_->recon_surface =
+ new VASurface(available_va_surface_ids_.back(), va_surface_release_cb_);
available_va_surface_ids_.pop_back();
// Reference surfaces are needed until the job is done, but they get
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.h ('k') | content/common/gpu/media/vaapi_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698