| OLD | NEW |
| 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 "content/common/gpu/media/vt_video_decode_accelerator_mac.h" | 5 #include "content/common/gpu/media/vt_video_decode_accelerator_mac.h" |
| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { | 320 if (make_context_current_cb_.is_null() || bind_image_cb_.is_null()) { |
| 321 NOTREACHED() << "GL callbacks are required for this VDA"; | 321 NOTREACHED() << "GL callbacks are required for this VDA"; |
| 322 return false; | 322 return false; |
| 323 } | 323 } |
| 324 | 324 |
| 325 if (config.is_encrypted) { | 325 if (config.is_encrypted) { |
| 326 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 326 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
| 327 return false; | 327 return false; |
| 328 } | 328 } |
| 329 | 329 |
| 330 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
| 331 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
| 332 return false; |
| 333 } |
| 334 |
| 330 client_ = client; | 335 client_ = client; |
| 331 | 336 |
| 332 if (!InitializeVideoToolbox()) | 337 if (!InitializeVideoToolbox()) |
| 333 return false; | 338 return false; |
| 334 | 339 |
| 335 bool profile_supported = false; | 340 bool profile_supported = false; |
| 336 for (const auto& supported_profile : kSupportedProfiles) { | 341 for (const auto& supported_profile : kSupportedProfiles) { |
| 337 if (config.profile == supported_profile) { | 342 if (config.profile == supported_profile) { |
| 338 profile_supported = true; | 343 profile_supported = true; |
| 339 break; | 344 break; |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 SupportedProfile profile; | 1155 SupportedProfile profile; |
| 1151 profile.profile = supported_profile; | 1156 profile.profile = supported_profile; |
| 1152 profile.min_resolution.SetSize(16, 16); | 1157 profile.min_resolution.SetSize(16, 16); |
| 1153 profile.max_resolution.SetSize(4096, 2160); | 1158 profile.max_resolution.SetSize(4096, 2160); |
| 1154 profiles.push_back(profile); | 1159 profiles.push_back(profile); |
| 1155 } | 1160 } |
| 1156 return profiles; | 1161 return profiles; |
| 1157 } | 1162 } |
| 1158 | 1163 |
| 1159 } // namespace content | 1164 } // namespace content |
| OLD | NEW |