#include <icy/av/iencoder.h>Inherits:
Stateful< EncoderState >Subclassed by:MultiplexEncoder
This is the abstract class for all encoders.
| Return | Name | Description |
|---|---|---|
void | init | Initialise the encoder, open codec contexts, and transition to Ready or Encoding state. |
void | uninit | Flush remaining packets, close codec contexts, and release all encoder resources. |
void | cleanup virtual inline | Perform any additional cleanup after uninit(). Default is a no-op. |
const EncoderOptions & | options const | #### Returns |
void | createVideo virtual inline | Initialise the video codec context and stream. |
void | freeVideo virtual inline | Free the video codec context and stream. |
bool | encodeVideo virtual inline | Encode a single AVFrame of video. |
void | createAudio virtual inline | Initialise the audio codec context and stream. |
void | freeAudio virtual inline | Free the audio codec context and stream. |
void | flush virtual inline | Flush any internally buffered packets to the output. |
bool | isNone const inline | #### Returns |
bool | isReady const inline | #### Returns |
bool | isEncoding virtual const inline | #### Returns |
bool | isActive virtual const inline | #### Returns |
bool | isStopped virtual const inline | #### Returns |
bool | isError virtual const inline | #### Returns |
void init()Initialise the encoder, open codec contexts, and transition to Ready or Encoding state.
void uninit()Flush remaining packets, close codec contexts, and release all encoder resources.
virtual inline
virtual inline void cleanup()Perform any additional cleanup after uninit(). Default is a no-op.
const
const EncoderOptions & options() constA read-only view of the encoder's configuration options.
virtual inline
virtual inline void createVideo()Initialise the video codec context and stream.
virtual inline
virtual inline void freeVideo()Free the video codec context and stream.
virtual inline
virtual inline bool encodeVideo(AVFrame * frame)Encode a single AVFrame of video.
frame The source video frame; all fields (format, width, height, pts) must be set.True if a packet was successfully encoded and written.
virtual inline
virtual inline void createAudio()Initialise the audio codec context and stream.
virtual inline
virtual inline void freeAudio()Free the audio codec context and stream.
virtual inline
virtual inline void flush()Flush any internally buffered packets to the output.
const inline
inline bool isNone() constTrue if the encoder is in the None state.
const inline
inline bool isReady() constTrue if the encoder is ready but not yet encoding.
virtual const inline
virtual inline bool isEncoding() constTrue if the encoder is actively encoding.
virtual const inline
virtual inline bool isActive() constTrue if the encoder is in the Ready or Encoding state.
virtual const inline
virtual inline bool isStopped() constTrue if the encoder has stopped.
virtual const inline
virtual inline bool isError() constTrue if the encoder is in an error state.
| Name | Description |
|---|---|
Type |
enum Type| Value | Description |
|---|---|
None | huh? |
Video | video only |
Audio | audio only |
Multiplex | both video & audio |