Conversation
…rity ActivateObject takes (riid, ppv); the call passed three arguments, so the extra one shifted the arguments and ppv was NULL. The call returned E_POINTER (0x80004003), the bridge reported the camera as unavailable, and the guest kept the black frame it primes on purpose. Ask for IID_IMFMediaSource and drop the stray argument. Also fix the source reader flush: IMFSourceReader::Flush is vtable slot 10, not 8 (slot 8 is SetCurrentPosition).
Collaborator
Author
|
Thanks. The camera fix landed in #137, including the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The camera bridge never captured a frame.
IMFActivate::ActivateObjectwas called with three arguments instead of two, so the arguments shifted andppvwasNULL. The call returnedE_POINTER(0x80004003).Live evidence from the v0.0.20 re-test (launcher
afdcd7a2…), by talking to the launcher's own camera bridge on127.0.0.1:4453:Because
source.start()always failed, the launcher reported the camera as unavailable and the guest kept the black frame its bridge primes on purpose. No crash, just no picture.Changes
app/camera_mf_windows.go: askIMFActivate::ActivateObjectforIID_IMFMediaSourceand pass the destination pointer, dropping the stray third argument. The result is handed straight toMFCreateSourceReaderFromMediaSource, soIMFMediaSourceis the interface it wants.IMFSourceReader::Flushis vtable slot 10; the code called slot 8, which isSetCurrentPosition, invoked there with a bogusREFGUID.Why the existing tests missed it
TestMediaFoundationExportsResolveonly checks that the entry points resolve. CI has no camera, so the call itself was never exercised.Test plan
GOOS=windows go build)streaming,/dev/video42should show the real camera, andjournalctl --user -u omarchy-windows-camera-bridge -bshould logstreaming Windows Camera at 1280x720.The
Flushslot fix is not observable from the happy path, but the current slot is clearly wrong.Related: direct file drops on this same pass are blocked by a separate issue — the launcher tries to subclass QEMU's window from another process, which Windows does not allow. The runtime already reports drops over QMP (
DISPLAY_FILE_DROP), so that is the path to fix separately.