@@ -27,22 +27,22 @@ namespace {
2727// Strict GPU checks require successful creation of enabled sources. Omitted
2828// backends must reject a valid configuration with the feature-disabled error.
2929template <typename Config>
30- bool checkSource (std::string_view name, const Config& config, bool expected, livekit::CaptureSourceKind kind) {
30+ bool checkSource (std::string_view name, const Config& config, bool expected, livekit::capture:: CaptureSourceKind kind) {
3131 try {
32- auto future = livekit::CaptureSource::create (config);
32+ auto future = livekit::capture:: CaptureSource::create (config);
3333 if (future.wait_for (std::chrono::seconds (15 )) != std::future_status::ready) {
3434 std::cerr << name << " : source creation timed out\n " ;
3535 return false ;
3636 }
3737 auto source = future.get ();
3838 if (!expected || !source || source->kind () != kind || source->width () != 320 || source->height () != 240 ||
3939 !source->videoSource () ||
40- (kind == livekit::CaptureSourceKind::Encoded && source->codec () != livekit::VideoCodec::VP8 )) {
40+ (kind == livekit::capture:: CaptureSourceKind::Encoded && source->codec () != livekit::VideoCodec::VP8 )) {
4141 std::cerr << name << " : unexpected source availability or metadata\n " ;
4242 return false ;
4343 }
4444 return true ;
45- } catch (const livekit::CaptureSourceError& error) {
45+ } catch (const livekit::capture:: CaptureSourceError& error) {
4646 constexpr std::string_view disabled = " capture source is not enabled in this build" ;
4747 const std::string_view message (error.what ());
4848 if (!expected && message.find (disabled) != std::string_view::npos) {
@@ -51,7 +51,7 @@ bool checkSource(std::string_view name, const Config& config, bool expected, liv
5151 // Runners without an adapter can still prove that the selected backend
5252 // reached its renderer. All other errors fail; strict GPU jobs also fail
5353 // on a missing adapter.
54- if (expected && kind == livekit::CaptureSourceKind::Pixel && !LIVEKIT_VERIFY_PIXEL_SOURCES &&
54+ if (expected && kind == livekit::capture:: CaptureSourceKind::Pixel && !LIVEKIT_VERIFY_PIXEL_SOURCES &&
5555 message.find (" no compatible GPU adapter" ) != std::string_view::npos) {
5656 std::cout << name << " : creation not exercised (no GPU adapter); backend availability verified\n " ;
5757 return true ;
@@ -65,22 +65,24 @@ bool checkSource(std::string_view name, const Config& config, bool expected, liv
6565}
6666
6767bool checkSources () {
68- livekit::GstreamerVideoSourceConfig gstreamer;
68+ livekit::capture:: GstreamerVideoSourceConfig gstreamer;
6969 gstreamer.pipeline =
7070 " videotestsrc num-buffers=4 ! video/x-raw,width=320,height=240,framerate=30/1 ! "
7171 " vp8enc deadline=1 ! appsink name=lk_appsink" ;
7272 bool success =
73- checkSource (" gstreamer" , gstreamer, LIVEKIT_EXPECT_GSTREAMER != 0 , livekit::CaptureSourceKind::Encoded);
73+ checkSource (" gstreamer" , gstreamer, LIVEKIT_EXPECT_GSTREAMER != 0 , livekit::capture:: CaptureSourceKind::Encoded);
7474
75- livekit::PatternVideoSourceConfig pattern;
75+ livekit::capture:: PatternVideoSourceConfig pattern;
7676 pattern.resolution = {320 , 240 };
7777 pattern.framerate_fps = 30 ;
78- success = checkSource (" pattern" , pattern, LIVEKIT_EXPECT_PATTERN != 0 , livekit::CaptureSourceKind::Pixel) && success;
78+ success = checkSource (" pattern" , pattern, LIVEKIT_EXPECT_PATTERN != 0 , livekit::capture::CaptureSourceKind::Pixel) &&
79+ success;
7980
80- livekit::ClockVideoSourceConfig clock;
81+ livekit::capture:: ClockVideoSourceConfig clock;
8182 clock.resolution = {320 , 240 };
8283 clock.framerate_fps = 30 ;
83- success = checkSource (" clock" , clock, LIVEKIT_EXPECT_CLOCK != 0 , livekit::CaptureSourceKind::Pixel) && success;
84+ success =
85+ checkSource (" clock" , clock, LIVEKIT_EXPECT_CLOCK != 0 , livekit::capture::CaptureSourceKind::Pixel) && success;
8486 return success;
8587}
8688
0 commit comments