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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 332 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
333 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 333 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
334 return false; | 334 return false; |
335 } | 335 } |
336 | 336 |
| 337 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) { |
| 338 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented"; |
| 339 return false; |
| 340 } |
| 341 |
337 client_ = client; | 342 client_ = client; |
338 | 343 |
339 if (!InitializeVideoToolbox()) | 344 if (!InitializeVideoToolbox()) |
340 return false; | 345 return false; |
341 | 346 |
342 bool profile_supported = false; | 347 bool profile_supported = false; |
343 for (const auto& supported_profile : kSupportedProfiles) { | 348 for (const auto& supported_profile : kSupportedProfiles) { |
344 if (config.profile == supported_profile) { | 349 if (config.profile == supported_profile) { |
345 profile_supported = true; | 350 profile_supported = true; |
346 break; | 351 break; |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 SupportedProfile profile; | 1162 SupportedProfile profile; |
1158 profile.profile = supported_profile; | 1163 profile.profile = supported_profile; |
1159 profile.min_resolution.SetSize(16, 16); | 1164 profile.min_resolution.SetSize(16, 16); |
1160 profile.max_resolution.SetSize(4096, 2160); | 1165 profile.max_resolution.SetSize(4096, 2160); |
1161 profiles.push_back(profile); | 1166 profiles.push_back(profile); |
1162 } | 1167 } |
1163 return profiles; | 1168 return profiles; |
1164 } | 1169 } |
1165 | 1170 |
1166 } // namespace content | 1171 } // namespace content |
OLD | NEW |