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

Public Types

using pixel_format_fn_t = std::function<void(void *display, int pixelFormat)>
 
using resolution_fn_t = std::function<void(void *display, int width, int height)>
 

Public Member Functions

int convert (img_t &img) override
 
int init (void *display, pix_fmt_e pix_fmt, resolution_fn_t resolution_fn, const pixel_format_fn_t &pixel_format_fn)
 
int set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx) override
 Set the frame to be encoded.
 
- Public Member Functions inherited from platf::avcodec_encode_device_t
virtual void apply_colorspace ()
 
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.
 

Public Attributes

resolution_fn_t resolution_fn
 
- 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
 

Member Function Documentation

◆ convert()

int platf::nv12_zero_device::convert ( platf::img_t & img)
overridevirtual

Reimplemented from platf::avcodec_encode_device_t.

◆ set_frame()

int platf::nv12_zero_device::set_frame ( AVFrame * frame,
AVBufferRef * hw_frames_ctx )
overridevirtual

Set the frame to be encoded.

Note
Implementations must take ownership of 'frame'.

Reimplemented from platf::avcodec_encode_device_t.


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