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

Side by Side Diff: content/common/gpu/media/vt_video_decode_accelerator_mac.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 6
7 #include <CoreVideo/CoreVideo.h> 7 #include <CoreVideo/CoreVideo.h>
8 #include <OpenGL/CGLIOSurface.h> 8 #include <OpenGL/CGLIOSurface.h>
9 #include <OpenGL/gl.h> 9 #include <OpenGL/gl.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { 314 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) {
315 NOTREACHED() << "GL callbacks are required for this VDA"; 315 NOTREACHED() << "GL callbacks are required for this VDA";
316 return false; 316 return false;
317 } 317 }
318 318
319 if (config.is_encrypted) { 319 if (config.is_encrypted) {
320 NOTREACHED() << "Encrypted streams are not supported for this VDA"; 320 NOTREACHED() << "Encrypted streams are not supported for this VDA";
321 return false; 321 return false;
322 } 322 }
323 323
324 if (config.output_mode != Config::OutputMode::ALLOCATE) {
325 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA";
326 return false;
327 }
328
324 client_ = client; 329 client_ = client;
325 330
326 if (!InitializeVideoToolbox()) 331 if (!InitializeVideoToolbox())
327 return false; 332 return false;
328 333
329 bool profile_supported = false; 334 bool profile_supported = false;
330 for (const auto& supported_profile : kSupportedProfiles) { 335 for (const auto& supported_profile : kSupportedProfiles) {
331 if (config.profile == supported_profile) { 336 if (config.profile == supported_profile) {
332 profile_supported = true; 337 profile_supported = true;
333 break; 338 break;
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 SupportedProfile profile; 1145 SupportedProfile profile;
1141 profile.profile = supported_profile; 1146 profile.profile = supported_profile;
1142 profile.min_resolution.SetSize(16, 16); 1147 profile.min_resolution.SetSize(16, 16);
1143 profile.max_resolution.SetSize(4096, 2160); 1148 profile.max_resolution.SetSize(4096, 2160);
1144 profiles.push_back(profile); 1149 profiles.push_back(profile);
1145 } 1150 }
1146 return profiles; 1151 return profiles;
1147 } 1152 }
1148 1153
1149 } // namespace content 1154 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698