ffmpeg_grabber: An image frame grabber device using ffmpeg to capture images from AVI files.
More...
#include <ffmpeg/FfmpegGrabber.h>
ffmpeg_grabber: An image frame grabber device using ffmpeg to capture images from AVI files.
Definition at line 34 of file FfmpegGrabber.h.
◆ FfmpegGrabber()
| FfmpegGrabber::FfmpegGrabber |
( |
| ) |
|
|
inline |
◆ close()
| bool FfmpegGrabber::close |
( |
| ) |
|
|
overridevirtual |
◆ getAudioVisual()
◆ getImage()
◆ getRecordingAudioBufferCurrentSize()
◆ getRecordingAudioBufferMaxSize()
◆ getSound()
| bool FfmpegGrabber::getSound |
( |
yarp::sig::Sound & |
sound, |
|
|
size_t |
min_number_of_samples, |
|
|
size_t |
max_number_of_samples, |
|
|
double |
max_samples_timeout_s |
|
) |
| |
|
overridevirtual |
Get a sound from a device.
Examples: getSound(s, 0, 100, 0.1); returns a sound whose size can vary between 0 and 100, with a maximum blocking time of 0.1 getSound(s, 100, 100, 0.0); returns a sound with exact size of 100. It may block forever (more specifically, until sound size is at least 100). getSound(s, 100, 100000, 0.0); returns a sound with a minimum size of 0, while trying to transfer all the internal buffer. It may block forever (more specifically, until sound size is at least 100).
- Parameters
-
| sound | the sound to be filled |
| min_number_of_samples. | The function will block until the driver is able to collect at least min_number_of_samples. If set to zero, the function may return empty sounds. |
| max_number_of_samples. | The function will block until the driver is either able to collect max_number_of_samples or the timeout expires. |
| max_samples_timeout_s. | The timeout (in seconds) to retrieve max_number_of_samples. |
- Returns
- true upon success, false for an invalid set of parameters, such as max_number_of_samples<min_number_of_samples, etc.
Implements yarp::dev::IAudioGrabberSound.
Definition at line 650 of file FfmpegGrabber.cpp.
◆ hasAudio()
| bool FfmpegGrabber::hasAudio |
( |
| ) |
|
|
inlineoverridevirtual |
◆ hasVideo()
| bool FfmpegGrabber::hasVideo |
( |
| ) |
|
|
inlineoverridevirtual |
◆ height()
| int FfmpegGrabber::height |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isRecording()
| bool FfmpegGrabber::isRecording |
( |
bool & |
recording_enabled | ) |
|
|
inlineoverridevirtual |
◆ open()
Open the DeviceDriver.
- Parameters
-
| config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
- Returns
- true/false upon success/failure
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 458 of file FfmpegGrabber.cpp.
◆ openFile()
| bool FfmpegGrabber::openFile |
( |
AVFormatContext ** |
ppFormatCtx, |
|
|
const char * |
fname |
|
) |
| |
|
protected |
◆ openFirewire()
◆ openV4L()
| bool FfmpegGrabber::openV4L |
( |
yarp::os::Searchable & |
config, |
|
|
AVFormatContext ** |
ppFormatCtx, |
|
|
AVFormatContext ** |
ppFormatCtx2 |
|
) |
| |
|
protected |
◆ resetRecordingAudioBuffer()
| bool FfmpegGrabber::resetRecordingAudioBuffer |
( |
| ) |
|
|
inlineoverridevirtual |
◆ setHWGain()
| bool FfmpegGrabber::setHWGain |
( |
double |
gain | ) |
|
|
inlineoverridevirtual |
Sets the hardware gain of the grabbing device (if supported by the hardware)
- Parameters
-
| gain | the audio gain (1.0 is the default value) |
- Returns
- true/false upon success/failure
Implements yarp::dev::IAudioGrabberSound.
Definition at line 115 of file FfmpegGrabber.h.
◆ setSWGain()
| bool FfmpegGrabber::setSWGain |
( |
double |
gain | ) |
|
|
inlineoverridevirtual |
◆ startRecording()
| bool FfmpegGrabber::startRecording |
( |
| ) |
|
|
inlineoverridevirtual |
◆ stopRecording()
| bool FfmpegGrabber::stopRecording |
( |
| ) |
|
|
inlineoverridevirtual |
◆ width()
| int FfmpegGrabber::width |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ _hasAudio
| bool FfmpegGrabber::_hasAudio |
|
protected |
◆ _hasVideo
| bool FfmpegGrabber::_hasVideo |
|
protected |
◆ active
| bool FfmpegGrabber::active |
|
protected |
◆ formatParamsAudio
| AVDictionary* FfmpegGrabber::formatParamsAudio |
|
protected |
◆ formatParamsVideo
| AVDictionary* FfmpegGrabber::formatParamsVideo |
|
protected |
◆ imageSync
| bool FfmpegGrabber::imageSync |
|
protected |
◆ m_capture
| void* FfmpegGrabber::m_capture |
|
protected |
Opaque ffmpeg structure for image capture.
Definition at line 152 of file FfmpegGrabber.h.
◆ m_channels
| int FfmpegGrabber::m_channels |
|
protected |
◆ m_h
◆ m_rate
| int FfmpegGrabber::m_rate |
|
protected |
◆ m_uri
| std::string FfmpegGrabber::m_uri |
|
protected |
◆ m_w
◆ needRateControl
| bool FfmpegGrabber::needRateControl |
|
protected |
◆ pace
| double FfmpegGrabber::pace |
|
protected |
◆ packet
| AVPacket FfmpegGrabber::packet |
|
protected |
◆ pAudioFormatCtx
| AVFormatContext* FfmpegGrabber::pAudioFormatCtx |
|
protected |
◆ pFormatCtx
| AVFormatContext* FfmpegGrabber::pFormatCtx |
|
protected |
◆ pFormatCtx2
| AVFormatContext* FfmpegGrabber::pFormatCtx2 |
|
protected |
◆ shouldLoop
| bool FfmpegGrabber::shouldLoop |
|
protected |
◆ startTime
| double FfmpegGrabber::startTime |
|
protected |
◆ system_resource
| void* FfmpegGrabber::system_resource |
|
protected |
The documentation for this class was generated from the following files: