Instantiates grabber device implemented by yarp::dev::ServerFrameGrabber. More...
Instantiates grabber device implemented by yarp::dev::ServerFrameGrabber.
# start up a network wrapper around a microphone, read via portaudio device grabber subdevice portaudio read name /microphone
If this text is saved in a file called grabber_audio.ini then the device can be created by doing:
yarpdev --file grabber_audio.ini
Of course, the configuration could be passed just as command line options, or as a yarp::os::Property object in a program:
Property p; p.fromConfigFile("grabber_audio.ini"); // of course you could construct the Property object on-the-fly PolyDriver dev; dev.open(p); if (dev.isValid()) { /* use the device via view method */ }
Here is a list of properties checked when starting up a device based on this configuration file. Note that which properties are checked can depend on whether other properties are present. In some cases properties can also vary between operating systems. So this is just an example
| PROPERTY | DESCRIPTION | DEFAULT |
| device | ||
| subdevice | name (or nested configuration) of device to wrap | |
| portaudio.device | ||
| portaudio.wrapped | ||
| portaudio.rate | audio sample rate (0=automatic) | 0 |
| portaudio.samples | number of samples per network packet (0=automatic) | 0 |
| portaudio.channels | number of audio channels (0=automatic, max is 2) | 0 |
| portaudio.read | if present, just deal with reading audio (microphone) | |
| portaudio.write | if present, just deal with writing audio (speaker) | |
| portaudio.id | which portaudio index to use (-1=automatic) | -1 |
| portaudio.loopback | if present, send audio read from microphone immediately back to speaker | |
| portaudio.delay | if present, do not configure audio device until it needs to be used | |
| no_drop | if present, use strict policy for sending data | |
| stamp | if present, add timestamps to data | |
| name | name of port to send data on | /grabber |
| framerate | maximum rate in Hz to read from subdevice | 0 |
| single_threaded | if present, operate in single threaded mode |
1.7.1