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

Unified Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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 | « media/gpu/dxva_video_decode_accelerator_win.h ('k') | media/midi/midi_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_video_decode_accelerator_win.cc
diff --git a/media/gpu/dxva_video_decode_accelerator_win.cc b/media/gpu/dxva_video_decode_accelerator_win.cc
index 114dea2fd82bc1cb4fb2ab02a9d4f1b79aa9ce43..7bffa2e015bae0fd1a54b04b7b5b80535e173047 100644
--- a/media/gpu/dxva_video_decode_accelerator_win.cc
+++ b/media/gpu/dxva_video_decode_accelerator_win.cc
@@ -501,6 +501,7 @@ DXVAVideoDecodeAccelerator::DXVAVideoDecodeAccelerator(
codec_(kUnknownVideoCodec),
decoder_thread_("DXVAVideoDecoderThread"),
pending_flush_(false),
+ enable_low_latency_(gpu_preferences.enable_low_latency_dxva),
share_nv12_textures_(gpu_preferences.enable_zero_copy_dxgi_video &&
!workarounds.disable_dxgi_zero_copy_video),
copy_nv12_textures_(gpu_preferences.enable_nv12_dxgi_video &&
@@ -1453,11 +1454,13 @@ bool DXVAVideoDecodeAccelerator::CheckDecoderDxvaSupport() {
RETURN_ON_HR_FAILURE(hr, "Failed to enable DXVA H/W decoding", false);
}
- hr = attributes->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE);
- if (SUCCEEDED(hr)) {
- DVLOG(1) << "Successfully set Low latency mode on decoder.";
- } else {
- DVLOG(1) << "Failed to set Low latency mode on decoder. Error: " << hr;
+ if (enable_low_latency_) {
+ hr = attributes->SetUINT32(CODECAPI_AVLowLatencyMode, TRUE);
+ if (SUCCEEDED(hr)) {
+ DVLOG(1) << "Successfully set Low latency mode on decoder.";
+ } else {
+ DVLOG(1) << "Failed to set Low latency mode on decoder. Error: " << hr;
+ }
}
auto* gl_context = get_gl_context_cb_.Run();
« no previous file with comments | « media/gpu/dxva_video_decode_accelerator_win.h ('k') | media/midi/midi_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698