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

Side by Side Diff: content/common/gpu/media/dxva_video_decode_accelerator_win.cc

Issue 1816203003: Add an additional VDA::Flush() mode to return all allocated buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/gpu/media/dxva_video_decode_accelerator_win.h" 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #if !defined(OS_WIN) 9 #if !defined(OS_WIN)
10 #error This file should only be built on Windows. 10 #error This file should only be built on Windows.
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 if (config.is_encrypted) { 935 if (config.is_encrypted) {
936 NOTREACHED() << "Encrypted streams are not supported for this VDA"; 936 NOTREACHED() << "Encrypted streams are not supported for this VDA";
937 return false; 937 return false;
938 } 938 }
939 939
940 if (config.output_mode != Config::OutputMode::ALLOCATE) { 940 if (config.output_mode != Config::OutputMode::ALLOCATE) {
941 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; 941 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA";
942 return false; 942 return false;
943 } 943 }
944 944
945 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) {
946 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented";
947 return false;
948 }
949
945 client_ = client; 950 client_ = client;
946 951
947 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); 952 main_thread_task_runner_ = base::MessageLoop::current()->task_runner();
948 953
949 bool profile_supported = false; 954 bool profile_supported = false;
950 for (const auto& supported_profile : kSupportedProfiles) { 955 for (const auto& supported_profile : kSupportedProfiles) {
951 if (config.profile == supported_profile) { 956 if (config.profile == supported_profile) {
952 profile_supported = true; 957 profile_supported = true;
953 break; 958 break;
954 } 959 }
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 DismissStaleBuffers(true); 2976 DismissStaleBuffers(true);
2972 Invalidate(); 2977 Invalidate();
2973 Initialize(config_, client_); 2978 Initialize(config_, client_);
2974 decoder_thread_task_runner_->PostTask( 2979 decoder_thread_task_runner_->PostTask(
2975 FROM_HERE, 2980 FROM_HERE,
2976 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, 2981 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers,
2977 base::Unretained(this))); 2982 base::Unretained(this)));
2978 } 2983 }
2979 2984
2980 } // namespace content 2985 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698