| 1275 | } |
| 1276 | |
| 1277 | error_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 | |
| 1312 | error_code cellCameraStartAsync() |
| 1313 | { |
nothing calls this directly
no test coverage detected