diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b9c053..489ce6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,9 +10,40 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") set(TEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests") -set(SLANG_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/slang-2026.8-windows-x86_64" CACHE PATH "Path to a Slang binary release containing bin/slangc.exe") -set(MSDF_ATLAS_GEN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/msdf-atlas-gen" CACHE PATH "Path to msdf-atlas-gen binary release") -set(NDI_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/NDI 6 SDK" CACHE PATH "Path to the NDI SDK") + +set(LEGACY_THIRD_PARTY_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty") +set(DEFAULT_THIRD_PARTY_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/video-io-3rdParty") +if(NOT EXISTS "${DEFAULT_THIRD_PARTY_ROOT}") + set(DEFAULT_THIRD_PARTY_ROOT "${LEGACY_THIRD_PARTY_ROOT}") +endif() + +set(THIRD_PARTY_ROOT "${DEFAULT_THIRD_PARTY_ROOT}" CACHE PATH "Path to the third-party SDK bundle") +if(EXISTS "${DEFAULT_THIRD_PARTY_ROOT}" AND THIRD_PARTY_ROOT STREQUAL LEGACY_THIRD_PARTY_ROOT AND NOT EXISTS "${THIRD_PARTY_ROOT}") + set(THIRD_PARTY_ROOT "${DEFAULT_THIRD_PARTY_ROOT}" CACHE PATH "Path to the third-party SDK bundle" FORCE) +endif() +set(SLANG_ROOT "${THIRD_PARTY_ROOT}/slang-2026.8-windows-x86_64" CACHE PATH "Path to a Slang binary release containing bin/slangc.exe") +set(MSDF_ATLAS_GEN_ROOT "${THIRD_PARTY_ROOT}/msdf-atlas-gen" CACHE PATH "Path to msdf-atlas-gen binary release") +set(NDI_SDK_ROOT "${THIRD_PARTY_ROOT}/NDI 6 SDK" CACHE PATH "Path to the NDI SDK") +set(DECKLINK_SDK_ROOT "${THIRD_PARTY_ROOT}/Blackmagic DeckLink SDK 16.0" CACHE PATH "Path to the Blackmagic DeckLink SDK") + +set(LEGACY_SLANG_ROOT "${LEGACY_THIRD_PARTY_ROOT}/slang-2026.8-windows-x86_64") +set(LEGACY_MSDF_ATLAS_GEN_ROOT "${LEGACY_THIRD_PARTY_ROOT}/msdf-atlas-gen") +set(LEGACY_NDI_SDK_ROOT "${LEGACY_THIRD_PARTY_ROOT}/NDI 6 SDK") +set(LEGACY_DECKLINK_SDK_ROOT "${LEGACY_THIRD_PARTY_ROOT}/Blackmagic DeckLink SDK 16.0") +if(EXISTS "${DEFAULT_THIRD_PARTY_ROOT}") + if(SLANG_ROOT STREQUAL LEGACY_SLANG_ROOT AND NOT EXISTS "${SLANG_ROOT}") + set(SLANG_ROOT "${THIRD_PARTY_ROOT}/slang-2026.8-windows-x86_64" CACHE PATH "Path to a Slang binary release containing bin/slangc.exe" FORCE) + endif() + if(MSDF_ATLAS_GEN_ROOT STREQUAL LEGACY_MSDF_ATLAS_GEN_ROOT AND NOT EXISTS "${MSDF_ATLAS_GEN_ROOT}") + set(MSDF_ATLAS_GEN_ROOT "${THIRD_PARTY_ROOT}/msdf-atlas-gen" CACHE PATH "Path to msdf-atlas-gen binary release" FORCE) + endif() + if(NDI_SDK_ROOT STREQUAL LEGACY_NDI_SDK_ROOT AND NOT EXISTS "${NDI_SDK_ROOT}") + set(NDI_SDK_ROOT "${THIRD_PARTY_ROOT}/NDI 6 SDK" CACHE PATH "Path to the NDI SDK" FORCE) + endif() + if(DECKLINK_SDK_ROOT STREQUAL LEGACY_DECKLINK_SDK_ROOT AND NOT EXISTS "${DECKLINK_SDK_ROOT}") + set(DECKLINK_SDK_ROOT "${THIRD_PARTY_ROOT}/Blackmagic DeckLink SDK 16.0" CACHE PATH "Path to the Blackmagic DeckLink SDK" FORCE) + endif() +endif() set(VIDEO_SHADER_INCLUDE_DIRS "${SRC_DIR}" @@ -136,6 +167,8 @@ set(NDI_RUNTIME_DLL "${NDI_SDK_ROOT}/Bin/x64/Processing.NDI.Lib.x64.dll") set(NDI_IMPORT_LIB "${NDI_SDK_ROOT}/Lib/x64/Processing.NDI.Lib.x64.lib") set(NDI_LICENSE_FILE "${NDI_SDK_ROOT}/NDI SDK License Agreement.pdf") set(NDI_NOTICES_FILE "${NDI_SDK_ROOT}/Bin/x64/Processing.NDI.Lib.Licenses.txt") +set(DECKLINK_SDK_IDL_FILE "${DECKLINK_SDK_ROOT}/Win/include/DeckLinkAPI.idl") +set(DECKLINK_SDK_LICENSE_FILE "${DECKLINK_SDK_ROOT}/End User License Agreement.pdf") set(RENDER_CADENCE_APP_REQUIRED_FILES "${SRC_DIR}/RenderCadenceCompositor.cpp" @@ -144,6 +177,11 @@ set(RENDER_CADENCE_APP_REQUIRED_FILES ) video_shader_files_exist(RENDER_CADENCE_APP_MISSING_FILES ${RENDER_CADENCE_APP_REQUIRED_FILES}) +if(EXISTS "${DECKLINK_SDK_IDL_FILE}") + message(STATUS "Blackmagic DeckLink SDK found: ${DECKLINK_SDK_ROOT}") +else() + message(STATUS "Blackmagic DeckLink SDK not found at ${DECKLINK_SDK_ROOT}; using checked-in DeckLink API shim files only") +endif() if(RENDER_CADENCE_APP_MISSING_FILES) message(STATUS "RenderCadenceCompositor target skipped; required app entry or external DeckLink SDK shim files are missing:") foreach(missing_file IN LISTS RENDER_CADENCE_APP_MISSING_FILES) @@ -262,6 +300,15 @@ else() message(STATUS "NDI runtime notices file not found: ${NDI_NOTICES_FILE}") endif() +if(EXISTS "${DECKLINK_SDK_LICENSE_FILE}") + install(FILES "${DECKLINK_SDK_LICENSE_FILE}" + DESTINATION "third_party_notices" + RENAME "BLACKMAGIC_DECKLINK_SDK_EULA.pdf" + ) +else() + message(STATUS "Blackmagic DeckLink SDK license file not found: ${DECKLINK_SDK_LICENSE_FILE}") +endif() + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/shaders/SHADER_CONTRACT.md" DESTINATION "." ) diff --git a/README.md b/README.md index 9549ce6..41fb040 100644 --- a/README.md +++ b/README.md @@ -35,32 +35,69 @@ Native app internals are grouped by boundary: - CMake 3.24 or newer. - Node.js and npm for the control UI. - Blackmagic Desktop Video drivers and a DeckLink device for the current production video I/O backend. -- NDI 6 SDK for NDI input/output builds. -- Slang binary release with `slangc.exe`, `slang-compiler.dll`, `slang-glslang.dll`, and `LICENSE`. -- `msdf-atlas-gen` Windows binary release with `msdf-atlas-gen.exe`, `LICENSE.txt`, and any adjacent runtime DLLs for font atlas generation. +- Blackmagic DeckLink SDK 16.0 for DeckLink SDK reference files and redistribution notices. +- NDI 6 SDK for NDI input/output builds. CMake expects `Include/`, `Lib/x64/Processing.NDI.Lib.x64.lib`, `Bin/x64/Processing.NDI.Lib.x64.dll`, and the NDI license/notice files. +- Slang 2026.8 Windows x86_64 binary release with `bin/slangc.exe`, `bin/slang-compiler.dll`, `bin/slang-glslang.dll`, and `LICENSE`. +- `msdf-atlas-gen` Windows binary release with `msdf-atlas-gen.exe`, `LICENSE.txt`, `README.md`, and any adjacent runtime DLLs for font atlas generation. -Default expected Slang path: +### Third-party SDK bundle + +Org members can initialize the private SDK bundle submodule: + +```powershell +git submodule update --init --recursive +``` + +When present, CMake defaults to this private bundle: + +```text +video-io-3rdParty/ + Blackmagic DeckLink SDK 16.0/ + NDI 6 SDK/ + slang-2026.8-windows-x86_64/ + msdf-atlas-gen/ +``` + +The parent repository is public, but this bundle is private. External builders need to obtain the SDKs from their vendors and place them in an ignored local `3rdParty/` folder with the same layout, or pass explicit CMake paths. + +Fallback local Slang path: ```text 3rdParty/slang-2026.8-windows-x86_64 ``` -Default expected `msdf-atlas-gen` path: +Fallback local `msdf-atlas-gen` path: ```text 3rdParty/msdf-atlas-gen ``` -Default expected NDI SDK path: +Fallback local NDI SDK path: ```text 3rdParty/NDI 6 SDK ``` -Override example: +Fallback local Blackmagic DeckLink SDK path: + +```text +3rdParty/Blackmagic DeckLink SDK 16.0 +``` + +Single-root override example: ```powershell -cmake --preset vs2022-x64-debug -DSLANG_ROOT="D:/SDKs/slang-2026.8-windows-x86_64" +cmake --preset vs2022-x64-debug -DTHIRD_PARTY_ROOT="D:/SDKs/video-io-3rdParty" +``` + +Individual override example: + +```powershell +cmake --preset vs2022-x64-debug ` + -DSLANG_ROOT="D:/SDKs/slang-2026.8-windows-x86_64" ` + -DMSDF_ATLAS_GEN_ROOT="D:/SDKs/msdf-atlas-gen" ` + -DNDI_SDK_ROOT="D:/SDKs/NDI 6 SDK" ` + -DDECKLINK_SDK_ROOT="D:/SDKs/Blackmagic DeckLink SDK 16.0" ``` ## Build @@ -289,8 +326,11 @@ The Gitea workflow expects two act runners: The Windows jobs validate native third-party dependencies before configuring CMake. Because `3rdParty/` is ignored, configure this path on the runner or in a Gitea repository variable: +- `THIRD_PARTY_ROOT`: path to a bundle containing the expected SDK folder layout. - `SLANG_ROOT`: path to the Slang binary release folder containing `bin/slangc.exe`. - `MSDF_ATLAS_GEN_ROOT`: path to the `msdf-atlas-gen` binary release folder containing `msdf-atlas-gen.exe`. +- `NDI_SDK_ROOT`: path to the NDI SDK folder containing `Include/`, `Lib/x64/`, and `Bin/x64/`. +- `DECKLINK_SDK_ROOT`: path to the Blackmagic DeckLink SDK folder containing `Win/include/DeckLinkAPI.idl`. The Windows runner also needs the Visual Studio ATL component installed. In Visual Studio Build Tools 2022, add `C++ ATL for latest v143 build tools (x86 & x64)`, component ID `Microsoft.VisualStudio.Component.VC.ATL`. @@ -299,9 +339,11 @@ Example runner paths: ```text D:\SDKs\slang-2026.8-windows-x86_64 D:\SDKs\msdf-atlas-gen +D:\SDKs\NDI 6 SDK +D:\SDKs\Blackmagic DeckLink SDK 16.0 ``` -If `SLANG_ROOT` or `MSDF_ATLAS_GEN_ROOT` is not set, the workflow falls back to the repo-local defaults under `3rdParty/`. +If these variables are not set, CMake first looks under the private `video-io-3rdParty/` submodule and then falls back to repo-local defaults under ignored `3rdParty/`. ## Still Todo @@ -380,4 +422,4 @@ Add a section to shaders/SHADER_CONTRACT.md with: manifest example custom element lifecycle available properties/functions -rule: all controls must map to declared parameters \ No newline at end of file +rule: all controls must map to declared parameters