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

Public Member Functions

int init (int in_width, int in_height, int offset_x, int offset_y)
 Initialize the GL->CUDA encoding device.
int set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx_buf) override
 Initialize color conversion into target CUDA frame.
int convert (platf::img_t &img) override
 Convert the captured image into the target CUDA frame.
void apply_colorspace () override
 Configures shader parameters for the specified colorspace.
Public Member Functions inherited from platf::avcodec_encode_device_t
virtual void init_hwframes (AVHWFramesContext *frames)
 Initialize the hwframes context.
virtual void init_codec_options (AVCodecContext *ctx, AVDictionary **options)
 Provides a hook for allow platform-specific code to adjust codec options.
virtual int prepare_to_derive_context (int hw_device_type)
 Prepare to derive a context.

Public Attributes

file_t file
gbm::gbm_t gbm
egl::display_t display
egl::ctx_t ctx
stream_t stream
frame_t hwframe
egl::sws_t sws
egl::nv12_t nv12
AVPixelFormat sw_format
int width
int height
std::uint64_t sequence
egl::rgb_t rgb
registered_resource_t y_res
registered_resource_t uv_res
int offset_x
int offset_y
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 390 of file cuda.cpp.

Member Function Documentation

◆ apply_colorspace()

void cuda::gl_cuda_vram_t::apply_colorspace ( )
inlineoverridevirtual

Configures shader parameters for the specified colorspace.

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 555 of file cuda.cpp.

◆ convert()

int cuda::gl_cuda_vram_t::convert ( platf::img_t & img)
inlineoverridevirtual

Convert the captured image into the target CUDA frame.

Parameters
imgCaptured screen image.
Returns
0 on success or -1 on failure.

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 494 of file cuda.cpp.

◆ init()

int cuda::gl_cuda_vram_t::init ( int in_width,
int in_height,
int offset_x,
int offset_y )
inline

Initialize the GL->CUDA encoding device.

Parameters
in_widthWidth of captured frames.
in_heightHeight of captured frames.
offset_xOffset of content in captured frame.
offset_yOffset of content in captured frame.
Returns
0 on success or -1 on failure.

Definition at line 400 of file cuda.cpp.

◆ set_frame()

int cuda::gl_cuda_vram_t::set_frame ( AVFrame * frame,
AVBufferRef * hw_frames_ctx_buf )
inlineoverridevirtual

Initialize color conversion into target CUDA frame.

Parameters
frameDestination CUDA frame to write into.
hw_frames_ctx_bufFFmpeg hardware frame context.
Returns
0 on success or -1 on failure.

Reimplemented from platf::avcodec_encode_device_t.

Definition at line 447 of file cuda.cpp.

Member Data Documentation

◆ ctx

egl::ctx_t cuda::gl_cuda_vram_t::ctx

Definition at line 562 of file cuda.cpp.

◆ display

egl::display_t cuda::gl_cuda_vram_t::display

Definition at line 561 of file cuda.cpp.

◆ file

file_t cuda::gl_cuda_vram_t::file

Definition at line 559 of file cuda.cpp.

◆ gbm

gbm::gbm_t cuda::gl_cuda_vram_t::gbm

Definition at line 560 of file cuda.cpp.

◆ height

int cuda::gl_cuda_vram_t::height

Definition at line 572 of file cuda.cpp.

◆ hwframe

frame_t cuda::gl_cuda_vram_t::hwframe

Definition at line 566 of file cuda.cpp.

◆ nv12

egl::nv12_t cuda::gl_cuda_vram_t::nv12

Definition at line 569 of file cuda.cpp.

◆ offset_x

int cuda::gl_cuda_vram_t::offset_x

Definition at line 580 of file cuda.cpp.

◆ offset_y

int cuda::gl_cuda_vram_t::offset_y

Definition at line 580 of file cuda.cpp.

◆ rgb

egl::rgb_t cuda::gl_cuda_vram_t::rgb

Definition at line 575 of file cuda.cpp.

◆ sequence

std::uint64_t cuda::gl_cuda_vram_t::sequence

Definition at line 574 of file cuda.cpp.

◆ stream

stream_t cuda::gl_cuda_vram_t::stream

Definition at line 565 of file cuda.cpp.

◆ sw_format

AVPixelFormat cuda::gl_cuda_vram_t::sw_format

Definition at line 570 of file cuda.cpp.

◆ sws

egl::sws_t cuda::gl_cuda_vram_t::sws

Definition at line 568 of file cuda.cpp.

◆ uv_res

registered_resource_t cuda::gl_cuda_vram_t::uv_res

Definition at line 578 of file cuda.cpp.

◆ width

int cuda::gl_cuda_vram_t::width

Definition at line 572 of file cuda.cpp.

◆ y_res

registered_resource_t cuda::gl_cuda_vram_t::y_res

Definition at line 577 of file cuda.cpp.


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