What does HRESULT 0xC00D1B7F (NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED) mean?

 
Previous Next
NS_E_NOTARCHIVING NS_E_NOSOURCEGROUPS

NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED

The failing stage in the Encoder object model

NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED (0xC00D1B7F) means use of a runtime-only method after the encoder has stopped in encoder state-machine sequencing.

WMEncoder exposes configuration, preparation, running, paused, stopped and archival states. 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 to preserve

The same method can be valid in one encoder state and rejected in another without any file, codec or network defect. For example, statistics or live-control code runs from a timer after Stop completed.

FieldWhat to preserve
Values to recordRunState, requested method, stop callback time and owning object instance
Producing objectcurrent 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

Reproduce the condition with one controlled change

  1. Record 0xC00D1B7F, the Encoder version and the exact API call or property access that returned it.
  2. Export the current .wme or .prx configuration, then capture RunState, requested method, stop callback time and owning object instance.
  3. Verify the encoder state-machine sequencing precondition without changing the source, profile and output sink at the same time.
  4. Run one controlled comparison that changes only the identified precondition: start and prepare a new session before invoking the runtime operation.

Interpret neighboring results carefully

ResultWhy it differs
NS_E_SOURCEGROUP_NOTPREPAREDactivation or start of a source group that has not completed PrepareToEncode
NS_E_CANNOT_PAUSE_LIVEBROADCASTPause is requested for a session actively broadcasting live output
NS_E_INVALIDCALL_WHILE_ARCHIVAL_RUNNINGattempt to alter archive configuration while the archive sink is active

Resolution and verification

To fix this occurrence, 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 same operation no longer returns NS_E_INVALIDCALL_WHILE_ENCODER_STOPPED.

Do not hide the ordering problem behind unconditional retries; log the transition sequence and make the operation occur at the documented lifecycle point.

Technical references


Looking for a different code? Search another status or error code.