MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / cellCameraStop

Function cellCameraStop

ps3fw/cellCamera.cpp:1454–1485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452}
1453
1454error_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
1487error_code cellCameraStopAsync()
1488{

Callers

nothing calls this directly

Calls 3

check_init_and_openFunction · 0.85
check_resolution_exFunction · 0.85
stop_cameraMethod · 0.45

Tested by

no test coverage detected