AV module

ICapture

Abstract interface for audio and video capture devices.

#include <icy/av/icapture.h>

class ICapture

Defined in src/av/include/icy/av/icapture.h:31

Subclassed by
MediaCapture

List of all members

NameKindOwner
emittervariableDeclared here
ICapturefunctionDeclared here
~ICapturefunctionDeclared here
startfunctionDeclared here
stopfunctionDeclared here
openFilefunctionDeclared here
closefunctionDeclared here
getEncoderFormatfunctionDeclared here
getEncoderAudioCodecfunctionDeclared here
getEncoderVideoCodecfunctionDeclared here
openAudiofunctionDeclared here
openVideofunctionDeclared here
onStreamStateChangefunctionDeclared here
openStreamfunctionDeclared 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
startfunctionInherited from Startable
stopfunctionInherited from Startable

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.

Inherited from Startable

KindNameDescription
functionstart virtualStarts the object (e.g. begins processing or listening).
functionstop virtualStops the object (e.g. halts processing or closes resources).

Public Attributes

ReturnNameDescription
PacketSignalemitter

emitter

PacketSignal emitter

Type: PacketSignal

Defined in src/av/include/icy/av/icapture.h:89

Public Methods

ReturnNameDescription
ICapture inline
~ICapture virtualDefaulted destructor.
voidstart virtual overrideStart capturing and emitting packets.
voidstop virtual overrideStop capturing and release device resources.
voidopenFile virtual inlineOpen a media file as the capture source.
voidclose virtual inlineRelease the capture source and any associated resources.
voidgetEncoderFormat virtualPopulate iformat with the encoder-ready format derived from this capture source.
voidgetEncoderAudioCodec virtual inlinePopulate params with the encoder-ready audio codec parameters.
voidgetEncoderVideoCodec virtual inlinePopulate params with the encoder-ready video codec parameters.
voidopenAudio virtual inlineOpen an audio capture device with the given parameters.
voidopenVideo virtual inlineOpen a video capture device with the given parameters.
voidonStreamStateChange virtual inline overrideReact to PacketStream state transitions by starting or stopping capture.

ICapture

inline

inline ICapture()

Defined in src/av/include/icy/av/icapture.h:35


~ICapture

virtual

virtual ~ICapture() = default

Defined in src/av/include/icy/av/icapture.h:39

Defaulted destructor.


start

virtual override

virtual void start() override

Defined in src/av/include/icy/av/icapture.h:42

Start capturing and emitting packets.

Reimplements

Reimplemented by


stop

virtual override

virtual void stop() override

Defined in src/av/include/icy/av/icapture.h:45

Stop capturing and release device resources.

Reimplements

Reimplemented by


openFile

virtual inline

virtual inline void openFile(const std::string & file)

Defined in src/av/include/icy/av/icapture.h:49

Open a media file as the capture source.

Reimplemented by

Parameters

ParameterTypeDescription
fileconst std::string &Path to the media file.

close

virtual inline

virtual inline void close()

Defined in src/av/include/icy/av/icapture.h:52

Release the capture source and any associated resources.

Reimplemented by


getEncoderFormat

virtual

virtual void getEncoderFormat(Format & iformat)

Defined in src/av/include/icy/av/icapture.h:56

Populate iformat with the encoder-ready format derived from this capture source.

Reimplemented by

Parameters

ParameterTypeDescription
iformatFormat &Output Format struct to fill.

getEncoderAudioCodec

virtual inline

virtual inline void getEncoderAudioCodec(AudioCodec & params)

Defined in src/av/include/icy/av/icapture.h:60

Populate params with the encoder-ready audio codec parameters.

Reimplemented by

Parameters

ParameterTypeDescription
paramsAudioCodec &Output AudioCodec struct to fill.

getEncoderVideoCodec

virtual inline

virtual inline void getEncoderVideoCodec(VideoCodec & params)

Defined in src/av/include/icy/av/icapture.h:64

Populate params with the encoder-ready video codec parameters.

Reimplemented by

Parameters

ParameterTypeDescription
paramsVideoCodec &Output VideoCodec struct to fill.

openAudio

virtual inline

virtual inline void openAudio(const std::string & device, const AudioCodec & params)

Defined in src/av/include/icy/av/icapture.h:69

Open an audio capture device with the given parameters.

Reimplemented by

Parameters

ParameterTypeDescription
deviceconst std::string &The platform audio device identifier.
paramsconst AudioCodec &The desired capture parameters.

openVideo

virtual inline

virtual inline void openVideo(const std::string & device, const VideoCodec & params)

Defined in src/av/include/icy/av/icapture.h:74

Open a video capture device with the given parameters.

Reimplemented by

Parameters

ParameterTypeDescription
deviceconst std::string &The platform video device identifier.
paramsconst VideoCodec &The desired capture parameters.

onStreamStateChange

virtual inline override

virtual inline void onStreamStateChange(const PacketStreamState & state) override

Defined in src/av/include/icy/av/icapture.h:77

React to PacketStream state transitions by starting or stopping capture.

Reimplements

Protected Methods

ReturnNameDescription
voidopenStream virtual inline

openStream

virtual inline

virtual inline void openStream(const std::string & filename, const AVInputFormat * inputFormat, AVDictionary ** formatParams)

Defined in src/av/include/icy/av/icapture.h:92

Reimplemented by