| 304 | } |
| 305 | |
| 306 | static bool CanCreateHwDevice(AVHWDeviceType type, const char* device_name = nullptr) { |
| 307 | AVBufferRef* device = nullptr; |
| 308 | const int result = av_hwdevice_ctx_create(&device, type, device_name, nullptr, 0); |
| 309 | if (device) |
| 310 | av_buffer_unref(&device); |
| 311 | return result >= 0; |
| 312 | } |
| 313 | |
| 314 | static BackendAvailability ProbeBackends(const BenchmarkOptions& options) { |
| 315 | BackendAvailability availability; |