#include <icy/av/icapture.h>Inherits:
PacketStreamAdapter,StartableSubclassed by:MediaCapture
Abstract interface for audio and video capture devices.
| Return | Name | Description |
|---|---|---|
PacketSignal | emitter |
PacketSignal emitter| Return | Name | Description |
|---|---|---|
ICapture inline | ||
void | start | Start capturing and emitting packets. |
void | stop | Stop capturing and release device resources. |
void | openFile virtual inline | Open a media file as the capture source. |
void | close virtual inline | Release the capture source and any associated resources. |
void | getEncoderFormat | Populate iformat with the encoder-ready format derived from this capture source. |
void | getEncoderAudioCodec virtual inline | Populate params with the encoder-ready audio codec parameters. |
void | getEncoderVideoCodec virtual inline | Populate params with the encoder-ready video codec parameters. |
void | openAudio virtual inline | Open an audio capture device with the given parameters. |
void | openVideo virtual inline | Open a video capture device with the given parameters. |
void | onStreamStateChange virtual inline | React to PacketStream state transitions by starting or stopping capture. |
inline
inline ICapture()void start()Start capturing and emitting packets.
void stop()Stop capturing and release device resources.
virtual inline
virtual inline void openFile(const std::string & file)Open a media file as the capture source.
file Path to the media file.virtual inline
virtual inline void close()Release the capture source and any associated resources.
void getEncoderFormat(Format & iformat)Populate iformat with the encoder-ready format derived from this capture source.
iformat Output Format struct to fill.virtual inline
virtual inline void getEncoderAudioCodec(AudioCodec & params)Populate params with the encoder-ready audio codec parameters.
params Output AudioCodec struct to fill.virtual inline
virtual inline void getEncoderVideoCodec(VideoCodec & params)Populate params with the encoder-ready video codec parameters.
params Output VideoCodec struct to fill.virtual inline
virtual inline void openAudio(const std::string & device, const AudioCodec & params)Open an audio capture device with the given parameters.
device The platform audio device identifier.
params The desired capture parameters.
virtual inline
virtual inline void openVideo(const std::string & device, const VideoCodec & params)Open a video capture device with the given parameters.
device The platform video device identifier.
params The desired capture parameters.
virtual inline
virtual inline void onStreamStateChange(const PacketStreamState & state)React to PacketStream state transitions by starting or stopping capture.
| Return | Name | Description |
|---|---|---|
void | openStream virtual inline |
virtual inline
virtual inline void openStream(const std::string & filename, const AVInputFormat * inputFormat, AVDictionary ** formatParams)