IEncoder
IEncoder
#include <icy/av/iencoder.h>class IEncoderDefined in src/av/include/icy/av/iencoder.h:81
Inherits:
Stateful< EncoderState >Subclassed by:MultiplexEncoder
This is the abstract class for all encoders.
List of all members
| Name | Kind | Owner |
|---|---|---|
init | function | Declared here |
uninit | function | Declared here |
cleanup | function | Declared here |
options | function | Declared here |
createVideo | function | Declared here |
freeVideo | function | Declared here |
encodeVideo | function | Declared here |
createAudio | function | Declared here |
freeAudio | function | Declared here |
flush | function | Declared here |
isNone | function | Declared here |
isReady | function | Declared here |
isEncoding | function | Declared here |
isActive | function | Declared here |
isStopped | function | Declared here |
isError | function | Declared here |
Type | enum | Declared here |
StateChange | variable | Inherited from Stateful |
Stateful | function | Inherited from Stateful |
~Stateful | function | Inherited from Stateful |
stateEquals | function | Inherited from Stateful |
stateBetween | function | Inherited from Stateful |
state | function | Inherited from Stateful |
state | function | Inherited from Stateful |
_state | variable | Inherited from Stateful |
beforeStateChange | function | Inherited from Stateful |
onStateChange | function | Inherited from Stateful |
setState | function | Inherited from Stateful |
setState | function | Inherited from Stateful |
Inherited from Stateful
| Kind | Name | Description |
|---|---|---|
variable | StateChange | Signals when the state changes. |
function | Stateful inline | |
function | ~Stateful virtual inline | |
function | stateEquals virtual const inline | Returns true if the current state ID equals the given ID. |
function | stateBetween virtual const inline | Returns true if the current state ID is in the inclusive range [lid, rid]. |
function | state virtual inline | Returns a mutable reference to the current state. |
function | state virtual const inline | Returns a copy of the current state. |
variable | _state | |
function | beforeStateChange virtual inline | Override to handle pre state change logic. Return false to prevent state change. |
function | onStateChange virtual inline | Override to handle post state change logic. |
function | setState virtual inline | Sets the state and sends the state signal if the state change was successful. |
function | setState virtual inline | Sets the state and sends the state signal if the state change was successful. |
Public Methods
| Return | Name | Description |
|---|---|---|
void | init virtual | Initialise the encoder, open codec contexts, and transition to Ready or Encoding state. |
void | uninit virtual | 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 virtual const | |
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 | |
bool | isReady const inline | |
bool | isEncoding virtual const inline | |
bool | isActive virtual const inline | |
bool | isStopped virtual const inline | |
bool | isError virtual const inline |
init
virtual
virtual void init()Defined in src/av/include/icy/av/iencoder.h:93
Initialise the encoder, open codec contexts, and transition to Ready or Encoding state.
Reimplemented by
uninit
virtual
virtual void uninit()Defined in src/av/include/icy/av/iencoder.h:96
Flush remaining packets, close codec contexts, and release all encoder resources.
Reimplemented by
cleanup
virtual inline
virtual inline void cleanup()Defined in src/av/include/icy/av/iencoder.h:99
Perform any additional cleanup after uninit(). Default is a no-op.
Reimplemented by
options
virtual const
virtual const EncoderOptions & options() constDefined in src/av/include/icy/av/iencoder.h:102
Returns
A read-only view of the encoder's configuration options.
Reimplemented by
createVideo
virtual inline
virtual inline void createVideo()Defined in src/av/include/icy/av/iencoder.h:105
Initialise the video codec context and stream.
Reimplemented by
freeVideo
virtual inline
virtual inline void freeVideo()Defined in src/av/include/icy/av/iencoder.h:108
Free the video codec context and stream.
Reimplemented by
encodeVideo
virtual inline
virtual inline bool encodeVideo(AVFrame * frame)Defined in src/av/include/icy/av/iencoder.h:113
Encode a single AVFrame of video.
Parameters
frameThe source video frame; all fields (format, width, height, pts) must be set.
Returns
True if a packet was successfully encoded and written.
Reimplemented by
createAudio
virtual inline
virtual inline void createAudio()Defined in src/av/include/icy/av/iencoder.h:116
Initialise the audio codec context and stream.
Reimplemented by
freeAudio
virtual inline
virtual inline void freeAudio()Defined in src/av/include/icy/av/iencoder.h:119
Free the audio codec context and stream.
Reimplemented by
flush
virtual inline
virtual inline void flush()Defined in src/av/include/icy/av/iencoder.h:122
Flush any internally buffered packets to the output.
Reimplemented by
isNone
const inline
inline bool isNone() constDefined in src/av/include/icy/av/iencoder.h:125
Returns
True if the encoder is in the None state.
isReady
const inline
inline bool isReady() constDefined in src/av/include/icy/av/iencoder.h:128
Returns
True if the encoder is ready but not yet encoding.
isEncoding
virtual const inline
virtual inline bool isEncoding() constDefined in src/av/include/icy/av/iencoder.h:131
Returns
True if the encoder is actively encoding.
isActive
virtual const inline
virtual inline bool isActive() constDefined in src/av/include/icy/av/iencoder.h:134
Returns
True if the encoder is in the Ready or Encoding state.
isStopped
virtual const inline
virtual inline bool isStopped() constDefined in src/av/include/icy/av/iencoder.h:137
Returns
True if the encoder has stopped.
isError
virtual const inline
virtual inline bool isError() constDefined in src/av/include/icy/av/iencoder.h:140
Returns
True if the encoder is in an error state.
Public Types
| Name | Description |
|---|---|
Type |
Type
enum TypeDefined in src/av/include/icy/av/iencoder.h:84
| Value | Description |
|---|---|
None | huh? |
Video | video only |
Audio | audio only |
Multiplex | both video & audio |
