I was going to suggest anyway that using codec_format instead of preferred_format for uncompressed video would make sense;
Do you mean that, in wg_parser_stream_get_codec_format(), for uncompressed situation, we should also return codec_format instead of returning preferred_format?