a21812d3f6
cuframes-rtsp-source — standalone bridge между RTSP/file и cuframes IPC. Декодирует на CUDA (nvdec), копирует D2D в pre-allocated pool (EXTERNAL ownership), публикует через cuframes. --realtime для pacing файлового ввода, --loop для зацикливания. Альтернатива FFmpeg-фильтра до v0.2 (filter требует patch FFmpeg, конфликтует с Frigate's bundled build). examples/sub_count — reference subscriber на raw C API: counts frames, trackit gaps, выходит clean при disconnect/timeout/SIGINT. test_stress (4 subscribers × 2000 frames @ 120fps) — PASS на RTX 5090. 0 torn frames у всех consumers (включая 2 slow с 5ms sleep). Smoke-проверено: testsrc 25fps → cuframes-rtsp-source → cuframes IPC → sub_count (отдельный процесс) → 200/200 frames, 0 gaps, avg_fps=25.2.
42 lines
1.0 KiB
CMake
42 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(cuframes
|
|
VERSION 0.1.0
|
|
DESCRIPTION "Zero-copy frame sharing via CUDA IPC"
|
|
LANGUAGES C CXX CUDA
|
|
)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
endif()
|
|
|
|
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
|
|
set(CMAKE_CUDA_ARCHITECTURES "75;86;89;90;120")
|
|
endif()
|
|
|
|
option(BUILD_TESTING "Build tests" ON)
|
|
option(BUILD_EXAMPLES "Build examples" ON)
|
|
option(BUILD_FFMPEG_FILTER "Build FFmpeg vf_cuda_ipc_export filter (out-of-tree, требует patch FFmpeg)" OFF)
|
|
option(BUILD_PYTHON_BINDINGS "Build Python bindings (Phase 3+)" OFF)
|
|
option(BUILD_TOOLS "Build standalone tools (cuframes-rtsp-source)" ON)
|
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(libcuframes)
|
|
|
|
if(BUILD_EXAMPLES)
|
|
add_subdirectory(examples)
|
|
endif()
|
|
|
|
if(BUILD_FFMPEG_FILTER)
|
|
add_subdirectory(filter)
|
|
endif()
|
|
|
|
if(BUILD_TOOLS)
|
|
add_subdirectory(tools/cuframes-rtsp-source)
|
|
endif()
|