Skip to content

Commit bff2394

Browse files
livekit/capture/
1 parent 9d6b121 commit bff2394

14 files changed

Lines changed: 49 additions & 14 deletions

File tree

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Be sure to update the directory layout in this file if the directory layout chan
8484
| Path | Description |
8585
|------|-------------|
8686
| `include/livekit/` | Public API headers (what SDK consumers include) |
87+
| `include/livekit/capture/` | Capture API headers; installed only for capture-enabled SDKs |
8788
| `src/` | Implementation files and internal-only headers (`ffi_client.h`, `lk_log.h`, etc.) |
8889
| `src/tests/` | Google Test integration and stress tests |
8990
| `examples/` | In-tree example applications |

‎CMakeLists.txt‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,16 @@ endif()
799799
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
800800
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
801801
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "build.h" EXCLUDE
802+
PATTERN "capture" EXCLUDE
802803
)
804+
# Capture headers are a separate public API group, installed only when at least
805+
# one capture backend is enabled in this SDK variant.
806+
if(LIVEKIT_CAPTURE_ENABLED)
807+
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/livekit/capture"
808+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/livekit"
809+
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
810+
)
811+
endif()
803812
install(FILES "${GENERATED_BUILD_H}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/livekit")
804813

805814
# ---- Create Config + Version + Targets for find_package(LiveKit CONFIG) ----

‎docs/building.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ It indicates whether any source was compiled in; it does not identify which
444444
sources are available. Check `cargo_features` in `share/livekit/build-info.json`
445445
for the selected backends. Creating a source omitted from the SDK build fails
446446
through the returned future with `CaptureSourceError`.
447-
Direct inclusion of `livekit/capture_source.h` fails at compile time in standard
448-
SDK builds. `livekit/livekit.h` includes capture declarations only when enabled.
447+
Capture-enabled bundles install the public API under `include/livekit/capture/`;
448+
standard bundles omit that directory. Use `<livekit/capture/capture_source.h>`
449+
for direct inclusion. The source-tree header also rejects use in a standard
450+
build. `livekit/livekit.h` includes capture declarations only when enabled.
449451
`share/livekit/build-info.json` in an installed bundle describes the same build
450452
features; neither value tests whether a GPU or a requested GStreamer plugin is
451453
available at runtime.

‎docs/capture-sources.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ Native camera device capture and device enumeration are not part of this API.
2424
For build flags, release bundle naming, GStreamer prerequisites, and runtime
2525
requirements, see [Building — Capture sources](building.md#capture-sources).
2626

27+
Capture-enabled bundles install the capture API in `include/livekit/capture/`:
28+
29+
```cpp
30+
#include <livekit/capture/capture_source.h>
31+
```
32+
33+
You can also include `<livekit/livekit.h>`, which includes capture declarations
34+
when capture is enabled. Standard SDK bundles do not contain the `capture/`
35+
header directory.
36+
2737
## Create and publish a source
2838

2939
Dimensions must be positive. Pattern and clock frame rates must also be positive.

‎docs/doxygen/Doxyfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ FILE_PATTERNS = *.c \
11001100
# be searched for input files as well.
11011101
# The default value is: NO.
11021102

1103-
RECURSIVE = NO
1103+
RECURSIVE = YES
11041104

11051105
# The EXCLUDE tag can be used to specify files and/or directories that should be
11061106
# excluded from the INPUT source files. This way you can easily exclude a

‎docs/testing.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ If that setting is empty, `LIVEKIT_EXPECT_CAPTURE=ON` means all sources and `OFF
108108
means none. Explicit source selections determine the expected capture flag.
109109
The test creates a GStreamer VP8 source when that source is selected. It also
110110
requires each omitted backend to report the feature-disabled error. Configuration
111-
checks that direct inclusion of `livekit/capture_source.h`
112-
succeeds for capture bundles and fails for standard bundles. Both variants must
111+
checks that `include/livekit/capture/` is present only in capture bundles and
112+
that direct inclusion of `livekit/capture/capture_source.h` succeeds only in
113+
those bundles. The obsolete flat capture header must be absent. Both variants must
113114
still compile with `livekit/livekit.h`. It needs no LiveKit server.
114115
GStreamer-enabled runs require the pipeline's plugins. Set
115116
`LIVEKIT_VERIFY_PIXEL_SOURCES=ON` to also require successful pattern and clock

‎include/livekit/livekit.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "livekit/audio_stream.h"
2323
#include "livekit/build.h"
2424
#if LIVEKIT_CAPTURE_ENABLED
25-
#include "livekit/capture_source.h"
25+
#include "livekit/capture/capture_source.h"
2626
#endif
2727
#include "livekit/e2ee.h"
2828
#include "livekit/encoded_video_source.h"

‎src/capture_source.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include "livekit/capture_source.h"
17+
#include "livekit/capture/capture_source.h"
1818

1919
#include <limits>
2020
#include <mutex>

‎src/capture_source_internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#pragma once
1818

19-
#include "livekit/capture_source.h"
19+
#include "livekit/capture/capture_source.h"
2020
#include "livekit/visibility.h"
2121

2222
namespace livekit {

0 commit comments

Comments
 (0)