| Previous | Next |
| MF_E_VIDEO_RECORDING_DEVICE_INVALIDATED | MF_E_NETWORK_RESOURCE_FAILURE |
MF_E_VIDEO_RECORDING_DEVICE_PREEMPTED
MF_E_VIDEO_RECORDING_DEVICE_PREEMPTED must be distinguished from device removal. Media Foundation exposes separate capture events: MEVideoCaptureDevicePreempted for preemption and MEVideoCaptureDeviceRemoved for removal.
Keep preemption as a separate capture state
- Record the Media Foundation event type and event status before tearing down the capture pipeline. A generic “camera lost” log discards the distinction that the platform provides.
- Keep the selected video's symbolic link so the application can identify the same capture device when it reevaluates available devices.
- Do not diagnose preemption as a broken USB cable solely because frames stopped. Check whether the platform reported
MEVideoCaptureDevicePreemptedand whether the device still appears inMFEnumDeviceSources.
A removed device is handled through device-loss notification and symbolic-link comparison. Preemption is a separate Media Foundation event state, so recovery policy can be different even when both conditions interrupt recording. The most useful traces include the active device symbolic link, the last sample timestamp, the event type/status, and a fresh enumeration result. Recreating encoders or changing the capture format does not explain why the platform explicitly reported preemption.
Microsoft: Media Foundation capture events · Microsoft: video device loss · Microsoft: MFEnumDeviceSources
Looking for a different code? Search another status or error code.