Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 46 additions & 1 deletion clients/deck/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,54 @@
cmake_minimum_required(VERSION 3.24)

project(NovaDeck LANGUAGES CXX)
project(NovaDeck LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

find_package(PkgConfig REQUIRED)
pkg_check_modules(NOVA_DECK_FFMPEG_VAAPI REQUIRED IMPORTED_TARGET
libavcodec
libavutil
libva
libva-drm
)
pkg_check_modules(NOVA_DECK_LINUX_AUDIO REQUIRED IMPORTED_TARGET
libpipewire-0.3
libpulse
)
find_package(Qt6 REQUIRED COMPONENTS Quick)

add_library(nova_deck_core
src/deck_gamepad.cpp
src/deck_layout.cpp
src/polaris_game_fixture.cpp
src/stream/deck_stream_core.cpp
src/stream/deck_stream_media_adapters.cpp
)

set(NOVA_DECK_MOONLIGHT_COMMON_C_DIR
${CMAKE_CURRENT_SOURCE_DIR}/../../app/src/main/jni/moonlight-core/moonlight-common-c
CACHE PATH
"Path to the checked-out moonlight-common-c source tree used by the Deck stream skeleton"
)
if(EXISTS "${NOVA_DECK_MOONLIGHT_COMMON_C_DIR}/src/Limelight.h")
add_subdirectory("${NOVA_DECK_MOONLIGHT_COMMON_C_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/moonlight-common-c")
target_link_libraries(nova_deck_core PUBLIC moonlight-common-c)
else()
message(FATAL_ERROR "moonlight-common-c is required for the Deck stream skeleton; expected ${NOVA_DECK_MOONLIGHT_COMMON_C_DIR}/src/Limelight.h")
endif()

target_include_directories(nova_deck_core
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(nova_deck_core
PUBLIC
PkgConfig::NOVA_DECK_FFMPEG_VAAPI
PkgConfig::NOVA_DECK_LINUX_AUDIO
Qt6::Quick
)
target_compile_definitions(nova_deck_core
PUBLIC
NOVA_DECK_SAMPLE_GAME_FIXTURE=\"${CMAKE_CURRENT_SOURCE_DIR}/fixtures/sample_polaris_game.json\"
Expand All @@ -32,6 +66,17 @@ if(BUILD_TESTING)
NOVA_DECK_MAIN_QML_SOURCE="${CMAKE_CURRENT_SOURCE_DIR}/qml/Main.qml"
)
add_test(NAME nova_deck_controller_library_smoke COMMAND nova_deck_layout_test)
add_executable(nova_deck_stream_core_test
tests/deck_stream_core_test.cpp
)
target_link_libraries(nova_deck_stream_core_test PRIVATE nova_deck_core)
add_test(NAME nova_deck_stream_core_test COMMAND nova_deck_stream_core_test)

add_executable(nova_deck_stream_media_adapters_test
tests/deck_stream_media_adapters_test.cpp
)
target_link_libraries(nova_deck_stream_media_adapters_test PRIVATE nova_deck_core)
add_test(NAME nova_deck_stream_media_adapters_test COMMAND nova_deck_stream_media_adapters_test)
endif()

option(NOVA_DECK_BUILD_QT_SHELL "Build the experimental Qt/QML Steam Deck shell" ON)
Expand Down
8 changes: 7 additions & 1 deletion clients/deck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ Native C++ cannot include Kotlin source directly. For this first slice, fixtures

Keep this boundary explicit until the shared contract is exported through a real native-consumable API. Do not fake Kotlin/C++ interop by including .kt files.

## Stream core skeleton boundary

clients/deck/src/stream/deck_stream_core.h is the first no-network native stream-core seam for the direct moonlight-common-c path. The CMake target links the real app/src/main/jni/moonlight-core/moonlight-common-c tree and the focused CTest includes Limelight.h, initializes STREAM_CONFIGURATION plus listener/video/audio callback structs, and verifies that the Deck lifecycle can move through idle, preparing, starting, active, stopping, stopped, cancelled, and failed states without opening sockets or calling LiStartConnection.

The skeleton intentionally exposes adapter seams for renderer/presentation, audio, input, and session events, but ships only inert Linux-facing interfaces. Next backend work should add a hardware-backed Linux renderer/audio/input spike behind those seams while keeping host pairing, credentials, and real network start disabled until the lifecycle contract is reviewed.

## Fedora or SteamOS dependency notes

The fallback smoke only needs CMake and a C++20 compiler.
The fallback smoke needs CMake, C/C++ compilers, OpenSSL crypto development headers, and the checked-out moonlight-common-c submodule.

For the Qt shell on Fedora, install the Qt 6 development packages if CMake warns that Qt6 Quick or QuickControls2 is missing:

Expand Down
262 changes: 262 additions & 0 deletions clients/deck/spikes/streaming-backend-notes.md

Large diffs are not rendered by default.

870 changes: 870 additions & 0 deletions clients/deck/src/stream/deck_stream_core.cpp

Large diffs are not rendered by default.

442 changes: 442 additions & 0 deletions clients/deck/src/stream/deck_stream_core.h

Large diffs are not rendered by default.

Loading
Loading