Commit 09bc7d2
committed
fix(wgc): clear the breadcrumb by scope, not by remembering to
Two remaining review findings, both about the same thing: a diagnostic is only
worth having if it cannot lie.
encodeStage_ was cleared by hand on each return, and the paths that forgot --
GetBufferByIndex, buffer.As, GetResource in captureDxgiSample; the
bridge-release-capture and output-view returns in convertBgraTextureToNv12 --
left it naming a call the writer had already left. The watchdog would then
report a stage the process was not in, which is worse than reporting nothing,
because the next #252 report would be read as evidence.
A StageGuard clears it on scope exit instead, in both functions, and the six
manual resets it subsumes are gone. submitVideoSample keeps its pair: after the
lock there is no early return between setting the stage and clearing it.
Also logs the HRESULT when MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS(TRUE) fails.
Its two neighbours already log theirs, and this one sits on the path a machine
takes when the GPU pipeline is being set up -- exactly the machines whose logs
are currently all we have to go on.
Not doing the other half of that finding: the stage it reports is
ConfigureDxgiManager rather than a value naming hardware transforms. Nothing
reads the enum except the CreateSinkWriter comparison at mf_encoder.cpp:550, so
a new enumerator would be ceremony. The log line carries the attribute name and
the HRESULT, which is what a reader actually needs.1 parent 5af7d53 commit 09bc7d2
1 file changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
351 | 365 | | |
352 | 366 | | |
353 | 367 | | |
| |||
1047 | 1061 | | |
1048 | 1062 | | |
1049 | 1063 | | |
| 1064 | + | |
1050 | 1065 | | |
1051 | 1066 | | |
1052 | 1067 | | |
| |||
1063 | 1078 | | |
1064 | 1079 | | |
1065 | 1080 | | |
1066 | | - | |
1067 | 1081 | | |
1068 | 1082 | | |
1069 | 1083 | | |
1070 | | - | |
1071 | 1084 | | |
1072 | 1085 | | |
1073 | 1086 | | |
| |||
1085 | 1098 | | |
1086 | 1099 | | |
1087 | 1100 | | |
1088 | | - | |
1089 | 1101 | | |
1090 | 1102 | | |
1091 | 1103 | | |
1092 | | - | |
1093 | 1104 | | |
1094 | 1105 | | |
1095 | 1106 | | |
| |||
1135 | 1146 | | |
1136 | 1147 | | |
1137 | 1148 | | |
1138 | | - | |
1139 | 1149 | | |
1140 | 1150 | | |
1141 | 1151 | | |
| |||
1156 | 1166 | | |
1157 | 1167 | | |
1158 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1159 | 1172 | | |
1160 | 1173 | | |
1161 | 1174 | | |
1162 | 1175 | | |
1163 | | - | |
1164 | 1176 | | |
1165 | 1177 | | |
1166 | 1178 | | |
| |||
0 commit comments