PacketProcessor
PacketProcessor
#include <icy/packetstream.h>class PacketProcessorDefined in src/base/include/icy/packetstream.h:114
Inherits:
PacketStreamAdapterSubclassed by:AsyncPacketQueue< PacketT >,PlanarAudioPacket >,AsyncPacketQueue< VisionFramePacket >,AsyncPacketQueue< T >,StreamWriter,SyncPacketQueue< T >,AudioPacketEncoder,FPSLimiter,MultiplexPacketEncoder,VideoPacketEncoder,ChunkedAdapter,MultipartAdapter,FrameNormalizer,FrameSampler,WebRtcTrackSender
This class is a virtual interface for creating PacketStreamAdapters which process that and emit the IPacket type.
List of all members
| Name | Kind | Owner |
|---|---|---|
PacketProcessor | function | Declared here |
process | function | Declared here |
accepts | function | Declared here |
operator<< | function | Declared here |
PacketStreamAdapter | function | Inherited from PacketStreamAdapter |
~PacketStreamAdapter | function | Inherited from PacketStreamAdapter |
emit | function | Inherited from PacketStreamAdapter |
emit | function | Inherited from PacketStreamAdapter |
emit | function | Inherited from PacketStreamAdapter |
emit | function | Inherited from PacketStreamAdapter |
emit | function | Inherited from PacketStreamAdapter |
getEmitter | function | Inherited from PacketStreamAdapter |
retention | function | Inherited from PacketStreamAdapter |
onStreamStateChange | function | Inherited from PacketStreamAdapter |
_emitter | variable | Inherited from PacketStreamAdapter |
PacketStreamAdapter | function | Inherited from PacketStreamAdapter |
operator= | function | Inherited from PacketStreamAdapter |
PacketStreamAdapter | function | Inherited from PacketStreamAdapter |
operator= | function | Inherited from PacketStreamAdapter |
Inherited from PacketStreamAdapter
| Kind | Name | Description |
|---|---|---|
function | PacketStreamAdapter | Construct the adapter, binding it to the given packet signal. |
function | ~PacketStreamAdapter virtual inline | |
function | emit virtual | Emit a mutable raw buffer as a packet. |
function | emit virtual | Emit a read-only raw buffer as a packet (data is copied internally). |
function | emit virtual | Emit a string as a packet (data is copied internally). |
function | emit virtual | Emit a flag-only packet carrying no payload data. |
function | emit virtual | Emit an existing packet directly onto the outgoing signal. |
function | getEmitter | Returns a reference to the outgoing packet signal. |
function | retention virtual const | Returns how this adapter treats incoming packet lifetime. Most adapters are synchronous and therefore only borrow the packet for the current call chain. Queue-style adapters override this to advertise that they clone before deferred use. Callers may treat the first adapter reporting Cloned or Retained as the explicit ownership boundary in the stream graph. |
function | onStreamStateChange virtual inline | 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. |
variable | _emitter | |
function | PacketStreamAdapter | NonCopyable and NonMovable. |
function | operator= | Deleted assignment operator. |
function | PacketStreamAdapter | Deleted constructor. |
function | operator= | Deleted assignment operator. |
Public Methods
| Return | Name | Description |
|---|---|---|
PacketProcessor inline | ||
void | process virtual | This method performs processing on the given packet and emits the result. |
bool | accepts virtual inline | This method ensures compatibility with the given packet type. Return false to reject the packet. |
void | operator<< virtual inline | Stream operator alias for process() |
PacketProcessor
inline
inline PacketProcessor(PacketSignal & emitter)Defined in src/base/include/icy/packetstream.h:117
process
virtual
virtual void process(IPacket & packet)Defined in src/base/include/icy/packetstream.h:127
This method performs processing on the given packet and emits the result.
Processors that defer work asynchronously must either clone the packet or retain an owned equivalent. See retention().
Reimplemented by
processprocessprocessprocessprocessprocessprocessprocessprocessprocessprocessprocessprocessprocessprocess
accepts
virtual inline
virtual inline bool accepts(IPacket *)Defined in src/base/include/icy/packetstream.h:131
This method ensures compatibility with the given packet type. Return false to reject the packet.
Reimplemented by
operator<<
virtual inline
virtual inline void operator<<(IPacket & packet)