Anton Baskanov : winegstreamer: Register MPEG audio decoder.
Alexandre Julliard
julliard at winehq.org
Wed May 11 16:10:25 CDT 2022
Module: wine
Branch: master
Commit: faf6f267aead1c2c1f59b051aa7bc12d25dc8941
URL: https://source.winehq.org/git/wine.git/?a=commit;h=faf6f267aead1c2c1f59b051aa7bc12d25dc8941
Author: Anton Baskanov <baskanov at gmail.com>
Date: Thu Apr 7 12:23:10 2022 +0700
winegstreamer: Register MPEG audio decoder.
Signed-off-by: Anton Baskanov <baskanov at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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);
More information about the wine-cvs
mailing list