Skip to content

Implement camera support for camera.rpl #1517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
aea2b40
Use camera in camera.rpl
capitalistspz Sep 2, 2024
36ae157
Remove unused alarm var
capitalistspz Sep 2, 2024
277c3ef
log with `cemuLog`, use unique_ptr for capture buffer, reduce capture…
capitalistspz Sep 3, 2024
6093ee0
Only convert upon successful capture
capitalistspz Sep 5, 2024
457672a
Rgb2Nv12 coefficient correction
capitalistspz Sep 25, 2024
4d59741
Correct UV pointer offset
capitalistspz Mar 17, 2025
cdd178d
Use alternate repo for openpnp-capture, simplify CMakeLists.txt
capitalistspz Mar 23, 2025
95238d6
Separate camera code
capitalistspz Mar 24, 2025
fd946f6
Formatting
capitalistspz Mar 24, 2025
e9f26a5
Attempt to fix close freeze
capitalistspz Mar 24, 2025
7a53a5c
Merge branch 'main' into camera
capitalistspz Mar 24, 2025
cd3dc74
MSVC stuff
capitalistspz Sep 2, 2024
154eacd
Use an `OSThread` for handling the callback
capitalistspz Mar 24, 2025
062ac50
Correct mistakes in `CameraManager::Open` and `CameraManager::Close`
capitalistspz Mar 24, 2025
0f13272
Make exiting worker thread possible
capitalistspz Mar 24, 2025
2218d55
Set worker thread name
capitalistspz Mar 24, 2025
95f5295
Formatting and style
capitalistspz Mar 24, 2025
791e358
Small
capitalistspz Mar 28, 2025
b9000bd
Add camera settings window and save camera config
capitalistspz Mar 30, 2025
8042e1c
macOS compile error fix attempt
capitalistspz Mar 30, 2025
c74891a
macOS compile error fix attempt #2
capitalistspz Mar 30, 2025
5fe8d8d
macOS compile error fix attempt no. 3
capitalistspz Mar 30, 2025
3a88019
macOS compile error fix attempt no. 4
capitalistspz Mar 30, 2025
9b878f8
add missing `push_back`
capitalistspz Mar 30, 2025
29feae8
Update openpnp branch
capitalistspz Mar 30, 2025
d00222b
Change from singleton `CameraManager` to namespace.
capitalistspz Mar 31, 2025
307af12
Set init var
capitalistspz May 17, 2025
2a65ae6
Update `openpnp-capture` (now statically linkable)
capitalistspz May 17, 2025
07386ff
Merge branch 'main' into camera
capitalistspz May 17, 2025
c93ddb1
Update `openpnp-capture`
capitalistspz May 17, 2025
a1c1232
Add `libjpeg-turbo` as a dependency on Linux because `openpnp-capture…
capitalistspz May 17, 2025
9a5b77c
Update openpnp-capture (function import/export changes)
capitalistspz May 18, 2025
ca29292
Update openpnp-capture (msvc rt changes)
capitalistspz May 18, 2025
2d09952
Update openpnp-capture (msvc rt changes for real)
capitalistspz May 18, 2025
d52800b
Solve some locking issues
capitalistspz May 18, 2025
fd49f0e
Make camera selection persistent and add logging
capitalistspz May 18, 2025
9ee3305
Make output black when no camera is selected
capitalistspz May 19, 2025
45a893c
`camera.rpl` logs to `CameraAPI` logtype
capitalistspz May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: "Install system dependencies"
run: |
sudo apt update -qq
sudo apt install -y clang-15 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libudev-dev nasm ninja-build libbluetooth-dev
sudo apt install -y clang-15 cmake freeglut3-dev libbluetooth-dev libgcrypt20-dev libglm-dev libgtk-3-dev libturbojpeg0-dev libpulse-dev libsecret-1-dev libsystemd-dev libudev-dev nasm ninja-build

- name: "Setup cmake"
uses: jwlawson/actions-setup-cmake@v2
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: "Install system dependencies"
run: |
sudo apt update -qq
sudo apt install -y clang-15 cmake freeglut3-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build appstream libbluetooth-dev
sudo apt install -y appstream clang-15 cmake freeglut3-dev libbluetooth-dev libgcrypt20-dev libglm-dev libgtk-3-dev libturbojpeg0-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build

- name: "Build AppImage"
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
path = dependencies/imgui
url = https://github.com/ocornut/imgui
shallow = true
[submodule "dependencies/openpnp-capture"]
path = dependencies/openpnp-capture
url = https://github.com/capitalistspz/openpnp-capture
branch = dev
[submodule "dependencies/xbyak_aarch64"]
path = dependencies/xbyak_aarch64
url = https://github.com/fujitsu/xbyak_aarch64
6 changes: 3 additions & 3 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ To compile Cemu, a recent enough compiler and STL with C++20 support is required
### Dependencies

#### For Arch and derivatives:
`sudo pacman -S --needed base-devel bluez-libs clang cmake freeglut git glm gtk3 libgcrypt libpulse libsecret linux-headers llvm nasm ninja systemd unzip zip`
`sudo pacman -S --needed base-devel bluez-libs clang cmake freeglut git glm gtk3 libgcrypt libjpeg-turbo libpulse libsecret linux-headers llvm nasm ninja systemd unzip zip`

#### For Debian, Ubuntu and derivatives:
`sudo apt install -y cmake curl clang-15 freeglut3-dev git libbluetooth-dev libgcrypt20-dev libglm-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev libtool nasm ninja-build`
`sudo apt install -y cmake curl clang-15 freeglut3-dev git libbluetooth-dev libgcrypt20-dev libglm-dev libgtk-3-dev libturbojpeg0-dev libpulse-dev libsecret-1-dev libsystemd-dev libtool nasm ninja-build`

You may also need to install `libusb-1.0-0-dev` as a workaround for an issue with the vcpkg hidapi package.

At Step 3 in [Build Cemu using cmake and clang](#build-cemu-using-cmake-and-clang), use the following command instead:
`cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-15 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja`

#### For Fedora and derivatives:
`sudo dnf install bluez-libs-devel clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libsecret-devel libtool libusb1-devel llvm nasm ninja-build perl-core systemd-devel wayland-protocols-devel zlib-devel zlib-static`
`sudo dnf install bluez-libs-devel clang cmake cubeb-devel freeglut-devel git glm-devel gtk3-devel kernel-headers libgcrypt-devel libjpeg-turbo-devel libsecret-devel libtool libusb1-devel llvm nasm ninja-build perl-core systemd-devel wayland-protocols-devel zlib-devel zlib-static`

### Build Cemu

Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ endif()

add_subdirectory("dependencies/ih264d" EXCLUDE_FROM_ALL)

set(BUILD_SHARED_LIBS OFF)
add_subdirectory("dependencies/openpnp-capture" EXCLUDE_FROM_ALL SYSTEM)
set(BUILD_SHARED_LIBS "")

if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)")
add_subdirectory("dependencies/xbyak_aarch64" EXCLUDE_FROM_ALL)
endif()
Expand Down
1 change: 1 addition & 0 deletions dependencies/openpnp-capture
Submodule openpnp-capture added at fd9d6f
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_subdirectory(Cemu)
add_subdirectory(config)
add_subdirectory(input)
add_subdirectory(audio)
add_subdirectory(camera)
add_subdirectory(util)
add_subdirectory(imgui)
add_subdirectory(resource)
Expand Down Expand Up @@ -124,6 +125,7 @@ set_target_properties(CemuBin PROPERTIES
target_link_libraries(CemuBin PRIVATE
CemuAudio
CemuCafe
CemuCamera
CemuCommon
CemuComponents
CemuConfig
Expand Down
1 change: 1 addition & 0 deletions src/Cafe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ endif()

target_link_libraries(CemuCafe PRIVATE
CemuAudio
CemuCamera
CemuCommon
CemuComponents
CemuConfig
Expand Down
Loading
Loading