Sunshine latest
Self-hosted game stream host for Moonlight.
platf::avcodec_encode_device_t Struct Reference
Inheritance diagram for platf::avcodec_encode_device_t:
[legend]
Collaboration diagram for platf::avcodec_encode_device_t:
[legend]

Public Member Functions

virtual void apply_colorspace ()
 
int convert (platf::img_t &img) override
 
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.
 
virtual int set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx)
 Set the frame to be encoded.
 

Public Attributes

void * data {}
 
AVFrame * frame {}
 
- Public Attributes inherited from platf::encode_device_t
video::sunshine_colorspace_t colorspace
 

Member Function Documentation

◆ apply_colorspace()

virtual void platf::avcodec_encode_device_t::apply_colorspace ( )
inlinevirtual

Reimplemented in cuda::gl_cuda_vram_t.

◆ convert()

int platf::avcodec_encode_device_t::convert ( platf::img_t & img)
inlineoverridevirtual

Implements platf::encode_device_t.

Reimplemented in cuda::gl_cuda_vram_t.

◆ init_codec_options()

virtual void platf::avcodec_encode_device_t::init_codec_options ( AVCodecContext * ctx,
AVDictionary ** options )
inlinevirtual

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 in va::va_t.

◆ init_hwframes()

virtual void platf::avcodec_encode_device_t::init_hwframes ( AVHWFramesContext * frames)
inlinevirtual

Initialize the hwframes context.

Note
Implementations may set parameters during initialization of the hwframes context.

Reimplemented in platf::dxgi::d3d_avcodec_encode_device_t.

◆ prepare_to_derive_context()

virtual int platf::avcodec_encode_device_t::prepare_to_derive_context ( int hw_device_type)
inlinevirtual

Prepare to derive a context.

Note
Implementations may make modifications required before context derivation

Reimplemented in platf::dxgi::d3d_avcodec_encode_device_t.

◆ set_frame()

virtual int platf::avcodec_encode_device_t::set_frame ( AVFrame * frame,
AVBufferRef * hw_frames_ctx )
inlinevirtual

Set the frame to be encoded.

Note
Implementations must take ownership of 'frame'.

Reimplemented in cuda::cuda_ram_t, cuda::cuda_t, platf::nv12_zero_device, platf::dxgi::d3d_avcodec_encode_device_t, video::avcodec_software_encode_device_t, cuda::gl_cuda_vram_t, and va::va_t.


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