| 1452 | } |
| 1453 | |
| 1454 | error_code cellCameraStop(s32 dev_num) |
| 1455 | { |
| 1456 | cellCamera.notice("cellCameraStop(dev_num=%d)", dev_num); |
| 1457 | |
| 1458 | if (error_code error = check_init_and_open(dev_num)) |
| 1459 | { |
| 1460 | return error; |
| 1461 | } |
| 1462 | |
| 1463 | if (error_code error = check_resolution_ex(dev_num)) |
| 1464 | { |
| 1465 | return error; |
| 1466 | } |
| 1467 | |
| 1468 | auto& g_camera = g_fxo->get<camera_thread>(); |
| 1469 | std::lock_guard lock(g_camera.mutex); |
| 1470 | |
| 1471 | if (!g_camera.is_attached) |
| 1472 | { |
| 1473 | return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND; |
| 1474 | } |
| 1475 | |
| 1476 | if (!g_camera.is_streaming) |
| 1477 | { |
| 1478 | return CELL_CAMERA_ERROR_NOT_STARTED; |
| 1479 | } |
| 1480 | |
| 1481 | g_camera.stop_camera(); |
| 1482 | g_camera.is_streaming = false; |
| 1483 | |
| 1484 | return CELL_OK; |
| 1485 | } |
| 1486 | |
| 1487 | error_code cellCameraStopAsync() |
| 1488 | { |
nothing calls this directly
no test coverage detected