| Предыдущий | Следующий |
| VFW_E_NOT_SAMPLE_CONNECTION | VFW_E_COLOR_KEY_SET |
VFW_E_PALETTE_SET
Практический смысл
VFW_E_PALETTE_SET (0X8004021D) — результат DirectShow. Исходное описание: AllStat records its meaning as “Setting a color key would conflict with the palette already set”.
. Для этого DirectShow-кода важнее точная стадия graph operation, чем общий факт ошибки воспроизведения.
Конкретные признаки контракта
- Evidence to collect
Capture 2 for this result: requested color-key type and value.
- Correction and retry boundary
Corrective action 1 for this result: choose one presentation strategy and clear the conflicting palette through the documented path.
- Likely causes
Possible cause 3 for this result: two components independently configure mutually exclusive overlay presentation options.
- Meaning and numerical form
VFW_E_PALETTE_SET is HRESULT 2147746333 ( 0x8004021D ; signed -2147220963). AllStat records its meaning as “Setting a color key would conflict with the palette already set”. In practical terms, it is returned when DirectShow refuses to set a color key because a palette is already configured and the two states conflict.
- Correction and retry boundary
Corrective action 3 for this result: reinitialize state after display or graph changes.
- Likely causes
Possible cause 2 for this result: reconnection preserves palette state unexpectedly.
- Practical scenario
A renderer receives a palette from media-type negotiation and later application code tries to set a destination key; selecting one mode resolves it. The result scenario narrows the result to a reproducible contract boundary and supplies a concrete before-and-after test.
Что проверить в trace
Сохраните exact method, filter CLSID/friendly name, connected pins, media type, graph state и generation, clock/rate либо sample timestamps, если они участвуют в этой операции. Для persisted data дополнительно фиксируйте offending field или byte range, а для renderer/device path — выбранный hardware capability.
Как отделить этот случай от соседних
Сопоставьте каждый приведённый выше признак с фактическим вызовом. Если условие из исходного контракта не выполняется, не переносите recovery от другого VFW-кода. Если после rebuild или re-enumeration результат исчезает, отдельно проверьте stale object, race и изменение topology.
Исправление и подтверждение
Меняйте только подтверждённую причину: входной параметр, media type, timing, filter connection, renderer/device capability, persisted field или текущее состояние graph. После изменения повторите тот же минимальный сценарий и сравните topology и первый HRESULT до и после исправления.
Технические ссылки
- Microsoft: DirectShow error and success codes.
- Microsoft: IOverlay.
- Microsoft: DirectShow graph building.
Нужно найти другой код? Найти другой код состояния или ошибки.
