|
Hermes 0.7.0
Linux game streaming host
|
Definitions for VA-API hardware accelerated capture. More...
#include <algorithm>#include <fcntl.h>#include <format>#include <sstream>#include <string>#include <libavcodec/avcodec.h>#include <libavutil/pixdesc.h>#include <va/va.h>#include <va/va_drm.h>#include "graphics.h"#include "misc.h"#include "src/config.h"#include "src/logging.h"#include "src/platform/common.h"#include "src/utility.h"#include "src/video.h"Go to the source code of this file.
Classes | |
| struct | va::DRMPRIMESurfaceDescriptor |
| class | va::va_t |
| class | va::va_ram_t |
| class | va::va_vram_t |
| struct | va::VAAPIDevicePriv |
| struct | va::AVVAAPIDeviceContext |
Typedefs | |
| using | va::VADisplay = void * |
| using | va::VAStatus = int |
| using | va::VAGenericID = unsigned int |
| using | va::VASurfaceID = VAGenericID |
| using | va::display_t = util::safe_ptr_v2<void, VAStatus, vaTerminate> |
| typedef struct va::VAAPIDevicePriv | va::VAAPIDevicePriv |
| typedef struct va::AVVAAPIDeviceContext | va::AVVAAPIDeviceContext |
Functions | |
| VAStatus | vaSyncBuffer (VADisplay dpy, VABufferID buf_id, uint64_t timeout_ns) |
| int | va::vaapi_init_avcodec_hardware_input_buffer (platf::avcodec_encode_device_t *encode_device, AVBufferRef **hw_device_buf) |
| bool | va::validate (int fd) |
| int | va::encode_capability (int fd) |
| Rank what the GPU behind fd can encode, for choosing between GPUs. | |
| std::unique_ptr< platf::avcodec_encode_device_t > | va::make_avcodec_encode_device (int width, int height, file_t &&card, int offset_x, int offset_y, bool vram) |
| std::unique_ptr< platf::avcodec_encode_device_t > | va::make_avcodec_encode_device (int width, int height, int offset_x, int offset_y, bool vram) |
| std::unique_ptr< platf::avcodec_encode_device_t > | va::make_avcodec_encode_device (int width, int height, bool vram) |
Variables | |
| constexpr auto | va::SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 = 0x40000000 |
| constexpr auto | va::EXPORT_SURFACE_WRITE_ONLY = 0x0002 |
| constexpr auto | va::EXPORT_SURFACE_SEPARATE_LAYERS = 0x0004 |
Definitions for VA-API hardware accelerated capture.
Definition in file vaapi.cpp.
| typedef struct va::AVVAAPIDeviceContext va::AVVAAPIDeviceContext |
VAAPI connection details.
Allocated as AVHWDeviceContext.hwctx
| using va::display_t = util::safe_ptr_v2<void, VAStatus, vaTerminate> |
| typedef struct va::VAAPIDevicePriv va::VAAPIDevicePriv |
This is a private structure of FFmpeg, I need this to manually create a VAAPI hardware context
xdisplay will not be used internally by FFmpeg
| int va::encode_capability | ( | int | fd | ) |
Rank what the GPU behind fd can encode, for choosing between GPUs.
| std::unique_ptr< platf::avcodec_encode_device_t > va::make_avcodec_encode_device | ( | int | width, |
| int | height, | ||
| bool | vram ) |
| std::unique_ptr< platf::avcodec_encode_device_t > va::make_avcodec_encode_device | ( | int | width, |
| int | height, | ||
| file_t && | card, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| bool | vram ) |
| std::unique_ptr< platf::avcodec_encode_device_t > va::make_avcodec_encode_device | ( | int | width, |
| int | height, | ||
| int | offset_x, | ||
| int | offset_y, | ||
| bool | vram ) |
| int va::vaapi_init_avcodec_hardware_input_buffer | ( | platf::avcodec_encode_device_t * | encode_device, |
| AVBufferRef ** | hw_device_buf ) |
| VAStatus vaSyncBuffer | ( | VADisplay | dpy, |
| VABufferID | buf_id, | ||
| uint64_t | timeout_ns ) |