| 1 |
/* |
| 2 |
* Copyright (C) 2020-2021 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include "CL/cl_va_api_media_sharing_intel.h" |
| 11 |
|
| 12 |
#include <functional> |
| 13 |
|
| 14 |
namespace NEO { |
| 15 |
class ClDevice; |
| 16 |
class Platform; |
| 17 |
|
| 18 |
class VADevice { |
| 19 |
public: |
| 20 |
VADevice(); |
| 21 |
virtual ~VADevice(); |
| 22 |
|
| 23 |
ClDevice *getRootDeviceFromVaDisplay(Platform *pPlatform, VADisplay vaDisplay); |
| 24 |
ClDevice *getDeviceFromVA(Platform *pPlatform, VADisplay vaDisplay); |
| 25 |
|
| 26 |
static std::function<void *(const char *, int)> fdlopen; |
| 27 |
static std::function<void *(void *handle, const char *symbol)> fdlsym; |
| 28 |
static std::function<int(void *handle)> fdlclose; |
| 29 |
|
| 30 |
protected: |
| 31 |
void *vaLibHandle = nullptr; |
| 32 |
void *vaGetDevice = nullptr; |
| 33 |
}; |
| 34 |
} // namespace NEO |