| Previous | Next |
| MF_E_CAPTURE_SINK_ROTATE_ERROR | MF_E_CAPTURE_ENGINE_ALL_EFFECTS_REMOVED |
MF_E_CAPTURE_ENGINE_INVALID_OP
MF_E_CAPTURE_ENGINE_INVALID_OP is a state-machine error from the Capture Engine. Initialization, preview, recording, and still-photo operations are asynchronous: a method can return success and complete later through an event delivered to IMFCaptureEngineOnEventCallback::OnEvent.
Trace requested operations together with completion events
Log each call to Initialize, StartPreview, StopPreview, StartRecord, StopRecord, and TakePhoto, plus every Capture Engine event and its status HRESULT. Keep separate flags for “request submitted” and “completion event received.”
The Microsoft CaptureEngine sample follows this model explicitly: it tracks preview, recording, and pending-photo state and updates those states from capture events. Serializing only the API calls is not enough if the application submits a new operation while the previous asynchronous transition is still pending. Fix the caller's state transition logic instead of retrying the same operation in a tight loop.
Microsoft: IMFCaptureEngine · Microsoft: asynchronous Initialize contract · Microsoft CaptureEngine sample state handling
Looking for a different code? Search another status or error code.