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

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: 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { 933 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) {
934 NOTREACHED() << "GL callbacks are required for this VDA"; 934 NOTREACHED() << "GL callbacks are required for this VDA";
935 return false; 935 return false;
936 } 936 }
937 937
938 if (config.is_encrypted) { 938 if (config.is_encrypted) {
939 NOTREACHED() << "Encrypted streams are not supported for this VDA"; 939 NOTREACHED() << "Encrypted streams are not supported for this VDA";
940 return false; 940 return false;
941 } 941 }
942 942
943 if (config.output_mode != Config::OutputMode::ALLOCATE) {
944 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA";
945 return false;
946 }
947
943 client_ = client; 948 client_ = client;
944 949
945 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); 950 main_thread_task_runner_ = base::MessageLoop::current()->task_runner();
946 951
947 bool profile_supported = false; 952 bool profile_supported = false;
948 for (const auto& supported_profile : kSupportedProfiles) { 953 for (const auto& supported_profile : kSupportedProfiles) {
949 if (config.profile == supported_profile) { 954 if (config.profile == supported_profile) {
950 profile_supported = true; 955 profile_supported = true;
951 break; 956 break;
952 } 957 }
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 DismissStaleBuffers(true); 2980 DismissStaleBuffers(true);
2976 Invalidate(); 2981 Invalidate();
2977 Initialize(config_, client_); 2982 Initialize(config_, client_);
2978 decoder_thread_task_runner_->PostTask( 2983 decoder_thread_task_runner_->PostTask(
2979 FROM_HERE, 2984 FROM_HERE,
2980 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, 2985 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers,
2981 base::Unretained(this))); 2986 base::Unretained(this)));
2982 } 2987 }
2983 2988
2984 } // namespace content 2989 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/android_video_decode_accelerator.cc ('k') | content/common/gpu/media/generic_v4l2_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698