From: Anton Baskanov baskanov@gmail.com
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/winegstreamer/main.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index a408704cf47..c3adbb82d61 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -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, ®_avi_splitter); IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser, L"GStreamer splitter filter", NULL, NULL, NULL, ®_decodebin_parser); + IFilterMapper2_RegisterFilter(mapper, &CLSID_CMpegAudioCodec, + L"MPEG Audio Decoder", NULL, NULL, NULL, ®_mpeg_audio_codec); IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, L"MPEG-I Stream Splitter", NULL, NULL, NULL, ®_mpeg_splitter); IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, L"Wave Parser", NULL, NULL, NULL, ®_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);