YARP
Yet Another Robot Platform
ServerFrameGrabber.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #include "ServerFrameGrabber.h"
11 
12 #include <yarp/os/LogComponent.h>
13 #include <yarp/os/LogStream.h>
14 
15 using namespace yarp::os;
16 using namespace yarp::dev;
17 using namespace yarp::sig;
18 
21 
22 namespace {
23 YARP_LOG_COMPONENT(SERVERFRAMEGRABBER, "yarp.device.grabber")
24 }
25 
27 {
28  if (!active) {
29  return false;
30  }
31  active = false;
32  thread.stop();
33  if (p2!=nullptr) {
34  delete p2;
35  p2 = nullptr;
36  }
37  return true;
38 }
39 
41 {
42  if (active) {
43  yCError(SERVERFRAMEGRABBER, "Did you just try to open the same ServerFrameGrabber twice?\n");
44  return false;
45  }
46 
47  // for AV, control whether output goes on a single port or multiple
48  bool separatePorts = false;
49 
50  p.setReader(*this);
51 
52  yarp::os::Value *name;
53 
54  if (config.check("subdevice",name,"name (or nested configuration) of device to wrap")) {
55  if (name->isString()) {
56  // maybe user isn't doing nested configuration
58  p.setMonitor(config.getMonitor(),
59  name->toString().c_str()); // pass on any monitoring
60  p.fromString(config.toString());
61  p.put("device",name->toString());
62  p.unput("subdevice");
63  poly.open(p);
64  } else {
65  Bottle subdevice = config.findGroup("subdevice").tail();
66  poly.open(subdevice);
67  }
68  if (!poly.isValid()) {
69  //yCError(SERVERFRAMEGRABBER, "cannot make <%s>\n", name->toString().c_str());
70  return false;
71  }
72  } else {
73  yCError(SERVERFRAMEGRABBER, "\"--subdevice <name>\" not set for server_framegrabber\n");
74  return false;
75  }
76  if (poly.isValid()) {
77  IAudioVisualStream *str;
78  poly.view(str);
79  bool a = true;
80  bool v = true;
81  bool vraw = true;
82  if (str!=nullptr) {
83  a = str->hasAudio();
84  v = str->hasVideo();
85  vraw = str->hasRawVideo();
86  }
87  if (v) {
88  poly.view(fgImage);
89  }
90  if (vraw) {
91  poly.view(fgImageRaw);
92  }
93  if (a) {
94  poly.view(fgSound);
95  }
96  if (a&&v) {
97  poly.view(fgAv);
98  }
99  poly.view(fgCtrl);
100  if(fgCtrl)
101  ifgCtrl_Parser.configure(fgCtrl);
102  poly.view(fgTimed);
103  poly.view(rgbVis_p);
104 
105  bool conf = rgbParser.configure(rgbVis_p);
106 
107  if(!conf)
108  {
109  yCWarning(SERVERFRAMEGRABBER) << "ServerFrameGrabber: error configuring interfaces for parsers";
110  }
111  }
112 
113  canDrop = !config.check("no_drop","if present, use strict policy for sending data");
114  addStamp = config.check("stamp","if present, add timestamps to data");
115 
116  p.promiseType(Type::byName("yarp/image")); // TODO: reflect audio options
117  p.setWriteOnly();
118  p.open(config.check("name",Value("/grabber"),
119  "name of port to send data on").asString());
120 
121  /*
122  double framerate=0;
123  if (config.check("framerate", name,
124  "maximum rate in Hz to read from subdevice")) {
125  framerate=name->asFloat64();
126  }
127  */
128 
129  if (fgAv&&
130  !config.check("shared-ports",
131  "If present, send audio and images on same port")) {
132  separatePorts = true;
133  yCAssert(SERVERFRAMEGRABBER, p2==nullptr);
134  p2 = new Port;
135  yCAssert(SERVERFRAMEGRABBER, p2!=nullptr);
136  p2->open(config.check("name2",Value("/grabber2"),
137  "Name of second port to send data on, when audio and images sent separately").asString());
138  }
139 
140  if (fgAv!=nullptr) {
141  if (separatePorts) {
142  yCAssert(SERVERFRAMEGRABBER, p2!=nullptr);
143  thread.attach(new DataWriter2<yarp::sig::ImageOf<yarp::sig::PixelRgb>, yarp::sig::Sound>(p,*p2,*this,canDrop,addStamp));
144  } else {
145  thread.attach(new DataWriter<ImageRgbSound>(p,*this,canDrop,
146  addStamp));
147  }
148  } else if (fgImage!=nullptr) {
149  thread.attach(new DataWriter<yarp::sig::ImageOf<yarp::sig::PixelRgb> >(p,*this,canDrop,addStamp,fgTimed));
150  } else if (fgImageRaw!=nullptr) {
151  thread.attach(new DataWriter<yarp::sig::ImageOf<yarp::sig::PixelMono> >(p,*this,canDrop,addStamp,fgTimed));
152  } else {
153  yCError(SERVERFRAMEGRABBER, "subdevice <%s> doesn't look like a framegrabber\n",
154  name->toString().c_str());
155  return false;
156  }
157 
158  singleThreaded =
159  config.check("single_threaded",
160  "if present, operate in single threaded mode")!=0;
161  thread.open(config.check("framerate",Value("0"),
162  "maximum rate in Hz to read from subdevice").asFloat64(),
163  singleThreaded);
164  active = true;
165 
166 
167  DeviceResponder::makeUsage();
168  addUsage("[set] [bri] $fBrightness", "set brightness");
169  addUsage("[set] [expo] $fExposure", "set exposure");
170  addUsage("[set] [shar] $fSharpness", "set sharpness");
171  addUsage("[set] [whit] $fBlue $fRed", "set white balance");
172  addUsage("[set] [hue] $fHue", "set hue");
173  addUsage("[set] [satu] $fSaturation", "set saturation");
174  addUsage("[set] [gamm] $fGamma", "set gamma");
175  addUsage("[set] [shut] $fShutter", "set shutter");
176  addUsage("[set] [gain] $fGain", "set gain");
177  addUsage("[set] [iris] $fIris", "set iris");
178 
179  addUsage("[get] [bri]", "get brightness");
180  addUsage("[get] [expo]", "get exposure");
181  addUsage("[get] [shar]", "get sharpness");
182  addUsage("[get] [whit]", "get white balance");
183  addUsage("[get] [hue]", "get hue");
184  addUsage("[get] [satu]", "get saturation");
185  addUsage("[get] [gamm]", "get gamma");
186  addUsage("[get] [shut]", "get shutter");
187  addUsage("[get] [gain]", "get gain");
188  addUsage("[get] [iris]", "get iris");
189 
190  addUsage("[get] [w]", "get width of image");
191  addUsage("[get] [h]", "get height of image");
192 
193  return true;
194 }
195 
197  yarp::os::Bottle& response)
198 {
199  int code = cmd.get(0).asVocab();
200 
201  auto* fgCtrlDC1394=dynamic_cast<IFrameGrabberControlsDC1394*>(fgCtrl);
202 
203  switch (code)
204  {
205  // first check if requests are coming from new iFrameGrabberControl2 interface and process them
207  {
208  return ifgCtrl_Parser.respond(cmd, response); // I don't like all those returns everywhere!!! :-(
209  } break;
211  {
212  return rgbParser.respond(cmd,response);
213  } break;
215  // DC1394 COMMANDS
218  {
219  if (fgCtrlDC1394)
220  {
221  int codeDC1394 = cmd.get(1).asVocab();
222  switch(codeDC1394)
223  {
224  case VOCAB_DRGETMSK: // VOCAB_DRGETMSK 12
225  response.addInt32(int(fgCtrlDC1394->getVideoModeMaskDC1394()));
226  return true;
227  case VOCAB_DRGETVMD: // VOCAB_DRGETVMD 13
228  response.addInt32(int(fgCtrlDC1394->getVideoModeDC1394()));
229  return true;
230  case VOCAB_DRSETVMD: // VOCAB_DRSETVMD 14
231  response.addInt32(int(fgCtrlDC1394->setVideoModeDC1394(cmd.get(1).asInt32())));
232  return true;
233  case VOCAB_DRGETFPM: // VOCAB_DRGETFPM 15
234  response.addInt32(int(fgCtrlDC1394->getFPSMaskDC1394()));
235  return true;
236  case VOCAB_DRGETFPS: // VOCAB_DRGETFPS 16
237  response.addInt32(int(fgCtrlDC1394->getFPSDC1394()));
238  return true;
239  case VOCAB_DRSETFPS: // VOCAB_DRSETFPS 17
240  response.addInt32(int(fgCtrlDC1394->setFPSDC1394(cmd.get(1).asInt32())));
241  return true;
242 
243  case VOCAB_DRGETISO: // VOCAB_DRGETISO 18
244  response.addInt32(int(fgCtrlDC1394->getISOSpeedDC1394()));
245  return true;
246  case VOCAB_DRSETISO: // VOCAB_DRSETISO 19
247  response.addInt32(int(fgCtrlDC1394->setISOSpeedDC1394(cmd.get(1).asInt32())));
248  return true;
249 
250  case VOCAB_DRGETCCM: // VOCAB_DRGETCCM 20
251  response.addInt32(int(fgCtrlDC1394->getColorCodingMaskDC1394(cmd.get(1).asInt32())));
252  return true;
253  case VOCAB_DRGETCOD: // VOCAB_DRGETCOD 21
254  response.addInt32(int(fgCtrlDC1394->getColorCodingDC1394()));
255  return true;
256  case VOCAB_DRSETCOD: // VOCAB_DRSETCOD 22
257  response.addInt32(int(fgCtrlDC1394->setColorCodingDC1394(cmd.get(1).asInt32())));
258  return true;
259  case VOCAB_DRGETF7M: // VOCAB_DRGETF7M 25
260  {
261  unsigned int xstep,ystep,xdim,ydim,xoffstep,yoffstep;
262  fgCtrlDC1394->getFormat7MaxWindowDC1394(xdim,ydim,xstep,ystep,xoffstep,yoffstep);
263  response.addInt32(xdim);
264  response.addInt32(ydim);
265  response.addInt32(xstep);
266  response.addInt32(ystep);
267  response.addInt32(xoffstep);
268  response.addInt32(yoffstep);
269  }
270  return true;
271  case VOCAB_DRGETWF7: // VOCAB_DRGETWF7 26
272  {
273  unsigned int xdim,ydim;
274  int x0,y0;
275  fgCtrlDC1394->getFormat7WindowDC1394(xdim,ydim,x0,y0);
276  response.addInt32(xdim);
277  response.addInt32(ydim);
278  response.addInt32(x0);
279  response.addInt32(y0);
280  }
281  return true;
282  case VOCAB_DRSETWF7: // VOCAB_DRSETWF7 27
283  response.addInt32(int(fgCtrlDC1394->setFormat7WindowDC1394(cmd.get(1).asInt32(),cmd.get(2).asInt32(),cmd.get(3).asInt32(),cmd.get(4).asInt32())));
284  return true;
285  case VOCAB_DRSETOPM: // VOCAB_DRSETOPM 28
286  response.addInt32(int(fgCtrlDC1394->setOperationModeDC1394(cmd.get(1).asInt32()!=0)));
287  return true;
288  case VOCAB_DRGETOPM: // VOCAB_DRGETOPM 29
289  response.addInt32(fgCtrlDC1394->getOperationModeDC1394());
290  return true;
291 
292  case VOCAB_DRSETTXM: // VOCAB_DRSETTXM 30
293  response.addInt32(int(fgCtrlDC1394->setTransmissionDC1394(cmd.get(1).asInt32()!=0)));
294  return true;
295  case VOCAB_DRGETTXM: // VOCAB_DRGETTXM 31
296  response.addInt32(fgCtrlDC1394->getTransmissionDC1394());
297  return true;
298  /*
299  case VOCAB_DRSETBAY: // VOCAB_DRSETBAY 32
300  response.addInt32(int(fgCtrlDC1394->setBayerDC1394(bool(cmd.get(1).asInt32()))));
301  return true;
302  case VOCAB_DRGETBAY: // VOCAB_DRGETBAY 33
303  response.addInt32(fgCtrlDC1394->getBayerDC1394());
304  return true;
305  */
306  case VOCAB_DRSETBCS: // VOCAB_DRSETBCS 34
307  response.addInt32(int(fgCtrlDC1394->setBroadcastDC1394(cmd.get(1).asInt32()!=0)));
308  return true;
309  case VOCAB_DRSETDEF: // VOCAB_DRSETDEF 35
310  response.addInt32(int(fgCtrlDC1394->setDefaultsDC1394()));
311  return true;
312  case VOCAB_DRSETRST: // VOCAB_DRSETRST 36
313  response.addInt32(int(fgCtrlDC1394->setResetDC1394()));
314  return true;
315  case VOCAB_DRSETPWR: // VOCAB_DRSETPWR 37
316  response.addInt32(int(fgCtrlDC1394->setPowerDC1394(cmd.get(1).asInt32()!=0)));
317  return true;
318  case VOCAB_DRSETCAP: // VOCAB_DRSETCAP 38
319  response.addInt32(int(fgCtrlDC1394->setCaptureDC1394(cmd.get(1).asInt32()!=0)));
320  return true;
321  case VOCAB_DRSETBPP: // VOCAB_DRSETCAP 39
322  response.addInt32(int(fgCtrlDC1394->setBytesPerPacketDC1394(cmd.get(1).asInt32())));
323  return true;
324  case VOCAB_DRGETBPP: // VOCAB_DRGETTXM 40
325  response.addInt32(fgCtrlDC1394->getBytesPerPacketDC1394());
326  return true;
327  default:
328  return DeviceResponder::respond(cmd,response);
329  }
330  }
331  }
332  }
333  yCError(SERVERFRAMEGRABBER) << "ServerFrameGrabber: command not recognized" << cmd.toString();
334  return DeviceResponder::respond(cmd,response);
335 }
336 
337 /*
338 bool ServerFrameGrabber::read(ConnectionReader& connection)
339 {
340  yarp::os::Bottle cmd, response;
341  if (!cmd.read(connection)) { return false; }
342  yCDebug(SERVERFRAMEGRABBER, "command received: %s\n", cmd.toString().c_str());
343  int code = cmd.get(0).asVocab();
344  switch (code) {
345  case VOCAB_SET:
346  yCDebug(SERVERFRAMEGRABBER, "set command received\n");
347  {
348  bool ok = false;
349  switch(cmd.get(1).asVocab()) {
350  case VOCAB_BRIGHTNESS:
351  ok = setBrightness(cmd.get(2).asFloat64());
352  break;
353  case VOCAB_SHUTTER:
354  ok = setShutter(cmd.get(2).asFloat64());
355  break;
356  case VOCAB_GAIN:
357  ok = setGain(cmd.get(2).asFloat64());
358  break;
359  case VOCAB_WHITE:
360  ok = setWhiteBalance(cmd.get(2).asFloat64(),
361  cmd.get(3).asFloat64());
362  break;
363  }
364  }
365  break;
366  case VOCAB_GET:
367  yCDebug(SERVERFRAMEGRABBER, "get command received\n");
368  {
369  bool ok = false;
370  response.addVocab(VOCAB_IS);
371  response.add(cmd.get(1));
372  switch(cmd.get(1).asVocab()) {
373  case VOCAB_BRIGHTNESS:
374  ok = true;
375  response.addFloat64(getBrightness());
376  break;
377  case VOCAB_SHUTTER:
378  ok = true;
379  response.addFloat64(getShutter());
380  break;
381  case VOCAB_GAIN:
382  ok = true;
383  response.addFloat64(getGain());
384  break;
385  case VOCAB_WIDTH:
386  // normally, this would come from stream information
387  ok = true;
388  response.addInt32(width());
389  break;
390  case VOCAB_HEIGHT:
391  // normally, this would come from stream information
392  ok = true;
393  response.addInt32(height());
394  break;
395 
396  case VOCAB_WHITE:
397 
398  double r;
399 
400  double g;
401 
402  ok=getWhiteBalance(r, g);
403 
404  response.addFloat64(r);
405 
406  response.addFloat64(g);
407  }
408  if (!ok) {
409  // leave answer blank
410  }
411  }
412  break;
413  }
414  if (response.size()>=1) {
415  ConnectionWriter *writer = connection.getWriter();
416  if (writer!=NULL) {
417  response.write(*writer);
418  yCDebug(SERVERFRAMEGRABBER, "response sent: %s\n", response.toString().c_str());
419  }
420  }
421  return true;
422 }
423 */
424 
426 {
427  return getImage(image);
428 }
429 
431 {
432  return getImage(image);
433 }
434 
436 {
437  return getDatum(imageSound.head,imageSound.body);
438 }
439 
441  yarp::sig::Sound& sound)
442 {
443  return getAudioVisual(image,sound);
444 }
445 
447 {
448  if (fgImage==nullptr) { return false; }
449  return fgImage->getImage(image);
450 }
451 
453 {
454  if (fgImageRaw==nullptr) { return false; }
455  return fgImageRaw->getImage(image);
456 }
457 
459  yarp::sig::Sound& sound)
460 {
461  if (fgAv==nullptr) { return false; }
462  return fgAv->getAudioVisual(image,sound);
463 }
464 
466 {
467  if (fgImage) { return fgImage->height(); }
468  if (fgImageRaw) { return fgImageRaw->height(); }
469  return 0;
470 }
471 
473 {
474  if (fgImage) { return fgImage->width(); }
475  if (fgImageRaw) { return fgImageRaw->width(); }
476  return 0;
477 }
478 
480 {
481  return close();
482 }
483 
485 {
486  if (singleThreaded) {
487  return false;
488  }
489  return active;
490 }
491 
492 
494 {
495  if (singleThreaded) {
496  if (active) {
497  thread.step();
498  }
499  return active;
500  }
501  return false;
502 }
503 
LogStream.h
YARP_WARNING_PUSH
#define YARP_WARNING_PUSH
Starts a temporary alteration of the enabled warnings.
Definition: system.h:334
VOCAB_DRSETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRSETCOD
Definition: FrameGrabberInterfaces.h:140
VOCAB_DRSETISO
constexpr yarp::conf::vocab32_t VOCAB_DRSETISO
Definition: FrameGrabberInterfaces.h:137
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::os::Value::asVocab
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
Definition: Value.cpp:231
yarp::os::Bottle::toString
std::string toString() const override
Gives a human-readable textual representation of the bottle.
Definition: Bottle.cpp:214
yarp::os::Property::put
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Definition: Property.cpp:998
VOCAB_DRGETISO
constexpr yarp::conf::vocab32_t VOCAB_DRGETISO
Definition: FrameGrabberInterfaces.h:136
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
VOCAB_DRSETPWR
constexpr yarp::conf::vocab32_t VOCAB_DRSETPWR
Definition: FrameGrabberInterfaces.h:155
yarp::os::PortablePair
Group a pair of objects to be sent and received together.
Definition: PortablePair.h:51
yarp::os::PortablePair::body
BODY body
An object of the second type (BODY).
Definition: PortablePair.h:61
yarp::sig
Signal processing.
Definition: Image.h:25
VOCAB_DRGETCCM
constexpr yarp::conf::vocab32_t VOCAB_DRGETCCM
Definition: FrameGrabberInterfaces.h:138
yarp::os::Searchable::findGroup
virtual Bottle & findGroup(const std::string &key) const =0
Gets a list corresponding to a given keyword.
yCWarning
#define yCWarning(component,...)
Definition: LogComponent.h:146
ServerFrameGrabber::close
bool close() override
Close the DeviceDriver.
Definition: ServerFrameGrabber.cpp:26
VOCAB_FRAMEGRABBER_CONTROL
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
Definition: FrameGrabberInterfaces.h:63
yarp::os::Searchable::toString
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
VOCAB_DRSETBPP
constexpr yarp::conf::vocab32_t VOCAB_DRSETBPP
Definition: FrameGrabberInterfaces.h:157
yarp::os::Property::fromString
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
Definition: Property.cpp:1046
YARP_LOG_COMPONENT
#define YARP_LOG_COMPONENT(name,...)
Definition: LogComponent.h:80
VOCAB_DRSETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRSETTXM
Definition: FrameGrabberInterfaces.h:148
VOCAB_DRGETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETOPM
Definition: FrameGrabberInterfaces.h:147
VOCAB_DRGETVMD
constexpr yarp::conf::vocab32_t VOCAB_DRGETVMD
Definition: FrameGrabberInterfaces.h:131
VOCAB_DRSETVMD
constexpr yarp::conf::vocab32_t VOCAB_DRSETVMD
Definition: FrameGrabberInterfaces.h:132
yarp::dev::IAudioVisualStream::hasAudio
virtual bool hasAudio()=0
ServerFrameGrabber::getAudioVisual
virtual bool getAudioVisual(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image, yarp::sig::Sound &sound) override
Get an image and sound.
Definition: ServerFrameGrabber.cpp:458
VOCAB_DRSETCAP
constexpr yarp::conf::vocab32_t VOCAB_DRSETCAP
Definition: FrameGrabberInterfaces.h:156
ServerFrameGrabber::respond
virtual bool respond(const yarp::os::Bottle &command, yarp::os::Bottle &reply) override
Respond to a message.
Definition: ServerFrameGrabber.cpp:196
yarp::dev::IAudioVisualStream::hasVideo
virtual bool hasVideo()=0
yarp::dev::IAudioVisualStream::hasRawVideo
virtual bool hasRawVideo()
Definition: IAudioVisualStream.h:38
yarp::dev
An interface for the device drivers.
Definition: audioBufferSizeData.cpp:17
VOCAB_DRGETFPM
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPM
Definition: FrameGrabberInterfaces.h:133
yarp::sig::ImageOf< yarp::sig::PixelRgb >
yarp::os::Port
A mini-server for network communication.
Definition: Port.h:50
VOCAB_DRGETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRGETWF7
Definition: FrameGrabberInterfaces.h:144
yarp::os::Value::isString
virtual bool isString() const
Checks if value is a string.
Definition: Value.cpp:159
yarp::os::Type::byName
static Type byName(const char *name)
Definition: Type.cpp:174
yarp::os::Bottle::get
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition: Bottle.cpp:249
ServerFrameGrabber::getImage
bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.
Definition: ServerFrameGrabber.cpp:446
VOCAB_DRGETCOD
constexpr yarp::conf::vocab32_t VOCAB_DRGETCOD
Definition: FrameGrabberInterfaces.h:139
ServerFrameGrabber::height
int height() const override
Return the height of each frame.
Definition: ServerFrameGrabber.cpp:465
VOCAB_DRSETFPS
constexpr yarp::conf::vocab32_t VOCAB_DRSETFPS
Definition: FrameGrabberInterfaces.h:135
yarp::os::Searchable::check
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
VOCAB_DRGETFPS
constexpr yarp::conf::vocab32_t VOCAB_DRGETFPS
Definition: FrameGrabberInterfaces.h:134
yarp::os::Bottle::addInt32
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
Definition: Bottle.cpp:143
ServerFrameGrabber::updateService
bool updateService() override
Give the service the chance to run for a while.
Definition: ServerFrameGrabber.cpp:493
VOCAB_DRSETOPM
constexpr yarp::conf::vocab32_t VOCAB_DRSETOPM
Definition: FrameGrabberInterfaces.h:146
ServerFrameGrabber::startService
bool startService() override
Initiate the service, whatever it is.
Definition: ServerFrameGrabber.cpp:484
ServerFrameGrabber::getDatum
bool getDatum(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Definition: ServerFrameGrabber.cpp:425
VOCAB_DRGETMSK
constexpr yarp::conf::vocab32_t VOCAB_DRGETMSK
Definition: FrameGrabberInterfaces.h:130
VOCAB_DRGETTXM
constexpr yarp::conf::vocab32_t VOCAB_DRGETTXM
Definition: FrameGrabberInterfaces.h:149
LogComponent.h
yCAssert
#define yCAssert(component, x)
Definition: LogComponent.h:172
YARP_WARNING_POP
#define YARP_WARNING_POP
Ends a temporary alteration of the enabled warnings.
Definition: system.h:335
yarp::dev::IAudioVisualStream
Definition: IAudioVisualStream.h:27
yarp::os::Bottle::tail
Bottle tail() const
Get all but the first element of a bottle.
Definition: Bottle.cpp:391
VOCAB_DRGETF7M
constexpr yarp::conf::vocab32_t VOCAB_DRGETF7M
Definition: FrameGrabberInterfaces.h:143
yCError
#define yCError(component,...)
Definition: LogComponent.h:157
VOCAB_DRSETDEF
constexpr yarp::conf::vocab32_t VOCAB_DRSETDEF
Definition: FrameGrabberInterfaces.h:153
VOCAB_RGB_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_RGB_VISUAL_PARAMS
Definition: IVisualParams.h:44
yarp::os::Value::asInt32
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition: Value.cpp:207
yarp::os::PortablePair::head
HEAD head
An object of the first type (HEAD).
Definition: PortablePair.h:56
VOCAB_DRSETBCS
constexpr yarp::conf::vocab32_t VOCAB_DRSETBCS
Definition: FrameGrabberInterfaces.h:152
yarp::os
An interface to the operating system, including Port based communication.
Definition: AbstractCarrier.h:17
ServerFrameGrabber::stopService
bool stopService() override
Shut down the service, whatever it is.
Definition: ServerFrameGrabber.cpp:479
yarp::sig::Sound
Class for storing sounds.
Definition: Sound.h:28
VOCAB_DRGETBPP
constexpr yarp::conf::vocab32_t VOCAB_DRGETBPP
Definition: FrameGrabberInterfaces.h:158
yarp::dev::IFrameGrabberControlsDC1394
Definition: FrameGrabberInterfaces.h:714
VOCAB_DRSETWF7
constexpr yarp::conf::vocab32_t VOCAB_DRSETWF7
Definition: FrameGrabberInterfaces.h:145
yarp::os::Value::toString
std::string toString() const override
Return a standard text representation of the content of the object.
Definition: Value.cpp:359
yarp::os::Value
A single value (typically within a Bottle).
Definition: Value.h:47
ServerFrameGrabber.h
YARP_DISABLE_DEPRECATED_WARNING
#define YARP_DISABLE_DEPRECATED_WARNING
Disable deprecated warnings in the following code.
Definition: system.h:336
yarp::os::Property::unput
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
Definition: Property.cpp:1029
VOCAB_DRSETRST
constexpr yarp::conf::vocab32_t VOCAB_DRSETRST
Definition: FrameGrabberInterfaces.h:154
ServerFrameGrabber::open
bool open(yarp::os::Searchable &config) override
Configure with a set of options.
Definition: ServerFrameGrabber.cpp:40
VOCAB_FRAMEGRABBER_CONTROL_DC1394
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL_DC1394
Definition: FrameGrabberInterfaces.h:64
yarp::os::Property
A class for storing options and configuration information.
Definition: Property.h:37
ServerFrameGrabber::width
int width() const override
Return the width of each frame.
Definition: ServerFrameGrabber.cpp:472