Skip to content

Commit ac5df3c

Browse files
dep on libjpeg
1 parent ae3c77e commit ac5df3c

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ jobs:
260260
libabsl-dev \
261261
libcurl4-openssl-dev \
262262
libwayland-dev libdecor-0-dev \
263-
libunwind-dev \
263+
libunwind-dev libjpeg-dev \
264264
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
265265
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
266266
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
@@ -556,7 +556,7 @@ jobs:
556556
libabsl-dev \
557557
libcurl4-openssl-dev \
558558
libwayland-dev libdecor-0-dev \
559-
libunwind-dev \
559+
libunwind-dev libjpeg-dev \
560560
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
561561
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
562562
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \

‎build.h.in‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@
66

77
// Version injected by CMake (CI should set it). Defaults to 0.0.0 for dev builds.
88
#define LIVEKIT_BUILD_VERSION "@LIVEKIT_VERSION@"
9-
#define LIVEKIT_BUILD_FLAVOR "cpp"
10-
#define LIVEKIT_CAPTURE_ENABLED @LIVEKIT_CAPTURE_ENABLED@
9+
#define LIVEKIT_BUILD_FLAVOR "cpp"
10+
11+
namespace livekit {
12+
13+
/// @brief Whether the Rust FFI was built with capture-source support.
14+
inline constexpr bool kCaptureEnabled = "@LIVEKIT_CAPTURE_ENABLED@"[0] == '1';
15+
16+
} // namespace livekit
1117

1218
#ifdef DEBUG
13-
#define LIVEKIT_BUILD_SUFFIX "-debug"
19+
#define LIVEKIT_BUILD_SUFFIX "-debug"
1420
#else
15-
#define LIVEKIT_BUILD_SUFFIX "-release"
21+
#define LIVEKIT_BUILD_SUFFIX "-release"
1622
#endif
1723

1824
// Follow params are auto generated by CMakeLists.txt
19-
#define LIVEKIT_BUILD_DATE "@BUILD_DATE@"
25+
#define LIVEKIT_BUILD_DATE "@BUILD_DATE@"
2026
#define LIVEKIT_BUILD_COMMIT "@GIT_COMMIT@"
2127

2228
#define LIVEKIT_BUILD_VERSION_FULL LIVEKIT_BUILD_VERSION LIVEKIT_BUILD_SUFFIX

‎client-sdk-rust‎

‎src/tests/integration/test_capture_source.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ constexpr std::uint32_t kCaptureFramerateFps = 30;
5151
/// Skips the calling test when the FFI library was built without the capture
5252
/// feature. A feature-less FFI reports only a generic invalid handle, so this
5353
/// has to be decided at compile time rather than sniffed from an error string.
54-
#if LIVEKIT_CAPTURE_ENABLED
55-
#define SKIP_WITHOUT_CAPTURE_FEATURE() ((void)0)
56-
#else
57-
#define SKIP_WITHOUT_CAPTURE_FEATURE() \
58-
GTEST_SKIP() << "livekit-ffi built without the 'capture' feature; configure with -DLIVEKIT_ENABLE_CAPTURE=ON"
59-
#endif
54+
#define SKIP_WITHOUT_CAPTURE_FEATURE() \
55+
do { \
56+
if constexpr (!kCaptureEnabled) { \
57+
GTEST_SKIP() << "livekit-ffi built without the 'capture' feature; configure with -DLIVEKIT_ENABLE_CAPTURE=ON"; \
58+
} \
59+
} while (false)
6060

6161
std::shared_ptr<CaptureSource> createPatternCapture() {
6262
PatternVideoSourceConfig config;

0 commit comments

Comments
 (0)