[client] transport: introduce pluggable frame transports
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

Move shared-memory ownership, LGMP session handling, queue access, and
DMA setup behind a transport interface. The LGMP backend preserves the
existing zero-copy frame and DMA paths while owning its lgmp:* options.

Expose the initialized EGL context through a versioned renderer interop
record for future accelerated decode backends. Add an LGMP-independent,
deterministic test transport for graphics-pipeline validation.
This commit is contained in:
Geoffrey McRae
2026-07-20 05:09:43 +00:00
parent d4b3506e6c
commit 36b33033a1
22 changed files with 2138 additions and 819 deletions

View File

@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.10)
project(transports LANGUAGES C)
set(TRANSPORT_H "${CMAKE_BINARY_DIR}/include/dynamic/transports.h")
set(TRANSPORT_C "${CMAKE_BINARY_DIR}/src/transports.c")
file(WRITE ${TRANSPORT_H} "#include \"interface/transport.h\"\n\n")
file(APPEND ${TRANSPORT_H} "extern const LG_TransportOps * LG_Transports[];\n\n")
file(WRITE ${TRANSPORT_C} "#include \"interface/transport.h\"\n\n")
file(APPEND ${TRANSPORT_C} "#include <stddef.h>\n\n")
set(TRANSPORTS "_")
set(TRANSPORTS_LINK "_")
function(add_transport name)
set(TRANSPORTS "${TRANSPORTS};${name}" PARENT_SCOPE)
set(TRANSPORTS_LINK "${TRANSPORTS_LINK};transport_${name}" PARENT_SCOPE)
add_subdirectory(${name})
endfunction()
# Add/remove transports here!
add_transport(LGMP)
if(ENABLE_TEST_TRANSPORT)
add_transport(Test)
endif()
list(REMOVE_AT TRANSPORTS 0)
list(REMOVE_AT TRANSPORTS_LINK 0)
list(LENGTH TRANSPORTS TRANSPORT_COUNT)
file(APPEND ${TRANSPORT_H} "#define LG_TRANSPORT_COUNT ${TRANSPORT_COUNT}\n")
foreach(transport ${TRANSPORTS})
file(APPEND ${TRANSPORT_C} "extern const LG_TransportOps LGT_${transport};\n")
endforeach()
file(APPEND ${TRANSPORT_C} "\nconst LG_TransportOps * LG_Transports[] =\n{\n")
foreach(transport ${TRANSPORTS})
file(APPEND ${TRANSPORT_C} " &LGT_${transport},\n")
endforeach()
file(APPEND ${TRANSPORT_C} " NULL\n};")
add_library(transports STATIC ${TRANSPORT_C})
target_link_libraries(transports ${TRANSPORTS_LINK})