Skip to content

fix: check is_available() before creating Spout/unavailable sinks and sources (#688)#690

Open
livepeer-tessa wants to merge 1 commit intomainfrom
fix/spout-availability-check-688
Open

fix: check is_available() before creating Spout/unavailable sinks and sources (#688)#690
livepeer-tessa wants to merge 1 commit intomainfrom
fix/spout-availability-check-688

Conversation

@livepeer-tessa
Copy link
Contributor

Summary

Fixes #688 — same availability-guard pattern as #644 (NDI), now applied to output sinks generally and the input source path.

Changes

src/scope/server/frame_processor.py

_update_output_sink() — add is_available() guard before attempting to create:

if not sink_class.is_available():
    logger.warning(
        "Output sink '%s' is not available on this platform, skipping",
        sink_type,
    )
    return

_create_and_connect_input_source() — downgrade existing is_available() failure from ERROR to WARNING for consistency.

Why

SpoutGL is a Windows-only DirectX texture sharing library. On Linux fal.ai workers, enabling the Spout sink/source produced ERROR-level log noise even though the outcome was benign. This cluttered the error monitoring dashboard alongside real errors.

Test

  • On Linux: enabling Spout output sink/input source should produce a WARNING and no further errors (no create() attempt)
  • On Windows: no behaviour change — is_available() returns True, sink creates as normal

Related

… sources (#688)

SpoutGL is Windows-only. On Linux (fal.ai workers), _update_output_sink()
was attempting to create the sink without first checking is_available(),
producing ERROR-level noise. Apply the same guard introduced for NDI (#644):

- _update_output_sink(): add is_available() check; log warning and return
  early if the sink type is unavailable on the current platform
- _create_and_connect_input_source(): downgrade existing is_available()
  failure from ERROR to WARNING to match the output-sink behaviour

Closes #688

Signed-off-by: livepeer-robot <robot@livepeer.org>
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7306bdc-3cf5-4ef3-9149-d6726c556fa2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/spout-availability-check-688
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@github-actions
Copy link
Contributor

🚀 fal.ai Preview Deployment

App ID daydream/scope-pr-690--preview
WebSocket wss://fal.run/daydream/scope-pr-690--preview/ws
Commit ae74127

Testing

Connect to this preview deployment by running this on your branch:

uv run build && SCOPE_CLOUD_APP_ID="daydream/scope-pr-690--preview/ws" uv run daydream-scope

🧪 E2E tests will run automatically against this deployment.

@github-actions
Copy link
Contributor

✅ E2E Tests passed

Status passed
fal App daydream/scope-pr-690--preview
Run View logs

Test Artifacts

Check the workflow run for screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpoutGL output sink logs ERROR on fal.ai (Linux) where Spout is unavailable — should check is_available() first

1 participant