On Thu Nov 30 22:05:10 2023 +0000, Zebediah Figura wrote:
If you've tested manually, that's probably fine. My concern is primarily that we're actually translating formats correctly; GStreamer and DirectShow don't always store them in the same way, and it's too easy to make assumptions (cf. [1]). [1] https://gitlab.winehq.org/wine/wine/-/merge_requests/3636#note_45288
Honestly, I didn't test manually, I just did whatever gets the videos working.
But you're right, [I should.](/uploads/ad88bf935e5bcd7a42c0219894294215/main.cpp)
``` Wine { majortype } { subtype } {fixSzSmp } {tempComp } {sampSize } { formattype } ........... { pUnk } { cbFormat} ........... { pbFormat } { rcSource } { rcTarget } {dwBitRate} {BitErrRte} { AvgTimePerFrame } { biSize } { biWidth } {biHeight } {pln} {btc} {compress } {sizeImage} {xPerMeter} {yPerMeter} {dwClrUsed} {clrImptnt} ?? ?? ?? ?? ?? 76 69 64 73 00 00 10 00 80 00 00 aa 00 38 9b 71 57 4d 56 33 00 00 10 00 80 00 00 aa 00 38 9b 71 00 00 00 00 01 00 00 00 00 00 00 00 80 9f 58 05 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 00 00 00 00 00 00 00 00 00 00 00 00 5d 00 00 00 00 00 00 00 48 f6 2f fe ff 7f 00 00 00 00 00 00 00 00 00 00 00 05 00 00 d0 02 00 00 00 00 00 00 00 00 00 00 00 05 00 00 d0 02 00 00 00 00 00 00 00 00 00 00 15 16 05 00 00 00 00 00 28 00 00 00 00 05 00 00 d0 02 00 00 01 00 18 00 57 4d 56 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f f1 08 01 00 61 75 64 73 00 00 10 00 80 00 00 aa 00 38 9b 71 63 01 00 00 00 00 10 00 80 00 00 aa 00 38 9b 71 01 00 00 00 00 00 00 00 3f 34 00 00 81 9f 58 05 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 00 00 00 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 48 f6 2f fe ff 7f 00 00 63 01 02 00 44 ac 00 00 80 32 02 00 3f 34 10 00 12 00 10 00 03 00 00 00 00 00 00 00 00 00 00 00 a1 01 00 00 { majortype } { subtype } {fixSzSmp } {tempComp } {sampSize } { formattype } ........... { pUnk } { cbFormat} ........... { pbFormat } {fmt} {chn} {sampleSec} {avgBySec } {ali} {bps} {cbs} ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Native { majortype } { subtype } {fixSzSmp } {tempComp } {sampSize } { formattype } ........... { pUnk } { cbFormat} ........... { pbFormat } {fmt} {chn} {sampleSec} {avgBySec } {ali} {bps} {cbs} ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 61 75 64 73 00 00 10 00 80 00 00 aa 00 38 9b 71 63 01 00 00 00 00 10 00 80 00 00 aa 00 38 9b 71 01 00 00 00 00 00 00 00 3f 34 00 00 81 9f 58 05 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 00 00 00 00 00 00 00 00 00 00 00 00 24 00 00 00 00 00 00 00 e8 f3 2e 00 00 00 00 00 63 01 02 00 44 ac 00 00 80 32 02 00 3f 34 10 00 12 00 10 00 03 00 00 00 00 00 00 00 00 00 00 00 a1 01 00 00 76 69 64 73 00 00 10 00 80 00 00 aa 00 38 9b 71 57 4d 56 33 00 00 10 00 80 00 00 aa 00 38 9b 71 00 00 00 00 01 00 00 00 00 00 00 00 80 9f 58 05 56 c3 ce 11 bf 01 00 aa 00 55 59 5a 00 00 00 00 00 00 00 00 00 00 00 00 5d 00 00 00 00 00 00 00 e8 f3 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 d0 02 00 00 00 00 00 00 00 00 00 00 00 05 00 00 d0 02 00 00 08 d7 56 00 00 00 00 00 15 16 05 00 00 00 00 00 2d 00 00 00 00 05 00 00 d0 02 00 00 01 00 18 00 57 4d 56 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f f1 08 01 00 { majortype } { subtype } {fixSzSmp } {tempComp } {sampSize } { formattype } ........... { pUnk } { cbFormat} ........... { pbFormat } { rcSource } { rcTarget } {dwBitRate} {BitErrRte} { AvgTimePerFrame } { biSize } { biWidth } {biHeight } {pln} {btc} {compress } {sizeImage} {xPerMeter} {yPerMeter} {dwClrUsed} {clrImptnt} ?? ?? ?? ?? ?? ```
Like the WMAs, the codec data is just concatenated to the struct, as I guessed. (Though apparently I put wrong value in bmiHeader.biSize. Fixed.)
The streams are in opposite order in Wine vs native, but that's a separate question.