I don't think I like the addition of stream_chunk_parse_desc().
- Duplicates dmobj_parsedescriptor() but only partially
- Placement in dmobject.[ch] makes it sound like it would be generic but the descriptor parsing is highly object specific.
- There is already a specific IPersistStream_ParseDescriptor() implemented that can be used just fine in the IPersistStream_Load() implementation
I meant to use stream_chunk_parse_desc in dmobj_parsedescriptor later (see https://gitlab.winehq.org/rbernon/wine/-/commit/445382939b0ce11e6f3fe1dc6343...), and progressively change existing code to directly use stream_chunk_parse_desc. This would let us parse streams in single pass, instead of rewinding the stream when parsing the descriptor chunks, and imho will better fit inside the parsing loops.
I think it will also let us decide which chunks are valid for each class, instead of the "supported" parameter, with `stream_chunk_parse_desc` only parsing the chunk that is requested. For instance the collection uses a "dlid" chunk instead of "guid" for object GUID, and ignores any "guid" chunks. Both would use the same supported flag and would require a separate, private, flag to distinguish them.
My intention for later is also to merge IDirectMusicObject_ParseDescriptor and IPersistStream_Load together (as in https://gitlab.winehq.org/rbernon/wine/-/commit/36fda9551e9b7d3db9582ed159e2...), although I wanted to make sure that it's doable for every object.
Why do you actually need the new generic parse_info_list() (outside the use in stream_chunk_parse_desc())? I know the old code was "handling" the cases too in the same way of WARN and drop those chunks. But that WARN() is useless as DirectMusic is not handling those chunks at all; there's no API to get to that info. Those are afair just there for the DirectMusic Producer. And RIFF specification just says to ignore / skip the unknown / uninteresting chunks.
Sure, I just wanted to be explicit about "known" ignored chunks, vs "unknown" ignored chunks (ie: possibly missing implementation). I can remove the WARN if you don't feel like it's useful but I think we should keep the FIXME for unknown ignored chunks so that if somehow we get a bad RIFF file, it won't go unnoticed.