| Previous | Next |
| NS_E_NOTARCHIVING | NS_E_NOSOURCEGROUPS |
NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED
The failing boundary in the Encoder object model
The useful reading of NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED (0xC00D1B7F) is not merely the standard message shown above. It locates use of a runtime-only method after the encoder has stopped inside encoder state-machine sequencing.
WMEncoder exposes configuration, preparation, running, paused, stopped and archival states in a session that returns this result. Properties that alter graph topology are normally set before Start, while statistics and some control operations are meaningful only after a session reaches the matching state.
Evidence that separates this code from a wrapper error
The same method can be valid in one encoder state and rejected in another without any file, codec or network defect in a session that returns this result. For example, statistics or live-control code runs from a timer after Stop completed. Preserve the result distinction before a UI layer converts the result into a broad start, capture or profile failure.
| Field | What to preserve |
|---|---|
| Decisive values | RunState, requested method, stop callback time and owning object generation |
| Producing object | current encoder RunState, active source group, PrepareToEncode calls, Start/Pause/Stop order, archive state, thread and callback that issued the operation, and the first state-transition HRESULT |
| Session correlation | the same source-group generation, audience index, object identity and callback sequence that produced this result |
| Lower-level evidence | the first COM, driver, file-system or codec HRESULT observed before the Encoder mapped the condition to this result |
| Controlled comparison | a known-good session that changes only the setting named in the invalidcall while encoder stopped boundary |
Interpret the next measurement
| Observation | How to interpret it |
|---|---|
| Observation that supports it | The decisive evidence is RunState, requested method, stop callback time and owning object generation. It confirms use of a runtime-only method after the encoder has stopped in the same object generation. |
| Observation that points to an earlier failure | The recorded values satisfy the invalidcall while encoder stopped 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 (use of a runtime-only method after the encoder has stopped), but a codec, archive or broadcast sink then fails in a subsequent stage. |
| Verification after correction | Apply this isolated change: start and prepare a new session before invoking the runtime operation. The original invalidcall while encoder stopped call should then advance past the same checkpoint. |
The operational impact of it is limited to the encoder state-machine sequencing transition that owns use of a runtime-only method after the encoder has stopped. In the representative case where statistics or live-control code runs from a timer after Stop completed, keep the first failing call and its object identity so a later wrapper cannot replace the invalidcall while encoder stopped evidence.
Test the condition without rewriting the session
- Record
0xC00D1B7F, it, the Encoder version and the exact API call or property access that returned it. - Export the current
.wmeor.prxconfiguration, then capture RunState, requested method, stop callback time and owning object generation. - verify the encoder state-machine sequencing precondition without changing the source, profile and output sink at the same time.
- Run one controlled comparison in which only this condition changes: start and prepare a new session before invoking the runtime operation.
- After the change, recreate the affected Encoder object rather than assuming the existing graph discarded its earlier invalidcall while encoder stopped state.
Interpret neighboring results carefully
| Result | Why it is a different boundary |
|---|---|
NS_E_SOURCEGROUP_NOTPREPARED | activation or start of a source group that has not completed PrepareToEncode |
NS_E_CANNOT_PAUSE_LIVEBROADCAST | Pause is requested for a session actively broadcasting live output |
NS_E_INVALIDCALL_WHILE_ARCHIVAL_RUNNING | attempt to alter archive configuration while the archive sink is active |
Resolution and verification
The direct repair for this occurrence is to start and prepare a new session before invoking the runtime operation. Recreate the affected source group, profile or output object, repeat the same operation, and confirm that the first failing HRESULT no longer comes from the invalidcall while encoder stopped checkpoint.
Do not hide the ordering problem behind unconditional retries; log the transition sequence and make the operation occur at the documented lifecycle point in a session that returns it.
References for the boundary
- WMEncoder.Start.
- Preparing a source group for encoding.
- WMEncoder.Flush.
- Saving a Windows Media Encoder configuration.
Looking for a different code? Search another status or error code.