8c7abbc4e8
release / build runtime Docker image (push) Failing after 1s
release / build source tarball (push) Successful in 5s
build / cmake build (CUDA 12.4, Ubuntu 22.04) (push) Successful in 1m40s
build / ffmpeg filter patch (out-of-tree) (push) Successful in 1m22s
test-u4-runner / u4 runner smoke test (push) Has been cancelled
Protocol bump V2→V3:
+ shm header: cudaIpcEventHandle_t slot_event_handles[CUFRAMES_MAX_RING]
+ producer creates ring_size events (вместо одного global)
+ producer.do_publish records event[slot] (вместо pub->event)
+ consumer opens all slot events при subscribe
+ consumer waits event[slot_idx] specifically (вместо global producer_event)
Backward compat:
- Legacy pub->event сохранён + ipc_event_handle export'ится — v0.2 consumers
видят его и работают по-старому (с post-sync verify hack из 517107d).
- v0.3 consumer auto-detects proto_version >= 3, fallback к legacy если
cudaIpcOpenEventHandle на slot fail (graceful degradation).
Effect (15-sec sample на Phase 7 single-cam, motion):
v0.1 production: dup runs 34.7%, max 14 frames (560ms freeze)
v0.2.1 fix: dup runs 10%, max 6, 0 back-jumps detected
v0.3 per-slot: dup runs 1.9%, max 5, 3 back-jumps (likely encoder
static-content artifacts, not real race)
Размер shm header: 7424 → 8448 bytes (+1024 для slot_event_handles).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
42 lines
1.0 KiB
CMake
42 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(cuframes
|
|
VERSION 0.3.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()
|