Commit 40a4c782 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Reimplement the MPEG splitter on top of the mpegaudioparse plugin.

parent 27da4fa4
......@@ -16,7 +16,6 @@ C_SRCS = \
filtermapper.c \
main.c \
memallocator.c \
mpegsplit.c \
parser.c \
pin.c \
regsvr.c \
......
......@@ -69,7 +69,6 @@ static const struct object_creation_info object_creation[] =
{ &CLSID_FilterMapper2, FilterMapper2_create },
{ &CLSID_AsyncReader, AsyncReader_create },
{ &CLSID_MemoryAllocator, StdMemAllocator_create },
{ &CLSID_MPEG1Splitter, MPEGSplitter_create },
{ &CLSID_VideoRenderer, VideoRenderer_create },
{ &CLSID_VideoMixingRenderer, VMR7Impl_create },
{ &CLSID_VideoMixingRenderer9, VMR9Impl_create },
......
......@@ -55,7 +55,6 @@ HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
HRESULT FilterMapper_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT StdMemAllocator_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT AVIDec_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
......
......@@ -85,13 +85,6 @@ coclass SeekingPassThru { interface ISeekingPassThru; }
coclass AsyncReader { interface IBaseFilter; }
[
helpstring("MPEG-I Stream Splitter"),
threading(both),
uuid(336475d0-942a-11ce-a870-00aa002feab5)
]
coclass MPEG1Splitter { interface IBaseFilter; }
[
helpstring("AVI Decompressor"),
threading(both),
uuid(cf49d4e0-1115-11ce-b03a-0020af0ba770)
......
......@@ -178,33 +178,6 @@ static HRESULT unregister_filters(struct regsvr_filter const *list)
*/
static struct regsvr_filter const filter_list[] = {
{ &CLSID_MPEG1Splitter,
&CLSID_LegacyAmFilterCategory,
{'M','P','E','G','-','I',' ','S','t','r','e','a','m',' ','S','p','l','i','t','t','e','r',0},
0x5ffff0,
{ { 0,
{ { &MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio },
{ &MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video },
{ &MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System },
{ &MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD },
{ NULL }
},
},
{ REG_PINFLAG_B_OUTPUT,
{ { &MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet },
{ &MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload },
{ NULL }
},
},
{ REG_PINFLAG_B_OUTPUT,
{ { &MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet },
{ &MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload },
{ NULL }
},
},
{ 0xFFFFFFFF },
}
},
{ &CLSID_NullRenderer,
&CLSID_LegacyAmFilterCategory,
{'N','u','l','l',' ','R','e','n','d','e','r','e','r',0},
......
......@@ -153,7 +153,7 @@ static void test_interfaces(void)
check_interface(pin, &IID_IKsPropertySet, FALSE);
check_interface(pin, &IID_IMediaPosition, FALSE);
todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE);
check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin);
......@@ -161,7 +161,7 @@ static void test_interfaces(void)
check_interface(pin, &IID_IMediaSeeking, TRUE);
check_interface(pin, &IID_IPin, TRUE);
todo_wine check_interface(pin, &IID_IQualityControl, TRUE);
check_interface(pin, &IID_IQualityControl, TRUE);
check_interface(pin, &IID_IUnknown, TRUE);
check_interface(pin, &IID_IAsyncReader, FALSE);
......@@ -999,8 +999,18 @@ static void test_enum_media_types(void)
START_TEST(mpegsplit)
{
IBaseFilter *filter;
CoInitialize(NULL);
if (FAILED(CoCreateInstance(&CLSID_MPEG1Splitter, NULL, CLSCTX_INPROC_SERVER,
&IID_IBaseFilter, (void **)&filter)))
{
skip("Failed to create MPEG-1 splitter.\n");
return;
}
IBaseFilter_Release(filter);
test_interfaces();
test_aggregation();
test_enum_pins();
......
......@@ -39,6 +39,7 @@
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt);
IUnknown * CALLBACK avi_splitter_create(IUnknown *outer, HRESULT *phr) DECLSPEC_HIDDEN;
IUnknown * CALLBACK mpeg_splitter_create(IUnknown *outer, HRESULT *phr) DECLSPEC_HIDDEN;
IUnknown * CALLBACK Gstreamer_AudioConvert_create(IUnknown *pUnkOuter, HRESULT *phr);
IUnknown * CALLBACK Gstreamer_Mp3_create(IUnknown *pUnkOuter, HRESULT *phr);
IUnknown * CALLBACK Gstreamer_YUV2RGB_create(IUnknown *pUnkOuter, HRESULT *phr);
......
......@@ -50,6 +50,8 @@ static const WCHAR wave_parserW[] =
{'W','a','v','e',' ','P','a','r','s','e','r',0};
static const WCHAR avi_splitterW[] =
{'A','V','I',' ','S','p','l','i','t','t','e','r',0};
static const WCHAR mpeg_splitterW[] =
{'M','P','E','G','-','I',' ','S','t','r','e','a','m',' ','S','p','l','i','t','t','e','r',0};
static WCHAR wNull[] = {'\0'};
......@@ -259,6 +261,63 @@ static const AMOVIESETUP_FILTER avi_splitter_filter_data =
avi_splitter_pin_data,
};
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_sink_type_data[] =
{
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Audio},
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1Video},
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1System},
{&MEDIATYPE_Stream, &MEDIASUBTYPE_MPEG1VideoCD},
};
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_audio_type_data[] =
{
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1Packet},
{&MEDIATYPE_Audio, &MEDIASUBTYPE_MPEG1AudioPayload},
};
static const AMOVIESETUP_MEDIATYPE mpeg_splitter_video_type_data[] =
{
{&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Packet},
{&MEDIATYPE_Video, &MEDIASUBTYPE_MPEG1Payload},
};
static const AMOVIESETUP_PIN mpeg_splitter_pin_data[] =
{
{
NULL,
FALSE, FALSE, FALSE, FALSE,
&GUID_NULL,
NULL,
ARRAY_SIZE(mpeg_splitter_sink_type_data),
mpeg_splitter_sink_type_data,
},
{
NULL,
FALSE, TRUE, FALSE, FALSE,
&GUID_NULL,
NULL,
ARRAY_SIZE(mpeg_splitter_audio_type_data),
mpeg_splitter_audio_type_data,
},
{
NULL,
FALSE, TRUE, FALSE, FALSE,
&GUID_NULL,
NULL,
ARRAY_SIZE(mpeg_splitter_video_type_data),
mpeg_splitter_video_type_data,
},
};
static const AMOVIESETUP_FILTER mpeg_splitter_filter_data =
{
&CLSID_MPEG1Splitter,
mpeg_splitterW,
0x5ffff0,
ARRAY_SIZE(mpeg_splitter_pin_data),
mpeg_splitter_pin_data,
};
FactoryTemplate const g_Templates[] = {
{
wGstreamer_Splitter,
......@@ -309,6 +368,13 @@ FactoryTemplate const g_Templates[] = {
NULL,
&avi_splitter_filter_data,
},
{
mpeg_splitterW,
&CLSID_MPEG1Splitter,
mpeg_splitter_create,
NULL,
&mpeg_splitter_filter_data,
},
};
const int g_cTemplates = ARRAY_SIZE(g_Templates);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment