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

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

Issue 1822983002: Support external buffer import in VDA interface and add a V4L2SVDA impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include reland of crrev.com/1643123003 with fixes and rebase 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { 930 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) {
931 NOTREACHED() << "GL callbacks are required for this VDA"; 931 NOTREACHED() << "GL callbacks are required for this VDA";
932 return false; 932 return false;
933 } 933 }
934 934
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) {
941 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA";
942 return false;
943 }
944
940 client_ = client; 945 client_ = client;
941 946
942 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); 947 main_thread_task_runner_ = base::MessageLoop::current()->task_runner();
943 948
944 bool profile_supported = false; 949 bool profile_supported = false;
945 for (const auto& supported_profile : kSupportedProfiles) { 950 for (const auto& supported_profile : kSupportedProfiles) {
946 if (config.profile == supported_profile) { 951 if (config.profile == supported_profile) {
947 profile_supported = true; 952 profile_supported = true;
948 break; 953 break;
949 } 954 }
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 DismissStaleBuffers(true); 2971 DismissStaleBuffers(true);
2967 Invalidate(); 2972 Invalidate();
2968 Initialize(config_, client_); 2973 Initialize(config_, client_);
2969 decoder_thread_task_runner_->PostTask( 2974 decoder_thread_task_runner_->PostTask(
2970 FROM_HERE, 2975 FROM_HERE,
2971 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, 2976 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers,
2972 base::Unretained(this))); 2977 base::Unretained(this)));
2973 } 2978 }
2974 2979
2975 } // namespace content 2980 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698