Revision a5c38673 src/gst/engine/dc1394.cpp
| b/src/gst/engine/dc1394.cpp | ||
|---|---|---|
| 417 | 417 |
} |
| 418 | 418 |
|
| 419 | 419 |
|
| 420 |
int DC1394::GUIDToCameraNumber(unsigned long long GUID)
|
|
| 420 |
bool DC1394::areCamerasConnected()
|
|
| 421 | 421 |
{
|
| 422 |
int result = -1;
|
|
| 422 |
bool result;
|
|
| 423 | 423 |
dc1394error_t camerr; |
| 424 | 424 |
|
| 425 | 425 |
dc1394_t * dc1394 = 0; |
| ... | ... | |
| 432 | 432 |
|
| 433 | 433 |
if (camerr != DC1394_SUCCESS or cameras == 0) |
| 434 | 434 |
{
|
| 435 |
LOG_ERROR("Can't find cameras error : " << camerr);
|
|
| 436 | 435 |
cleanup(dc1394, camera, cameras); |
| 436 |
THROW_CRITICAL("Can't find cameras error : " << camerr);
|
|
| 437 |
} |
|
| 438 |
result = cameras->num == 0; |
|
| 439 |
|
|
| 440 |
cleanup(dc1394, camera, cameras); |
|
| 441 |
return result; |
|
| 442 |
} |
|
| 443 |
|
|
| 444 |
|
|
| 445 |
int DC1394::GUIDToCameraNumber(unsigned long long GUID) |
|
| 446 |
{
|
|
| 447 |
if (not areCamerasConnected()) |
|
| 448 |
{
|
|
| 449 |
LOG_INFO("There are no dc1394 cameras connected");
|
|
| 437 | 450 |
return -1; |
| 438 | 451 |
} |
| 439 | 452 |
|
| 440 |
if (cameras->num == 0) |
|
| 453 |
int result = -1; |
|
| 454 |
dc1394error_t camerr; |
|
| 455 |
|
|
| 456 |
dc1394_t * dc1394 = 0; |
|
| 457 |
dc1394camera_list_t *cameras = 0; |
|
| 458 |
dc1394camera_t *camera = 0; |
|
| 459 |
|
|
| 460 |
dc1394 = dc1394_new(); |
|
| 461 |
|
|
| 462 |
camerr = dc1394_camera_enumerate(dc1394, &cameras); |
|
| 463 |
|
|
| 464 |
if (camerr != DC1394_SUCCESS or cameras == 0) |
|
| 441 | 465 |
{
|
| 442 |
LOG_INFO("There were no dc1394 cameras");
|
|
| 466 |
LOG_ERROR("Can't find cameras error : " << camerr);
|
|
| 443 | 467 |
cleanup(dc1394, camera, cameras); |
| 444 | 468 |
return -1; |
| 445 | 469 |
} |
Also available in: Unified diff