YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FfmpegGrabber_ParamsParser Class Reference

This class is the parameters parser for class FfmpegGrabber. More...

#include <ffmpeg/FfmpegGrabber_ParamsParser.h>

+ Inheritance diagram for FfmpegGrabber_ParamsParser:

Classes

struct  parser_version_type
 

Public Member Functions

 FfmpegGrabber_ParamsParser ()
 
 ~FfmpegGrabber_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Public Attributes

const std::string m_device_classname = {"FfmpegGrabber"}
 
const std::string m_device_name = {"ffmpeg_grabber"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_source_defaultValue = {"default.avi"}
 
const std::string m_loop_defaultValue = {"true"}
 
const std::string m_sync_defaultValue = {"image"}
 
const std::string m_nodelay_defaultValue = {"false"}
 
const std::string m_pace_defaultValue = {"1.0"}
 
const std::string m_v4l_defaultValue = {"false"}
 
const std::string m_v4l1_defaultValue = {"false"}
 
const std::string m_v4l2_defaultValue = {"false"}
 
const std::string m_ieee1394_defaultValue = {"false"}
 
const std::string m_v4ldevice_defaultValue = {"/dev/video0"}
 
const std::string m_audio_defaultValue = {"/dev/dsp"}
 
const std::string m_audio_rate_defaultValue = {"44100"}
 
const std::string m_channels_defaultValue = {"1"}
 
const std::string m_time_base_num_defaultValue = {"1"}
 
const std::string m_time_base_den_defaultValue = {"29"}
 
const std::string m_channel_defaultValue = {"0"}
 
const std::string m_standard_defaultValue = {""}
 
const std::string m_width_defaultValue = {"640"}
 
const std::string m_height_defaultValue = {"480"}
 
const std::string m_devname_defaultValue = {"/dev/dv1394"}
 
std::string m_source = {"default.avi"}
 
bool m_loop = {true}
 
std::string m_sync = {"image"}
 
bool m_nodelay = {false}
 
double m_pace = {1.0}
 
bool m_v4l = {false}
 
bool m_v4l1 = {false}
 
bool m_v4l2 = {false}
 
bool m_ieee1394 = {false}
 
std::string m_v4ldevice = {"/dev/video0"}
 
std::string m_audio = {"/dev/dsp"}
 
int m_audio_rate = {44100}
 
int m_channels = {1}
 
int m_time_base_num = {1}
 
int m_time_base_den = {29}
 
int m_channel = {0}
 
std::string m_standard = {}
 
int m_width = {640}
 
int m_height = {480}
 
std::string m_devname = {"/dev/dv1394"}
 

Detailed Description

This class is the parameters parser for class FfmpegGrabber.

These are the used parameters:

Group name Parameter name Type Units Default Value Required Description Notes
- source string - default.avi 0 media file to read from -
- loop bool - true 0 media should loop (default) -
- sync string - image 0 sync on image or audio (if have to choose)? -
- nodelay bool - false 0 media will play in simulated realtime unless this is present -
- pace double - 1.0 0 simulated realtime multiplier factor (must be <1 right now) -
- v4l bool - false 0 if present, read from video4linux -
- v4l1 bool - false 0 if present, read from video4linux -
- v4l2 bool - false 0 if present, read from video4linux -
- ieee1394 bool - false 0 if present, read from firewire -
- v4ldevice string - /dev/video0 0 device name -
- audio string - /dev/dsp 0 optional audio device name -
- audio_rate int - 44100 0 audio sample rate -
- channels int - 1 0 number of channels -
- time_base_num int - 1 0 numerator of basic time unit -
- time_base_den int - 29 0 denominator of basic time unit -
- channel int - 0 0 channel identifier -
- standard string - - 0 pal versus ntsc -
- width int - 640 0 width of image -
- height int - 480 0 height of image -
- devname string - /dev/dv1394 0 firewire device name -

The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):

yarpdev --device ffmpeg_grabber --source default.avi --loop true --sync image --nodelay false --pace 1.0 --v4l false --v4l1 false --v4l2 false --ieee1394 false --v4ldevice /dev/video0 --audio /dev/dsp --audio_rate 44100 --channels 1 --time_base_num 1 --time_base_den 29 --channel 0 --standard <optional_value> --width 640 --height 480 --devname /dev/dv1394
yarpdev --device ffmpeg_grabber

Definition at line 60 of file FfmpegGrabber_ParamsParser.h.

Constructor & Destructor Documentation

◆ FfmpegGrabber_ParamsParser()

FfmpegGrabber_ParamsParser::FfmpegGrabber_ParamsParser ( )

Definition at line 23 of file FfmpegGrabber_ParamsParser.cpp.

◆ ~FfmpegGrabber_ParamsParser()

FfmpegGrabber_ParamsParser::~FfmpegGrabber_ParamsParser ( )
overridedefault

Member Function Documentation

◆ getDeviceClassName()

std::string FfmpegGrabber_ParamsParser::getDeviceClassName ( ) const
inlineoverridevirtual

Get the name of the DeviceDriver class.

Returns
A string containing the name of the class.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 120 of file FfmpegGrabber_ParamsParser.h.

◆ getDeviceName()

std::string FfmpegGrabber_ParamsParser::getDeviceName ( ) const
inlineoverridevirtual

Get the name of the device (i.e.

the plugin name).

Returns
A string containing the name of the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 121 of file FfmpegGrabber_ParamsParser.h.

◆ getDocumentationOfDeviceParams()

std::string FfmpegGrabber_ParamsParser::getDocumentationOfDeviceParams ( ) const
overridevirtual

Get the documentation of the DeviceDriver's parameters.

Returns
A string containing the documentation.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 374 of file FfmpegGrabber_ParamsParser.cpp.

◆ getListOfParams()

std::vector< std::string > FfmpegGrabber_ParamsParser::getListOfParams ( ) const
overridevirtual

Return a list of all params used by the device.

Returns
A vector containing the names of parameters used by the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 28 of file FfmpegGrabber_ParamsParser.cpp.

◆ parseParams()

bool FfmpegGrabber_ParamsParser::parseParams ( const yarp::os::Searchable config)
overridevirtual

Parse the DeviceDriver parameters.

Returns
true if the parsing is successful, false otherwise

Implements yarp::dev::IDeviceDriverParams.

Definition at line 55 of file FfmpegGrabber_ParamsParser.cpp.

Member Data Documentation

◆ m_audio

std::string FfmpegGrabber_ParamsParser::m_audio = {"/dev/dsp"}

Definition at line 108 of file FfmpegGrabber_ParamsParser.h.

◆ m_audio_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_audio_defaultValue = {"/dev/dsp"}

Definition at line 87 of file FfmpegGrabber_ParamsParser.h.

◆ m_audio_rate

int FfmpegGrabber_ParamsParser::m_audio_rate = {44100}

Definition at line 109 of file FfmpegGrabber_ParamsParser.h.

◆ m_audio_rate_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_audio_rate_defaultValue = {"44100"}

Definition at line 88 of file FfmpegGrabber_ParamsParser.h.

◆ m_channel

int FfmpegGrabber_ParamsParser::m_channel = {0}

Definition at line 113 of file FfmpegGrabber_ParamsParser.h.

◆ m_channel_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_channel_defaultValue = {"0"}

Definition at line 92 of file FfmpegGrabber_ParamsParser.h.

◆ m_channels

int FfmpegGrabber_ParamsParser::m_channels = {1}

Definition at line 110 of file FfmpegGrabber_ParamsParser.h.

◆ m_channels_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_channels_defaultValue = {"1"}

Definition at line 89 of file FfmpegGrabber_ParamsParser.h.

◆ m_device_classname

const std::string FfmpegGrabber_ParamsParser::m_device_classname = {"FfmpegGrabber"}

Definition at line 67 of file FfmpegGrabber_ParamsParser.h.

◆ m_device_name

const std::string FfmpegGrabber_ParamsParser::m_device_name = {"ffmpeg_grabber"}

Definition at line 68 of file FfmpegGrabber_ParamsParser.h.

◆ m_devname

std::string FfmpegGrabber_ParamsParser::m_devname = {"/dev/dv1394"}

Definition at line 117 of file FfmpegGrabber_ParamsParser.h.

◆ m_devname_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_devname_defaultValue = {"/dev/dv1394"}

Definition at line 96 of file FfmpegGrabber_ParamsParser.h.

◆ m_height

int FfmpegGrabber_ParamsParser::m_height = {480}

Definition at line 116 of file FfmpegGrabber_ParamsParser.h.

◆ m_height_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_height_defaultValue = {"480"}

Definition at line 95 of file FfmpegGrabber_ParamsParser.h.

◆ m_ieee1394

bool FfmpegGrabber_ParamsParser::m_ieee1394 = {false}

Definition at line 106 of file FfmpegGrabber_ParamsParser.h.

◆ m_ieee1394_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_ieee1394_defaultValue = {"false"}

Definition at line 85 of file FfmpegGrabber_ParamsParser.h.

◆ m_loop

bool FfmpegGrabber_ParamsParser::m_loop = {true}

Definition at line 99 of file FfmpegGrabber_ParamsParser.h.

◆ m_loop_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_loop_defaultValue = {"true"}

Definition at line 78 of file FfmpegGrabber_ParamsParser.h.

◆ m_nodelay

bool FfmpegGrabber_ParamsParser::m_nodelay = {false}

Definition at line 101 of file FfmpegGrabber_ParamsParser.h.

◆ m_nodelay_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_nodelay_defaultValue = {"false"}

Definition at line 80 of file FfmpegGrabber_ParamsParser.h.

◆ m_pace

double FfmpegGrabber_ParamsParser::m_pace = {1.0}

Definition at line 102 of file FfmpegGrabber_ParamsParser.h.

◆ m_pace_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_pace_defaultValue = {"1.0"}

Definition at line 81 of file FfmpegGrabber_ParamsParser.h.

◆ m_parser_is_strict

bool FfmpegGrabber_ParamsParser::m_parser_is_strict = false

Definition at line 69 of file FfmpegGrabber_ParamsParser.h.

◆ m_parser_version

const parser_version_type FfmpegGrabber_ParamsParser::m_parser_version = {}

Definition at line 75 of file FfmpegGrabber_ParamsParser.h.

◆ m_source

std::string FfmpegGrabber_ParamsParser::m_source = {"default.avi"}

Definition at line 98 of file FfmpegGrabber_ParamsParser.h.

◆ m_source_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_source_defaultValue = {"default.avi"}

Definition at line 77 of file FfmpegGrabber_ParamsParser.h.

◆ m_standard

std::string FfmpegGrabber_ParamsParser::m_standard = {}

Definition at line 114 of file FfmpegGrabber_ParamsParser.h.

◆ m_standard_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_standard_defaultValue = {""}

Definition at line 93 of file FfmpegGrabber_ParamsParser.h.

◆ m_sync

std::string FfmpegGrabber_ParamsParser::m_sync = {"image"}

Definition at line 100 of file FfmpegGrabber_ParamsParser.h.

◆ m_sync_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_sync_defaultValue = {"image"}

Definition at line 79 of file FfmpegGrabber_ParamsParser.h.

◆ m_time_base_den

int FfmpegGrabber_ParamsParser::m_time_base_den = {29}

Definition at line 112 of file FfmpegGrabber_ParamsParser.h.

◆ m_time_base_den_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_time_base_den_defaultValue = {"29"}

Definition at line 91 of file FfmpegGrabber_ParamsParser.h.

◆ m_time_base_num

int FfmpegGrabber_ParamsParser::m_time_base_num = {1}

Definition at line 111 of file FfmpegGrabber_ParamsParser.h.

◆ m_time_base_num_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_time_base_num_defaultValue = {"1"}

Definition at line 90 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l

bool FfmpegGrabber_ParamsParser::m_v4l = {false}

Definition at line 103 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l1

bool FfmpegGrabber_ParamsParser::m_v4l1 = {false}

Definition at line 104 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l1_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_v4l1_defaultValue = {"false"}

Definition at line 83 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l2

bool FfmpegGrabber_ParamsParser::m_v4l2 = {false}

Definition at line 105 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l2_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_v4l2_defaultValue = {"false"}

Definition at line 84 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4l_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_v4l_defaultValue = {"false"}

Definition at line 82 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4ldevice

std::string FfmpegGrabber_ParamsParser::m_v4ldevice = {"/dev/video0"}

Definition at line 107 of file FfmpegGrabber_ParamsParser.h.

◆ m_v4ldevice_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_v4ldevice_defaultValue = {"/dev/video0"}

Definition at line 86 of file FfmpegGrabber_ParamsParser.h.

◆ m_width

int FfmpegGrabber_ParamsParser::m_width = {640}

Definition at line 115 of file FfmpegGrabber_ParamsParser.h.

◆ m_width_defaultValue

const std::string FfmpegGrabber_ParamsParser::m_width_defaultValue = {"640"}

Definition at line 94 of file FfmpegGrabber_ParamsParser.h.


The documentation for this class was generated from the following files: