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

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

Issue 597473002: Change log level to show real errors in release mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Pawel's review comments Created 6 years, 3 months 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
Index: content/common/gpu/media/vaapi_wrapper.cc
diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc
index 5e93b994db02dcf52301327e0c285b82a148e001..2914d5903ab23d02ad5bf674b8f6ca5955f409c5 100644
--- a/content/common/gpu/media/vaapi_wrapper.cc
+++ b/content/common/gpu/media/vaapi_wrapper.cc
@@ -24,7 +24,7 @@ static const base::FilePath::CharType kVaLib[] =
#define LOG_VA_ERROR_AND_REPORT(va_error, err_msg) \
do { \
- DVLOG(1) << err_msg \
+ LOG(ERROR) << err_msg \
<< " VA error: " << vaErrorStr(va_error); \
report_error_to_uma_cb_.Run(); \
} while (0)
@@ -157,7 +157,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
const base::Closure& report_error_to_uma_cb) {
static bool vaapi_functions_initialized = PostSandboxInitialization();
if (!vaapi_functions_initialized) {
- DVLOG(1) << "Failed to initialize VAAPI libs";
+ LOG(ERROR) << "Failed to initialize VAAPI libs";
return false;
}
@@ -167,7 +167,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
va_display_ = vaGetDisplay(x_display);
if (!vaDisplayIsValid(va_display_)) {
- DVLOG(1) << "Could not get a valid VA display";
+ LOG(ERROR) << "Could not get a valid VA display";
return false;
}
@@ -176,7 +176,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
DVLOG(1) << "VAAPI version: " << major_version_ << "." << minor_version_;
if (VAAPIVersionLessThan(0, 34)) {
- DVLOG(1) << "VAAPI version < 0.34 is not supported.";
+ LOG(ERROR) << "VAAPI version < 0.34 is not supported.";
return false;
}
@@ -190,7 +190,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
va_display_, &supported_profiles[0], &num_supported_profiles);
VA_SUCCESS_OR_RETURN(va_res, "vaQueryConfigProfiles failed", false);
if (num_supported_profiles < 0 || num_supported_profiles > max_profiles) {
- DVLOG(1) << "vaQueryConfigProfiles returned: " << num_supported_profiles;
+ LOG(ERROR) << "vaQueryConfigProfiles returned: " << num_supported_profiles;
return false;
}
@@ -198,7 +198,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
VAProfile va_profile = ProfileToVAProfile(profile, supported_profiles);
if (va_profile == VAProfileNone) {
- DVLOG(1) << "Unsupported profile";
+ LOG(ERROR) << "Unsupported profile";
Pawel Osciak 2014/10/02 08:58:53 This is not an ERROR, will happen on devices that
return false;
}
@@ -215,8 +215,8 @@ bool VaapiWrapper::Initialize(CodecMode mode,
VA_SUCCESS_OR_RETURN(va_res, "vaQueryConfigEntrypoints failed", false);
if (num_supported_entrypoints < 0 ||
num_supported_entrypoints > max_entrypoints) {
- DVLOG(1) << "vaQueryConfigEntrypoints returned: "
- << num_supported_entrypoints;
+ LOG(ERROR) << "vaQueryConfigEntrypoints returned: "
+ << num_supported_entrypoints;
return false;
}
@@ -226,7 +226,7 @@ bool VaapiWrapper::Initialize(CodecMode mode,
if (std::find(supported_entrypoints.begin(),
supported_entrypoints.end(),
entrypoint) == supported_entrypoints.end()) {
- DVLOG(1) << "Unsupported entrypoint";
+ LOG(ERROR) << "Unsupported entrypoint";
Pawel Osciak 2014/10/02 08:58:53 Ditto.
return false;
}
@@ -255,8 +255,8 @@ bool VaapiWrapper::Initialize(CodecMode mode,
if (attribs[i].type != required_attribs[i].type ||
(attribs[i].value & required_attribs[i].value) !=
required_attribs[i].value) {
- DVLOG(1) << "Unsupported value " << required_attribs[i].value
- << " for attribute type " << required_attribs[i].type;
+ LOG(ERROR) << "Unsupported value " << required_attribs[i].value
Pawel Osciak 2014/10/02 08:58:54 Also not an error to report.
+ << " for attribute type " << required_attribs[i].type;
return false;
}
}
@@ -578,12 +578,12 @@ bool VaapiWrapper::UploadVideoFrameToSurface(
base::Bind(&DestroyVAImage, va_display_, image));
if (image.format.fourcc != VA_FOURCC_NV12) {
- DVLOG(1) << "Unsupported image format: " << image.format.fourcc;
+ LOG(ERROR) << "Unsupported image format: " << image.format.fourcc;
return false;
}
if (gfx::Rect(image.width, image.height) < gfx::Rect(frame->coded_size())) {
- DVLOG(1) << "Buffer too small to fit the frame.";
+ LOG(ERROR) << "Buffer too small to fit the frame.";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698