Home
Base module

PacketProcessor

Defined in src/base/include/icy/packetstream.h:114

PacketProcessor

#include <icy/packetstream.h>
class PacketProcessor

Defined in src/base/include/icy/packetstream.h:114

Inherits: PacketStreamAdapter Subclassed 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

NameKindOwner
PacketProcessorfunctionDeclared here
processfunctionDeclared here
acceptsfunctionDeclared here
operator<<functionDeclared here
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
~PacketStreamAdapterfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
emitfunctionInherited from PacketStreamAdapter
getEmitterfunctionInherited from PacketStreamAdapter
retentionfunctionInherited from PacketStreamAdapter
onStreamStateChangefunctionInherited from PacketStreamAdapter
_emittervariableInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter
PacketStreamAdapterfunctionInherited from PacketStreamAdapter
operator=functionInherited from PacketStreamAdapter

Inherited from PacketStreamAdapter

KindNameDescription
functionPacketStreamAdapterConstruct the adapter, binding it to the given packet signal.
function~PacketStreamAdapter virtual inline
functionemit virtualEmit a mutable raw buffer as a packet.
functionemit virtualEmit a read-only raw buffer as a packet (data is copied internally).
functionemit virtualEmit a string as a packet (data is copied internally).
functionemit virtualEmit a flag-only packet carrying no payload data.
functionemit virtualEmit an existing packet directly onto the outgoing signal.
functiongetEmitterReturns a reference to the outgoing packet signal.
functionretention virtual constReturns 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.
functiononStreamStateChange virtual inlineCalled 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
functionPacketStreamAdapterNonCopyable and NonMovable.
functionoperator=Deleted assignment operator.
functionPacketStreamAdapterDeleted constructor.
functionoperator=Deleted assignment operator.

Public Methods

ReturnNameDescription
PacketProcessor inline
voidprocess virtualThis method performs processing on the given packet and emits the result.
boolaccepts virtual inlineThis method ensures compatibility with the given packet type. Return false to reject the packet.
voidoperator<< virtual inlineStream 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

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)

Defined in src/base/include/icy/packetstream.h:134

Stream operator alias for process()