Skip to content

requesthandler: Include the ImageFormat helper in the sources handler - #11

Closed
rdoupe wants to merge 1 commit into
obs-rust:masterfrom
rdoupe:fix/screenshot-mime-include
Closed

rdoupe wants to merge 1 commit into
obs-rust:masterfrom
rdoupe:fix/screenshot-mime-include

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes the build of the plugin in a full OBS build (frontend + obs-websocket), broken since #6.

GetSourceScreenshot calls Utils::ImageFormat::MimeType() since "utils: Move the screenshot MIME type into a helper" (#6), but src/requesthandler/RequestHandler_Sources.cpp never includes ../utils/ImageFormat.h, and nothing it includes pulls it in (RequestHandler.h includes ../utils/Obs.h, not Utils.h). A full build fails with:

RequestHandler_Sources.cpp:231: error: 'Utils::ImageFormat' has not been declared

This adds the one missing include.

Motivation and Context

My mistake in #6: its test (test_ws_image_mime in obs-rust/obs-studio#652) compiles the helper on its own, and the obs-studio PR builds skip the full app, so nothing compiled this file before #6 and #652 merged. obs-studio master now pins 3e46553 (#652), so the next full build there (the daily release gate) would fail until the pin moves past this fix.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

🤖 Generated with Claude Code

GetSourceScreenshot calls Utils::ImageFormat::MimeType() since
"utils: Move the screenshot MIME type into a helper" (obs-rust#6), but
RequestHandler_Sources.cpp never includes ImageFormat.h and nothing it
includes pulls it in, so the plugin no longer compiles in a build with
the frontend and obs-websocket: "'Utils::ImageFormat' has not been
declared". The standalone helper test and the obs-studio PR builds,
which skip the full app, did not catch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rdoupe

rdoupe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Friendly nudge on this one: obs-studio master now pins this fork at a commit where RequestHandler_Sources.cpp uses Utils::ImageFormat without including ../utils/ImageFormat.h. PR CI doesn't compile that file, but the full OBS build does, so the next daily release build will fail until this include lands. It's a one-line change. Once it's merged I'll open the obs-studio PR that moves the pin forward.

@rdoupe

rdoupe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing as redundant: #10 landed the same include and obs-studio master now pins 547f5ea, which builds. Thanks.

@rdoupe rdoupe closed this Oct 14, 2026
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.

1 participant