OpenGL/CUDA interop resources used for GPU-side frame conversion.
More...
|
| void | apply_colorspace () override |
| | Configures shader parameters for the specified colorspace.
|
| |
| int | convert (platf::img_t &img) override |
| | Convert the captured image into the target CUDA frame.
|
| |
| 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.
|
| |
| virtual void | init_codec_options (AVCodecContext *ctx, AVDictionary **options) |
| | Provides a hook for allow platform-specific code to adjust codec options.
|
| |
| 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.
|
| |
|
|
egl::ctx_t | ctx |
| | EGL context used to import captured frames.
|
| |
|
cu_resources | cu_res |
| | CUDA graphics resources registered for the current frame.
|
| |
|
egl::display_t | display |
| | EGL display used to import captured frames.
|
| |
|
file_t | file |
| | File descriptor for the imported DMA-BUF.
|
| |
|
gbm::gbm_t | gbm |
| | GBM device used for buffer allocation..
|
| |
|
int | height |
| | Frame or display height in pixels.
|
| |
|
frame_t | hwframe |
| | FFmpeg hardware frame backed by CUDA resources.
|
| |
|
bool | is_yuv444 |
| | Whether the CUDA converter outputs YUV 4:4:4.
|
| |
|
egl::nv12_t | nv12 |
| | EGL/OpenGL resources used for NV12 output frames.
|
| |
|
int | offset_x |
| | Horizontal offset in physical pixels.
|
| |
|
int | offset_y |
| | Vertical offset in physical pixels.
|
| |
|
egl::rgb_t | rgb |
| | Imported RGB source image used before CUDA conversion.
|
| |
|
std::uint64_t | sequence |
| | Capture sequence number associated with the frame.
|
| |
|
stream_t | stream |
| | CUDA stream used for asynchronous conversion work.
|
| |
|
AVPixelFormat | sw_format |
| | FFmpeg software pixel format produced by conversion.
|
| |
|
egl::sws_t | sws |
| | Software scaler used for CUDA frame conversion fallback paths.
|
| |
|
int | width |
| | Frame or display width in pixels.
|
| |
|
egl::yuv444_t | yuv444 |
| | EGL/OpenGL resources used for YUV444 output frames.
|
| |
|
void * | data {} |
| | Backend-specific conversion state.
|
| |
|
AVFrame * | frame {} |
| | FFmpeg frame currently owned by the encode device.
|
| |
|
video::sunshine_colorspace_t | colorspace |
| | Colorspace metadata expected by the encoder.
|
| |
OpenGL/CUDA interop resources used for GPU-side frame conversion.
◆ apply_colorspace()
| void cuda::gl_cuda_vram_t::apply_colorspace |
( |
| ) |
|
|
inlineoverridevirtual |
◆ convert()
Convert the captured image into the target CUDA frame.
- Parameters
-
| img | Captured screen image. |
- Returns
- 0 on success or -1 on failure.
Reimplemented from platf::avcodec_encode_device_t.
◆ 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_width | Width of captured frames. |
| in_height | Height of captured frames. |
| offset_x | Offset of content in captured frame. |
| offset_y | Offset of content in captured frame. |
- Returns
- 0 on success or -1 on failure.
◆ 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
-
| frame | Destination CUDA frame to write into. |
| hw_frames_ctx_buf | FFmpeg hardware frame context. |
- Returns
- 0 on success or -1 on failure.
Reimplemented from platf::avcodec_encode_device_t.
The documentation for this class was generated from the following file: