LiveKit integration: real camera feed pipeline #1
@@ -92,9 +92,10 @@ endfunction()
|
|||||||
# resolves the sysroot eagerly and the regex runs against a real path.
|
# resolves the sysroot eagerly and the regex runs against a real path.
|
||||||
#
|
#
|
||||||
# So: if the toolchain's own SDK path already matches, use it untouched.
|
# So: if the toolchain's own SDK path already matches, use it untouched.
|
||||||
# Otherwise build a symlink tree under .deps/ whose shape matches the regex
|
# Otherwise build a symlink tree under the build directory whose shape matches
|
||||||
# and which points at exactly the same SDK. Nothing about the compilation
|
# the regex and which points at exactly the same SDK. Nothing about the
|
||||||
# changes -- only the spelling of the path, which is all the check reads.
|
# compilation changes -- only the spelling of the path, which is all the check
|
||||||
|
# reads.
|
||||||
function(_resolve_versioned_macos_sdk out_path)
|
function(_resolve_versioned_macos_sdk out_path)
|
||||||
set(${out_path} "" PARENT_SCOPE)
|
set(${out_path} "" PARENT_SCOPE)
|
||||||
|
|
||||||
@@ -128,7 +129,11 @@ function(_resolve_versioned_macos_sdk out_path)
|
|||||||
endif()
|
endif()
|
||||||
set(_short "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
|
set(_short "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
|
||||||
|
|
||||||
set(_link_dir "${dependencies_dir}/sdk/MacOSX.platform/Developer/SDKs")
|
# Deliberately under the BUILD directory, not .deps/: cmake/macos/
|
||||||
|
# buildspec.cmake runs `xattr -r -d com.apple.quarantine` over the whole
|
||||||
|
# dependency directory, which would follow this symlink into the read-only
|
||||||
|
# system SDK and fail with "Permission denied".
|
||||||
|
set(_link_dir "${CMAKE_BINARY_DIR}/macos-sdk/MacOSX.platform/Developer/SDKs")
|
||||||
set(_link "${_link_dir}/MacOSX${_short}.sdk")
|
set(_link "${_link_dir}/MacOSX${_short}.sdk")
|
||||||
file(MAKE_DIRECTORY "${_link_dir}")
|
file(MAKE_DIRECTORY "${_link_dir}")
|
||||||
if(NOT EXISTS "${_link}")
|
if(NOT EXISTS "${_link}")
|
||||||
|
|||||||
@@ -26,11 +26,18 @@ function(_check_dependencies_macos)
|
|||||||
|
|
||||||
_check_dependencies()
|
_check_dependencies()
|
||||||
|
|
||||||
|
# Clearing the quarantine flag on the downloaded dependencies is a
|
||||||
|
# convenience, not a correctness requirement, so a failure here must not
|
||||||
|
# take the whole configure down with it. Upstream makes it fatal.
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}"
|
COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}"
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
COMMAND_ERROR_IS_FATAL ANY
|
OUTPUT_QUIET
|
||||||
|
ERROR_QUIET
|
||||||
)
|
)
|
||||||
|
if(NOT result EQUAL 0)
|
||||||
|
message(STATUS "Could not clear the quarantine attribute under ${dependencies_dir} (continuing)")
|
||||||
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_FRAMEWORK_PATH "${dependencies_dir}/Frameworks")
|
list(APPEND CMAKE_FRAMEWORK_PATH "${dependencies_dir}/Frameworks")
|
||||||
set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} PARENT_SCOPE)
|
set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} PARENT_SCOPE)
|
||||||
|
|||||||
@@ -377,8 +377,13 @@ void *sourceCreate(obs_data_t *settings, obs_source_t *source)
|
|||||||
// A camera that stopped publishing must not leave its last frame on
|
// A camera that stopped publishing must not leave its last frame on
|
||||||
// screen -- that is precisely the stale-media failure this plugin
|
// screen -- that is precisely the stale-media failure this plugin
|
||||||
// exists to avoid. A null frame clears the source.
|
// exists to avoid. A null frame clears the source.
|
||||||
if (state != SessionState::Connected)
|
if (state != SessionState::Connected) {
|
||||||
obs_source_output_video(self->source, nullptr);
|
obs_source_output_video(self->source, nullptr);
|
||||||
|
// Forget the last geometry so the next stream logs its first
|
||||||
|
// frame again; otherwise a reconnect at the same resolution is
|
||||||
|
// silent, and the log stops answering "did video come back".
|
||||||
|
self->last_geometry.store(0);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user