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