Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
va::va_t Class Reference
Inheritance diagram for va::va_t:
[legend]
Collaboration diagram for va::va_t:
[legend]

Public Member Functions

int init (int in_width, int in_height, file_t &&render_device)
VAEntrypoint select_va_entrypoint (VAProfile profile)
 Finds a supported VA entrypoint for the given VA profile.
bool is_va_profile_supported (VAProfile profile)
 Determines if a given VA profile is supported.
VAProfile get_va_profile (AVCodecContext *ctx)
 Determines the matching VA profile for the codec configuration.
void init_codec_options (AVCodecContext *ctx, AVDictionary **options) override
 Provides a hook for allow platform-specific code to adjust codec options.
int set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx_buf) override
 Set the frame to be encoded.
void apply_colorspace () override
Public Member Functions inherited from platf::avcodec_encode_device_t
int convert (platf::img_t &img) override
virtual void init_hwframes (AVHWFramesContext *frames)
 Initialize the hwframes context.
virtual int prepare_to_derive_context (int hw_device_type)
 Prepare to derive a context.

Public Attributes

va::display_t::pointer va_display
file_t file
gbm::gbm_t gbm
egl::display_t display
egl::ctx_t ctx
frame_t hwframe
egl::sws_t sws
egl::nv12_t nv12
int width
int height
Public Attributes inherited from platf::avcodec_encode_device_t
void * data {}
AVFrame * frame {}
Public Attributes inherited from platf::encode_device_t
video::sunshine_colorspace_t colorspace

Detailed Description

Definition at line 99 of file vaapi.cpp.

Member Function Documentation

◆ apply_colorspace()

void va::va_t::apply_colorspace ( )
inlineoverridevirtual

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 398 of file vaapi.cpp.

◆ get_va_profile()

VAProfile va::va_t::get_va_profile ( AVCodecContext * ctx)
inline

Determines the matching VA profile for the codec configuration.

Parameters
ctxThe FFmpeg codec context.
Returns
The matching VA profile or VAProfileNone on failure.

Definition at line 189 of file vaapi.cpp.

◆ init()

int va::va_t::init ( int in_width,
int in_height,
file_t && render_device )
inline

Definition at line 101 of file vaapi.cpp.

◆ init_codec_options()

void va::va_t::init_codec_options ( AVCodecContext * ctx,
AVDictionary ** options )
inlineoverridevirtual

Provides a hook for allow platform-specific code to adjust codec options.

Note
Implementations may set or modify codec options prior to codec initialization.

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 221 of file vaapi.cpp.

◆ is_va_profile_supported()

bool va::va_t::is_va_profile_supported ( VAProfile profile)
inline

Determines if a given VA profile is supported.

Parameters
profileThe profile to match.
Returns
Boolean value indicating if the profile is supported.

Definition at line 171 of file vaapi.cpp.

◆ select_va_entrypoint()

VAEntrypoint va::va_t::select_va_entrypoint ( VAProfile profile)
inline

Finds a supported VA entrypoint for the given VA profile.

Parameters
profileThe profile to match.
Returns
A valid encoding entrypoint or 0 on failure.

Definition at line 141 of file vaapi.cpp.

◆ set_frame()

int va::va_t::set_frame ( AVFrame * frame,
AVBufferRef * hw_frames_ctx )
inlineoverridevirtual

Set the frame to be encoded.

Note
Implementations must take ownership of 'frame'.

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 321 of file vaapi.cpp.

Member Data Documentation

◆ ctx

egl::ctx_t va::va_t::ctx

Definition at line 407 of file vaapi.cpp.

◆ display

egl::display_t va::va_t::display

Definition at line 406 of file vaapi.cpp.

◆ file

file_t va::va_t::file

Definition at line 403 of file vaapi.cpp.

◆ gbm

gbm::gbm_t va::va_t::gbm

Definition at line 405 of file vaapi.cpp.

◆ height

int va::va_t::height

Definition at line 416 of file vaapi.cpp.

◆ hwframe

frame_t va::va_t::hwframe

Definition at line 411 of file vaapi.cpp.

◆ nv12

egl::nv12_t va::va_t::nv12

Definition at line 414 of file vaapi.cpp.

◆ sws

egl::sws_t va::va_t::sws

Definition at line 413 of file vaapi.cpp.

◆ va_display

va::display_t::pointer va::va_t::va_display

Definition at line 402 of file vaapi.cpp.

◆ width

int va::va_t::width

Definition at line 416 of file vaapi.cpp.


The documentation for this class was generated from the following file: