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

Function cellCameraStart

ps3fw/cellCamera.cpp:1277–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1275}
1276
1277error_code cellCameraStart(s32 dev_num)
1278{
1279 cellCamera.notice("cellCameraStart(dev_num=%d)", dev_num);
1280
1281 if (error_code error = check_init_and_open(dev_num))
1282 {
1283 return error;
1284 }
1285
1286 if (error_code error = check_resolution_ex(dev_num))
1287 {
1288 return error;
1289 }
1290
1291 auto& g_camera = g_fxo->get<camera_thread>();
1292 std::lock_guard lock(g_camera.mutex);
1293
1294 if (!g_camera.is_attached)
1295 {
1296 return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND;
1297 }
1298
1299 if (!g_camera.start_camera())
1300 {
1301 return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND;
1302 }
1303
1304 // TODO: Yet another CELL_CAMERA_ERROR_TIMEOUT
1305
1306 g_camera.start_timestamp_us = get_guest_system_time();
1307 g_camera.is_streaming = true;
1308
1309 return CELL_OK;
1310}
1311
1312error_code cellCameraStartAsync()
1313{

Callers

nothing calls this directly

Calls 4

check_init_and_openFunction · 0.85
check_resolution_exFunction · 0.85
get_guest_system_timeFunction · 0.85
start_cameraMethod · 0.45

Tested by

no test coverage detected