wrapper: build libk4arecord_v2.so — the library the recorder actually dlopens
The recorder does not load the stock libk4a/libk4arecord. It dlopens a single custom libk4arecord_v2.so: the wrapper's MKV-writing sources linked to a pure-data shim (k4a_shim.cpp) instead of libk4a, so recording has no OrbbecSDK dependency. That target is FTF's own (wrapper/recordv2/), absent from the stock wrapper the Orin carried — so ship it and inject+build it, the same pattern as the recorder in the SDK examples tree. Idempotent; only added when missing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
526d654f68
commit
cabca69c4d
3 files changed
+482
-23
No files matched your search
@@ -0,0 +1,43 @@
|
||||
# Copyright (c) French Touch Factory. All Rights Reserved.
|
||||
#
|
||||
# libk4arecord_v2 : ecriture MKV compatible K4A sans aucune dependance OrbbecSDK.
|
||||
#
|
||||
# Reprend telles quelles les sources d'ecriture du wrapper (record.cpp +
|
||||
# matroska_write.cpp + iocallback.cpp) mais les lie a k4a_shim.cpp au lieu de
|
||||
# libk4a.so, qui implemente k4a_image_t / k4a_capture_t au-dessus d'OrbbecSDK
|
||||
# v1.10.18. playback.cpp est volontairement exclu : c'est lui qui appelle
|
||||
# ob_create_context(), et le recorder n'a pas besoin de relecture.
|
||||
|
||||
set(RECORD_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../record)
|
||||
|
||||
add_library(k4arecord_v2 SHARED
|
||||
${RECORD_SRC_DIR}/sdk/record.cpp
|
||||
${RECORD_SRC_DIR}/sdk/dll_main.c
|
||||
${RECORD_SRC_DIR}/internal/iocallback.cpp
|
||||
${RECORD_SRC_DIR}/internal/matroska_write.cpp
|
||||
k4a_shim.cpp
|
||||
)
|
||||
|
||||
# k4arecord_EXPORTS : exporte les k4a_record_* (macro de k4arecord_export.h).
|
||||
# k4a_EXPORTS : idem pour les k4a_image_* / k4a_capture_* du shim, dont la
|
||||
# visibilite est portee par K4A_EXPORT dans k4a.h.
|
||||
target_compile_definitions(k4arecord_v2 PRIVATE k4arecord_EXPORTS k4a_EXPORTS)
|
||||
|
||||
target_include_directories(k4arecord_v2 PRIVATE
|
||||
${K4A_INCLUDE_DIR}
|
||||
${K4A_PRIV_INCLUDE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
# k4arecord/k4arecord_export.h, genere par la cible k4arecord
|
||||
${CMAKE_BINARY_DIR}/src/orbbec/record/sdk/include
|
||||
)
|
||||
|
||||
# Aucun k4a::k4a, aucun OrbbecSDK : c'est tout l'objet de cette cible.
|
||||
target_link_libraries(k4arecord_v2 PRIVATE
|
||||
k4ainternal::logging
|
||||
ebml::ebml
|
||||
matroska::matroska
|
||||
)
|
||||
|
||||
set_target_properties(k4arecord_v2 PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
)
|
||||
Reference in new issue
Block a user