April 17, 2026
7:58 a.m.
On Sun Apr 12 02:05:23 2026 +0000, Ziqing Hui wrote: > > This one is confusing. Why would be do encode_sample() more than once? > Is it possible to have multiple encoders one after another? Or is the > helper name simply misleading and it means "process" in general, instead > of "encode"? > Sorry for the misleading name. Yes, it means "process" instead of > "encode". It is used for transform processing in general, not only for encoding. > > What is the idea behind next_transform? It looks like this code allows > two transforms at maximum, is there a limit to this chain on Windows? > next_transform is for the converter -> encoder case. We support at most > two transforms: one converter and one encoder. As far as I now, there is > no longer transform chain on Windows. > We have 2 cases for the next_transform: > 1. next_transform is NULL, in this case, there is only one transform for > the stream, or we have already handled converter and we are passing > converter output to encoder. > 2. next_transform is a encoder, in this case we have converter -> encoder. > Having the next_transform parameter makes us be able to handle each case > in one single helper function. If it's two transform at most, can we have a single helper that does processinput->processoutput, and then use it twice in a row? Also in case of stream_drain_transform_output(), both transforms are a property of a stream that you already pass in as a parameter. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10298#note_136671