FFmpeg software encode device used when no hardware frames are required.
More...
|
| void | apply_colorspace () override |
| | Apply the configured colorspace metadata to the active frame.
|
| |
| int | convert (platf::img_t &img) override |
| | Accept a software frame without additional hardware conversion.
|
| |
| int | init (int in_width, int in_height, AVFrame *frame, AVPixelFormat format, bool hardware) |
| | Initialize FFmpeg software encoding for the requested codec.
|
| |
| void | prefill () |
| |
| int | set_frame (AVFrame *frame, AVBufferRef *hw_frames_ctx) override |
| | Attach frame resources used by the next conversion or encode operation.
|
| |
| 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.
|
| |
|
|
avcodec_frame_t | hw_frame |
| | Hw frame.
|
| |
|
int | offsetH |
| | Offset h.
|
| |
|
int | offsetW |
| | Offset w.
|
| |
|
avcodec_frame_t | sw_frame |
| | Sw frame.
|
| |
|
sws_t | sws |
| | Software scaler used when frames need CPU-side pixel conversion.
|
| |
|
avcodec_frame_t | sws_input_frame |
| | Sws input frame.
|
| |
|
avcodec_frame_t | sws_output_frame |
| | Sws output frame.
|
| |
|
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.
|
| |
FFmpeg software encode device used when no hardware frames are required.
◆ apply_colorspace()
| void video::avcodec_software_encode_device_t::apply_colorspace |
( |
| ) |
|
|
inlineoverridevirtual |
◆ convert()
| int video::avcodec_software_encode_device_t::convert |
( |
platf::img_t & | img | ) |
|
|
inlineoverridevirtual |
Accept a software frame without additional hardware conversion.
- Parameters
-
| img | Image or frame object to read from or populate. |
- Returns
- Conversion status.
Reimplemented from platf::avcodec_encode_device_t.
◆ init()
| int video::avcodec_software_encode_device_t::init |
( |
int | in_width, |
|
|
int | in_height, |
|
|
AVFrame * | frame, |
|
|
AVPixelFormat | format, |
|
|
bool | hardware ) |
|
inline |
Initialize FFmpeg software encoding for the requested codec.
- Parameters
-
| in_width | In width. |
| in_height | In height. |
| frame | Video or graphics frame being processed. |
| format | Pixel, audio, or protocol format being converted. |
| hardware | Whether the frame is backed by hardware resources. |
- Returns
- 0 on success; nonzero or negative platform status on failure.
◆ prefill()
| void video::avcodec_software_encode_device_t::prefill |
( |
| ) |
|
|
inline |
When preserving aspect ratio, ensure that padding is black
◆ set_frame()
| int video::avcodec_software_encode_device_t::set_frame |
( |
AVFrame * | frame, |
|
|
AVBufferRef * | hw_frames_ctx ) |
|
inlineoverridevirtual |
Attach frame resources used by the next conversion or encode operation.
- Parameters
-
| frame | Video or graphics frame being processed. |
| hw_frames_ctx | FFmpeg hardware frames context associated with the frame. |
- Returns
- Status from updating frame.
Reimplemented from platf::avcodec_encode_device_t.
The documentation for this class was generated from the following file: