#include <icy/av/multiplexpacketencoder.h>Inherits:
MultiplexEncoder,PacketProcessor
Encodes and multiplexes a realtime video stream form audio / video capture sources. FFmpeg is used for encoding.
| Return | Name | Description |
|---|---|---|
MultiplexPacketEncoder | Construct the encoder with the given options. | |
MultiplexPacketEncoder | Deleted constructor. | |
MultiplexPacketEncoder | Deleted constructor. | |
void | encode virtual | Encode a VideoPacket, dispatching to the planar or interleaved encode path as appropriate. |
void | encode virtual | Encode an AudioPacket, dispatching to the planar or interleaved encode path as appropriate. |
bool | accepts virtual | #### Returns |
void | process virtual | Dispatch the incoming packet to encode(VideoPacket&) or encode(AudioPacket&). Throws std::invalid_argument if the packet type is unrecognised. |
MultiplexPacketEncoder(const EncoderOptions & options)Construct the encoder with the given options.
options The encoder configuration (input/output formats and file paths).MultiplexPacketEncoder(const MultiplexPacketEncoder &) = deleteDeleted constructor.
MultiplexPacketEncoder(MultiplexPacketEncoder &&) = deleteDeleted constructor.
virtual
virtual void encode(VideoPacket & packet)Encode a VideoPacket, dispatching to the planar or interleaved encode path as appropriate.
packet The video packet to encode.virtual
virtual void encode(AudioPacket & packet)Encode an AudioPacket, dispatching to the planar or interleaved encode path as appropriate.
packet The audio packet to encode.virtual
virtual bool accepts(IPacket * packet)True if the packet is an av::MediaPacket (audio or video).
virtual
virtual void process(IPacket & packet)Dispatch the incoming packet to encode(VideoPacket&) or encode(AudioPacket&). Throws std::invalid_argument if the packet type is unrecognised.
packet The incoming media packet.| Return | Name | Description |
|---|---|---|
std::mutex | _mutex |
std::mutex _mutex| Return | Name | Description |
|---|---|---|
void | onStreamStateChange virtual | Called by the PacketStream to notify when the internal Stream state changes. On receiving the Stopped state, it is the responsibility of the adapter to have ceased all outgoing packet transmission, especially in multi-thread scenarios. |
virtual
virtual void onStreamStateChange(const PacketStreamState &)Called by the PacketStream to notify when the internal Stream state changes. On receiving the Stopped state, it is the responsibility of the adapter to have ceased all outgoing packet transmission, especially in multi-thread scenarios.