winegstreamer: Register MPEG audio decoder.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2022-04-07 12:23:10 +07:00 committed by Alexandre Julliard
parent bae7ac48bc
commit faf6f267ae
1 changed files with 36 additions and 0 deletions

View File

@ -520,6 +520,39 @@ static const REGFILTER2 reg_avi_splitter =
.u.s2.rgPins2 = reg_avi_splitter_pins,
};
static const REGPINTYPES reg_mpeg_audio_codec_sink_mts[3] =
{
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Payload},
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
};
static const REGPINTYPES reg_mpeg_audio_codec_source_mts[1] =
{
{&MEDIATYPE_Audio, &MEDIASUBTYPE_PCM},
};
static const REGFILTERPINS2 reg_mpeg_audio_codec_pins[2] =
{
{
.nMediaTypes = 3,
.lpMediaType = reg_mpeg_audio_codec_sink_mts,
},
{
.dwFlags = REG_PINFLAG_B_OUTPUT,
.nMediaTypes = 1,
.lpMediaType = reg_mpeg_audio_codec_source_mts,
},
};
static const REGFILTER2 reg_mpeg_audio_codec =
{
.dwVersion = 2,
.dwMerit = 0x03680001,
.u.s2.cPins2 = 2,
.u.s2.rgPins2 = reg_mpeg_audio_codec_pins,
};
static const REGPINTYPES reg_mpeg_splitter_sink_mts[4] =
{
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio},
@ -650,6 +683,8 @@ HRESULT WINAPI DllRegisterServer(void)
IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter, L"AVI Splitter", NULL, NULL, NULL, &reg_avi_splitter);
IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser,
L"GStreamer splitter filter", NULL, NULL, NULL, &reg_decodebin_parser);
IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec,
L"MPEG Audio Decoder", NULL, NULL, NULL, &reg_mpeg_audio_codec);
IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter,
L"MPEG-I Stream Splitter", NULL, NULL, NULL, &reg_mpeg_splitter);
IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, NULL, NULL, &reg_wave_parser);
@ -679,6 +714,7 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_AviSplitter);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_CMpegAudioCodec);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);