1616
1717// / Tests for capture sources (livekit-capture over FFI).
1818// /
19- // / Two groups. `CaptureSourceServerTest` publishes the built-in demo source —
19+ // / Two groups. `CaptureSourceServerTest` publishes the built-in pattern source —
2020// / the capture pump pushes frames server-side, so the test drives no frames
2121// / itself — and verifies that a second participant receives real video through
2222// / the SFU. `CaptureDeviceTest` covers camera device enumeration and format
@@ -58,8 +58,8 @@ constexpr std::uint32_t kCaptureFramerateFps = 30;
5858 GTEST_SKIP () << "livekit-ffi built without the 'capture' feature; configure with -DLIVEKIT_ENABLE_CAPTURE =ON "
5959#endif
6060
61- std::shared_ptr<CaptureSource> createDemoCapture () {
62- DemoVideoSourceConfig config;
61+ std::shared_ptr<CaptureSource> createPatternCapture () {
62+ PatternVideoSourceConfig config;
6363 config.resolution = {kCaptureWidth, kCaptureHeight};
6464 config.framerate_fps = kCaptureFramerateFps;
6565 return CaptureSource::create(config).get();
@@ -166,14 +166,14 @@ TEST_F(CaptureDeviceTest, DefaultDeviceNegotiatesAFormat) {
166166 EXPECT_NE(capture->videoSource(), nullptr);
167167}
168168
169- TEST_F(CaptureSourceServerTest, DemoCaptureSourcePublishesFramesEndToEnd ) {
169+ TEST_F(CaptureSourceServerTest, PatternCaptureSourcePublishesFramesEndToEnd ) {
170170 SKIP_WITHOUT_CAPTURE_FEATURE();
171171 failIfNotConfigured();
172172
173- auto capture = createDemoCapture ();
173+ auto capture = createPatternCapture ();
174174 ASSERT_NE(capture, nullptr);
175175
176- // The demo source reports back the resolution it was configured with.
176+ // The pattern source reports back the resolution it was configured with.
177177 ASSERT_EQ(capture->kind(), CaptureSourceKind::Pixel);
178178 ASSERT_EQ(capture->width(), kCaptureWidth);
179179 ASSERT_EQ(capture->height(), kCaptureHeight);
@@ -199,7 +199,7 @@ TEST_F(CaptureSourceServerTest, DemoCaptureSourcePublishesFramesEndToEnd) {
199199 std::condition_variable cv;
200200 int frames_received = 0;
201201
202- const std::string track_name = " demo -capture-track" ;
202+ const std::string track_name = " pattern -capture-track" ;
203203 receiver_room.setOnVideoFrameEventCallback(sender_identity, track_name,
204204 [&mutex, &cv, &frames_received](const VideoFrameEvent& /*event*/) {
205205 std::lock_guard<std::mutex> lock(mutex);
@@ -232,7 +232,7 @@ TEST_F(CaptureSourceServerTest, DemoCaptureSourcePublishesFramesEndToEnd) {
232232 std::unique_lock<std::mutex> lock(mutex);
233233 const bool got_frames =
234234 cv.wait_for(lock, 30s, [&frames_received] { return frames_received >= kMinFramesReceived; });
235- ASSERT_TRUE(got_frames) << " Timed out waiting for demo capture frames; received " << frames_received;
235+ ASSERT_TRUE(got_frames) << " Timed out waiting for pattern capture frames; received " << frames_received;
236236 }
237237
238238 // Stop is a signal; the terminal callback delivers the stats.
0 commit comments