Example for grabber (grabber_audio)
[Device invocation examples]

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

PROPERTYDESCRIPTIONDEFAULT
device
subdevicename (or nested configuration) of device to wrap
portaudio.device
portaudio.wrapped
portaudio.rateaudio sample rate (0=automatic)0
portaudio.samplesnumber of samples per network packet (0=automatic)0
portaudio.channelsnumber of audio channels (0=automatic, max is 2)0
portaudio.readif present, just deal with reading audio (microphone)
portaudio.writeif present, just deal with writing audio (speaker)
portaudio.idwhich portaudio index to use (-1=automatic)-1
portaudio.loopbackif present, send audio read from microphone immediately back to speaker
portaudio.delayif present, do not configure audio device until it needs to be used
no_dropif present, use strict policy for sending data
stampif present, add timestamps to data
namename of port to send data on/grabber
frameratemaximum rate in Hz to read from subdevice0
single_threadedif present, operate in single threaded mode
See also:
yarp::dev::ServerFrameGrabber
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines