#include <icy/av/videocapture.h>Inherits:
MediaCapture
Cross-platform video device capturer backed by FFmpeg avdevice.
| Return | Name | Description |
|---|---|---|
VideoCapture | Construct without opening a device. Call openVideo() before start(). | |
VideoCapture | Construct and immediately open the given video device using a VideoCodec params struct. | |
VideoCapture | Construct and immediately open the given video device with individual parameters. | |
void | openVideo virtual | Open the given video device using a VideoCodec params struct. |
void | openVideo virtual | Open the given video device with individual parameters. Configures the FFmpeg input format and passes device options via AVDictionary. If the device cannot satisfy the requested parameters, pixel format conversion and scaling will be applied by the decoder. |
VideoCapture()Construct without opening a device. Call openVideo() before start().
VideoCapture(const std::string & device, const av::VideoCodec & params)Construct and immediately open the given video device using a VideoCodec params struct.
device The platform video device identifier (e.g. "/dev/video0" or "0" on Windows).
params The desired capture parameters (width, height, fps, pixel format).
VideoCapture(const std::string & device, int width, int height, double framerate, const std::string & pixelFmt)Construct and immediately open the given video device with individual parameters.
device The platform video device identifier.
width The desired frame width in pixels, or 0 for device default.
height The desired frame height in pixels, or 0 for device default.
framerate The desired frame rate, or 0 for device default.
pixelFmt The desired pixel format string, or "" for "yuv420p".
virtual
virtual void openVideo(const std::string & device, const av::VideoCodec & params)Open the given video device using a VideoCodec params struct.
device The platform video device identifier.
params The desired capture parameters.
virtual
virtual void openVideo(const std::string & device, int width, int height, double framerate, const std::string & pixelFmt)Open the given video device with individual parameters. Configures the FFmpeg input format and passes device options via AVDictionary. If the device cannot satisfy the requested parameters, pixel format conversion and scaling will be applied by the decoder.
device The platform video device identifier.
width The desired frame width in pixels, or 0 for device default.
height The desired frame height in pixels, or 0 for device default.
framerate The desired frame rate, or 0 for device default.
pixelFmt The desired pixel format string, or "" for "yuv420p".
| Name | Description |
|---|---|
Ptr |
std::shared_ptr< VideoCapture > Ptr()