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

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, 9 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { 319 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) {
320 NOTREACHED() << "GL callbacks are required for this VDA"; 320 NOTREACHED() << "GL callbacks are required for this VDA";
321 return false; 321 return false;
322 } 322 }
323 323
324 if (config.is_encrypted) { 324 if (config.is_encrypted) {
325 NOTREACHED() << "Encrypted streams are not supported for this VDA"; 325 NOTREACHED() << "Encrypted streams are not supported for this VDA";
326 return false; 326 return false;
327 } 327 }
328 328
329 if (config.output_mode != Config::OutputMode::ALLOCATE) {
330 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA";
331 return false;
332 }
333
329 client_ = client; 334 client_ = client;
330 335
331 if (!InitializeVideoToolbox()) 336 if (!InitializeVideoToolbox())
332 return false; 337 return false;
333 338
334 bool profile_supported = false; 339 bool profile_supported = false;
335 for (const auto& supported_profile : kSupportedProfiles) { 340 for (const auto& supported_profile : kSupportedProfiles) {
336 if (config.profile == supported_profile) { 341 if (config.profile == supported_profile) {
337 profile_supported = true; 342 profile_supported = true;
338 break; 343 break;
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 SupportedProfile profile; 1171 SupportedProfile profile;
1167 profile.profile = supported_profile; 1172 profile.profile = supported_profile;
1168 profile.min_resolution.SetSize(16, 16); 1173 profile.min_resolution.SetSize(16, 16);
1169 profile.max_resolution.SetSize(4096, 2160); 1174 profile.max_resolution.SetSize(4096, 2160);
1170 profiles.push_back(profile); 1175 profiles.push_back(profile);
1171 } 1176 }
1172 return profiles; 1177 return profiles;
1173 } 1178 }
1174 1179
1175 } // namespace content 1180 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698