Site icon EfmSoft

What does HRESULT 0xC00D1B7A (NS_E_SOURCEGROUP_NOTPREPARED) mean?

 
Previous Next
NS_E_ARCHIVE_FILENAME_NOTSET NS_E_PROFILE_MISMATCH

NS_E_SOURCEGROUP_NOTPREPARED

Diagnostic meaning beyond the standard text

For NS_E_SOURCEGROUP_NOTPREPARED (0xC00D1B7A), the actionable event is activation or start of a source group that has not completed PrepareToEncode. Keep the result producing boundary attached to the original Encoder callback or COM call.

Why the session can reach this point

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.

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. One concrete way to reach the condition is that code ignores a failed PrepareToEncode call and immediately invokes Start. The result test should therefore preserve the object generation and numeric settings, not just a screenshot of the final dialog.

Trace fields with diagnostic value

FieldWhat to preserve
Decisive valuessource-group identity, PrepareToEncode result, profile assignment and source-format discovery state
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
Session correlationthe same source-group generation, audience index, object identity and callback sequence that produced this result
Lower-level evidencethe first COM, driver, file-system or codec HRESULT observed before the Encoder mapped the condition to this result
Controlled comparisona known-good session that changes only the setting named in the sourcegroup notprepared boundary

Decision matrix

ObservationHow to interpret it
Observation that supports itThe decisive evidence is source-group identity, PrepareToEncode result, profile assignment and source-format discovery state. It confirms activation or start of a source group that has not completed PrepareToEncode in the same object generation.
Observation that points to an earlier failureThe recorded values satisfy the sourcegroup notprepared rule, but a source, driver, COM activation or file operation returns a different HRESULT first.
Observation that points to a later failureThe Encoder passes this boundary (activation or start of a source group that has not completed PrepareToEncode), but a codec, archive or broadcast sink then fails in a subsequent stage.
Verification after correctionApply this isolated change: resolve the earlier preparation error and prepare the same group before making it active. The original sourcegroup notprepared call should then advance past the same checkpoint.

The operational impact of it is limited to the encoder state-machine sequencing transition that owns activation or start of a source group that has not completed PrepareToEncode. In the representative case where code ignores a failed PrepareToEncode call and immediately invokes Start, keep the first failing call and its object identity so a later wrapper cannot replace the sourcegroup notprepared evidence.

Decision path

  1. Record 0xC00D1B7A, it, the Encoder version and the exact API call or property access that returned it.
  2. Export the current .wme or .prx configuration, then capture source-group identity, PrepareToEncode result, profile assignment and source-format discovery state.
  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 in which only this condition changes: resolve the earlier preparation error and prepare the same group before making it active.
  5. After the change, recreate the affected Encoder object rather than assuming the existing graph discarded its earlier sourcegroup notprepared state.

Codes with similar symptoms but different owners

ResultWhy it is a different boundary
NS_E_INVALIDCALL_WHILE_ARCHIVAL_RUNNINGattempt to alter archive configuration while the archive sink is active
NS_E_INVALIDCALL_WHILE_ENCODER_STOPPEDuse of a runtime-only method after the encoder has stopped
NS_E_NO_ACTIVE_SOURCEGROUPan operation that requires SourceGroupCollection.Active when no group is selected

Safe recovery

Resolve the producing condition by ensuring that you resolve the earlier preparation error and prepare the same group before making it active. Then rebuild only the portion of the Encoder graph affected by it and verify the original call.

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.

Source material


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

Exit mobile version