[PR #3952] Libraries: libSceCamera implementation #3820

Open
opened 2026-02-27 22:05:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3952
Author: @kalaposfos13
Created: 1/23/2026
Status: 🔄 Open

Base: mainHead: camera


📝 Commits (10+)

  • c6cf33c Add OpenCV module (only system package for now)
  • ced6ed7 get camera id from config
  • 063d6fe issue of skill
  • eeea65d camera setup
  • 4cafda6 my homebrew kinda works!!4!!négy!!
  • 499ba22 fix format
  • aed35c9 force target dimensions
  • ee86671 Add OpenCV as a submodule
  • 4b95179 idiotic bullshit stupid ass spaghetti code library packaging hell
  • 197b4ab me writing platform specific backend implementations for all 4 platforms in under 2 minutes be like:

📊 Changes

5 files changed (+262 additions, -8 deletions)

View changed files

📝 src/common/config.cpp (+11 -0)
📝 src/common/config.h (+2 -0)
📝 src/core/libraries/camera/camera.cpp (+129 -8)
📝 src/core/libraries/camera/camera.h (+117 -0)
📝 src/sdl_window.cpp (+3 -0)

📄 Description

This PR implements libSceCamera using SDL3's SDL_camera API. Currently WIP, but so far, all the core code is hooked up, and everything that my test homebrew is using is implemented in enough detail for a correct image to be displayed. Actual games using the camera will likely not work just yet, and ironically enough, the PR doesn't work correctly with the actual PS4 Camera either, as the frame data from it has both eyes submitted in one buffer, which I'll need to separate into their own buffers manually. That is not to say it won't display anything, the resulting image will just be very distorted.

To get started, hook up a webcam, capture card, or anything else that can be described as a digital video input device, head to config.toml, and in the [Input] section, set the newly added cameraId setting to the ID of your chosen input. This is a list of indexes starting from zero, so if you only have one device, set this to 0.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3952 **Author:** [@kalaposfos13](https://github.com/kalaposfos13) **Created:** 1/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `camera` --- ### 📝 Commits (10+) - [`c6cf33c`](https://github.com/shadps4-emu/shadPS4/commit/c6cf33c2955083f5b4137b0a0769bc56607fa57d) Add OpenCV module (only system package for now) - [`ced6ed7`](https://github.com/shadps4-emu/shadPS4/commit/ced6ed76e97cbcc77f0328bc8653becd86e9cd2c) get camera id from config - [`063d6fe`](https://github.com/shadps4-emu/shadPS4/commit/063d6fe184f163fa357bb123952937fc5a2ee07b) issue of skill - [`eeea65d`](https://github.com/shadps4-emu/shadPS4/commit/eeea65d9e74307867c191d644f186b4cad5946e6) camera setup - [`4cafda6`](https://github.com/shadps4-emu/shadPS4/commit/4cafda62f56df53360363e8e939bd84597975731) my homebrew kinda works!!4!!négy!! - [`499ba22`](https://github.com/shadps4-emu/shadPS4/commit/499ba22a6c4b024c74c7185ac00139e26277219c) fix format - [`aed35c9`](https://github.com/shadps4-emu/shadPS4/commit/aed35c9db57f518f0a5d8add114c60803b9f2122) force target dimensions - [`ee86671`](https://github.com/shadps4-emu/shadPS4/commit/ee86671b28f168e02073a649cc8bb86eb5bbca97) Add OpenCV as a submodule - [`4b95179`](https://github.com/shadps4-emu/shadPS4/commit/4b9517903ba0c21ca384f1389bcfc7fda9470e61) idiotic bullshit stupid ass spaghetti code library packaging hell - [`197b4ab`](https://github.com/shadps4-emu/shadPS4/commit/197b4abb625b730c0a05dcfc27ac16e17835f30d) me writing platform specific backend implementations for all 4 platforms in under 2 minutes be like: ### 📊 Changes **5 files changed** (+262 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/common/config.cpp` (+11 -0) 📝 `src/common/config.h` (+2 -0) 📝 `src/core/libraries/camera/camera.cpp` (+129 -8) 📝 `src/core/libraries/camera/camera.h` (+117 -0) 📝 `src/sdl_window.cpp` (+3 -0) </details> ### 📄 Description This PR implements libSceCamera using SDL3's SDL_camera API. Currently WIP, but so far, all the core code is hooked up, and everything that my [test homebrew](https://github.com/kalaposfos13/ps4-homebrew-base/tree/camera) is using is implemented in enough detail for a correct image to be displayed. Actual games using the camera will likely not work just yet, and ironically enough, the PR doesn't work correctly with the actual PS4 Camera either, as the frame data from it has both eyes submitted in one buffer, which I'll need to separate into their own buffers manually. That is not to say it won't display anything, the resulting image will just be very distorted. To get started, hook up a webcam, capture card, or anything else that can be described as a digital video input device, head to `config.toml`, and in the `[Input]` section, set the newly added `cameraId` setting to the ID of your chosen input. This is a list of indexes starting from zero, so if you only have one device, set this to 0. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3820
No description provided.