| Previous | Next |
| NS_E_BAD_MARKOUT | NS_E_UNSUPPORTED_SOURCETYPE |
NS_E_NOMATCHING_MEDIASOURCE
Diagnostic meaning beyond the standard text
For NS_E_NOMATCHING_MEDIASOURCE (0xC00D1B5A), the actionable event is selection of a source stream whose media type matches the requested source kind. Keep the NS_E_NOMATCHING_MEDIASOURCE producing boundary attached to the original Encoder callback or COM call.
Why the session can reach this point
The Encoder object model groups audio, video and script inputs in an IWMEncSourceGroup, associates one profile with that group, and asks a source plug-in to expose a media format that can feed the selected output streams in a session that returns NS_E_NOMATCHING_MEDIASOURCE.
Successful creation of the COM objects does not prove that the source group is complete; profile assignment, source discovery and format negotiation are later checkpoints in a session that returns NS_E_NOMATCHING_MEDIASOURCE. One concrete way to reach the condition is that an AVI contains video and data streams but no audio stream for the added audio source. The NS_E_NOMATCHING_MEDIASOURCE test should therefore preserve the object generation and numeric settings, not just a screenshot of the final dialog.
Trace fields with diagnostic value
| Field | What to preserve |
|---|---|
| Decisive values | enumerated streams, major/subtype for each stream and the audio/video/script source type requested by the source group |
| Producing object | source-group collection index and name, active/prepared state, stream type, input scheme and stream name, source plug-in CLSID, negotiated media type and assigned profile |
| Session correlation | the same source-group generation, audience index, object identity and callback sequence that produced NS_E_NOMATCHING_MEDIASOURCE |
| Lower-level evidence | the first COM, driver, file-system or codec HRESULT observed before the Encoder mapped the condition to NS_E_NOMATCHING_MEDIASOURCE |
| Controlled comparison | a known-good session that changes only the setting named in the nomatching mediasource boundary |
Decision matrix
| Observation | How to interpret it |
|---|---|
| Observation that supports this result | The decisive evidence is enumerated streams, major/subtype for each stream and the audio/video/script source type requested by the source group. It confirms selection of a source stream whose media type matches the requested source kind in the same object generation. |
| Observation that points to an earlier failure | The recorded values satisfy the nomatching mediasource rule, but a source, driver, COM activation or file operation returns a different HRESULT first. |
| Observation that points to a later failure | The Encoder passes this boundary (selection of a source stream whose media type matches the requested source kind), but a codec, archive or broadcast sink then fails in a subsequent stage. |
| Verification after correction | Apply this isolated change: select the stream carrying the required media type or revise the source-group stream type. The original nomatching mediasource call should then advance past the same checkpoint. |
The operational impact of NS_E_NOMATCHING_MEDIASOURCE is limited to the source groups, streams and plug-ins transition that owns selection of a source stream whose media type matches the requested source kind. For NS_E_NOMATCHING_MEDIASOURCE, it does not, by itself, prove that every input is corrupt, every codec is missing or the complete Windows Media installation is unusable. In the representative case where an AVI contains video and data streams but no audio stream for the added audio source, keep the first failing call and its object identity so a later wrapper cannot replace the nomatching mediasource evidence.
Decision path
- Record
0xC00D1B5A,NS_E_NOMATCHING_MEDIASOURCE, the Encoder version and the exact API call or property access that returned it. - Export the current
.wmeor.prxconfiguration, then capture enumerated streams, major/subtype for each stream and the audio/video/script source type requested by the source group. - For
NS_E_NOMATCHING_MEDIASOURCE, verify the source groups, streams and plug-ins precondition without changing the source, profile and output sink at the same time. - Run one controlled comparison in which only this condition changes: select the stream carrying the required media type or revise the source-group stream type.
- After the change, recreate the affected Encoder object rather than assuming the existing graph discarded its earlier nomatching mediasource state.
Codes with similar symptoms but different owners
| Result | Why it is a different boundary |
|---|---|
NS_E_UNSUPPORTED_SOURCETYPE | dispatch from the configured source type to an Encoder source plug-in |
NS_E_TOO_MANY_AUDIO | enforcement of the source-group limit for audio inputs |
NS_E_TOO_MANY_VIDEO | enforcement of the source-group limit for video inputs |
Safe recovery
Resolve the producing condition by ensuring that you select the stream carrying the required media type or revise the source-group stream type. Then rebuild only the portion of the Encoder graph affected by NS_E_NOMATCHING_MEDIASOURCE and verify the original call.
Do not delete and recreate every source group before exporting the .wme configuration and recording the active group; otherwise the failing object relation is lost in a session that returns NS_E_NOMATCHING_MEDIASOURCE.
Source material for NS_E_NOMATCHING_MEDIASOURCE
- Preparing a source group for encoding.
- Retrieving the profile assigned to a source group.
- Retrieving the configured encoder input.
- Saving a Windows Media Encoder configuration.
Looking for a different code? Search another status or error code.