winegstreamer: Unify the decodebin parser definitions under the name "decodebin_parser".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f18c09978
commit
b554086282
|
@ -19,5 +19,5 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
DEFINE_GUID(CLSID_Gstreamer_Splitter, 0xf9d8d64e, 0xa144, 0x47dc, 0x8e, 0xe0, 0xf5, 0x34, 0x98, 0x37, 0x2c, 0x29);
|
||||
DEFINE_GUID(CLSID_decodebin_parser, 0xf9d8d64e, 0xa144, 0x47dc, 0x8e, 0xe0, 0xf5, 0x34, 0x98, 0x37, 0x2c, 0x29);
|
||||
DEFINE_GUID(WINESUBTYPE_Gstreamer, 0xffffffff, 0x128f, 0x4dd1, 0xad, 0x22, 0xbe, 0xcf, 0xa6, 0x6c, 0xe7, 0xaa);
|
||||
|
|
|
@ -67,7 +67,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time)
|
|||
extern LONG object_locks;
|
||||
|
||||
HRESULT avi_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT gstdemux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT mpeg_splitter_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
HRESULT wave_parser_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -1634,7 +1634,7 @@ static const struct strmbase_sink_ops sink_ops =
|
|||
.sink_disconnect = parser_sink_disconnect,
|
||||
};
|
||||
|
||||
static BOOL gstdecoder_init_gst(struct parser *filter)
|
||||
static BOOL decodebin_parser_init_gst(struct parser *filter)
|
||||
{
|
||||
GstElement *element = gst_element_factory_make("decodebin", NULL);
|
||||
unsigned int i;
|
||||
|
@ -1692,7 +1692,7 @@ static BOOL gstdecoder_init_gst(struct parser *filter)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static HRESULT gstdecoder_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
|
||||
static HRESULT decodebin_parser_source_query_accept(struct parser_source *pin, const AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
/* At least make sure we can convert it to GstCaps. */
|
||||
GstCaps *caps = amt_to_gst_caps(mt);
|
||||
|
@ -1703,7 +1703,7 @@ static HRESULT gstdecoder_source_query_accept(struct parser_source *pin, const A
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT gstdecoder_source_get_media_type(struct parser_source *pin,
|
||||
static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
|
||||
unsigned int index, AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
GstCaps *caps = gst_pad_get_current_caps(pin->my_sink);
|
||||
|
@ -1788,7 +1788,7 @@ static BOOL parser_init_gstreamer(void)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
HRESULT gstdemux_create(IUnknown *outer, IUnknown **out)
|
||||
HRESULT decodebin_parser_create(IUnknown *outer, IUnknown **out)
|
||||
{
|
||||
struct parser *object;
|
||||
|
||||
|
@ -1800,14 +1800,14 @@ HRESULT gstdemux_create(IUnknown *outer, IUnknown **out)
|
|||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
strmbase_filter_init(&object->filter, outer, &CLSID_Gstreamer_Splitter, &filter_ops);
|
||||
strmbase_filter_init(&object->filter, outer, &CLSID_decodebin_parser, &filter_ops);
|
||||
strmbase_sink_init(&object->sink, &object->filter, wcsInputPinName, &sink_ops, NULL);
|
||||
|
||||
object->no_more_pads_event = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
object->error_event = CreateEventW(NULL, TRUE, FALSE, NULL);
|
||||
object->init_gst = gstdecoder_init_gst;
|
||||
object->source_query_accept = gstdecoder_source_query_accept;
|
||||
object->source_get_media_type = gstdecoder_source_get_media_type;
|
||||
object->init_gst = decodebin_parser_init_gst;
|
||||
object->source_query_accept = decodebin_parser_source_query_accept;
|
||||
object->source_get_media_type = decodebin_parser_source_get_media_type;
|
||||
|
||||
TRACE("Created GStreamer demuxer %p.\n", object);
|
||||
*out = &object->filter.IUnknown_inner;
|
||||
|
|
|
@ -135,7 +135,7 @@ static const IClassFactoryVtbl class_factory_vtbl =
|
|||
};
|
||||
|
||||
static struct class_factory avi_splitter_cf = {{&class_factory_vtbl}, avi_splitter_create};
|
||||
static struct class_factory gstdemux_cf = {{&class_factory_vtbl}, gstdemux_create};
|
||||
static struct class_factory decodebin_parser_cf = {{&class_factory_vtbl}, decodebin_parser_create};
|
||||
static struct class_factory mpeg_splitter_cf = {{&class_factory_vtbl}, mpeg_splitter_create};
|
||||
static struct class_factory wave_parser_cf = {{&class_factory_vtbl}, wave_parser_create};
|
||||
|
||||
|
@ -154,8 +154,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
|
|||
|
||||
if (IsEqualGUID(clsid, &CLSID_AviSplitter))
|
||||
factory = &avi_splitter_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_Gstreamer_Splitter))
|
||||
factory = &gstdemux_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_decodebin_parser))
|
||||
factory = &decodebin_parser_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_MPEG1Splitter))
|
||||
factory = &mpeg_splitter_cf;
|
||||
else if (IsEqualGUID(clsid, &CLSID_WAVEParser))
|
||||
|
@ -321,7 +321,7 @@ static const REGFILTER2 reg_wave_parser =
|
|||
.u.s2.rgPins2 = reg_wave_parser_pins,
|
||||
};
|
||||
|
||||
static const REGFILTERPINS2 reg_gstdemux_pins[3] =
|
||||
static const REGFILTERPINS2 reg_decodebin_parser_pins[3] =
|
||||
{
|
||||
{
|
||||
.nMediaTypes = 1,
|
||||
|
@ -339,12 +339,12 @@ static const REGFILTERPINS2 reg_gstdemux_pins[3] =
|
|||
},
|
||||
};
|
||||
|
||||
static const REGFILTER2 reg_gstdemux =
|
||||
static const REGFILTER2 reg_decodebin_parser =
|
||||
{
|
||||
.dwVersion = 2,
|
||||
.dwMerit = MERIT_PREFERRED,
|
||||
.u.s2.cPins2 = 3,
|
||||
.u.s2.rgPins2 = reg_gstdemux_pins,
|
||||
.u.s2.rgPins2 = reg_decodebin_parser_pins,
|
||||
};
|
||||
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
|
@ -362,8 +362,8 @@ HRESULT WINAPI DllRegisterServer(void)
|
|||
return hr;
|
||||
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_AviSplitter, avi_splitterW, NULL, NULL, NULL, ®_avi_splitter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_Gstreamer_Splitter,
|
||||
wGstreamer_Splitter, NULL, NULL, NULL, ®_gstdemux);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_decodebin_parser,
|
||||
wGstreamer_Splitter, NULL, NULL, NULL, ®_decodebin_parser);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_MPEG1Splitter, mpeg_splitterW, NULL, NULL, NULL, ®_mpeg_splitter);
|
||||
IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, wave_parserW, NULL, NULL, NULL, ®_wave_parser);
|
||||
|
||||
|
@ -387,7 +387,7 @@ HRESULT WINAPI DllUnregisterServer(void)
|
|||
return hr;
|
||||
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_AviSplitter);
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_Gstreamer_Splitter);
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_decodebin_parser);
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_MPEG1Splitter);
|
||||
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_WAVEParser);
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ coclass MPEG1Splitter {}
|
|||
coclass WAVEParser {}
|
||||
|
||||
[
|
||||
helpstring("GStreamer splitter"),
|
||||
helpstring("GStreamer parser using decodebin"),
|
||||
threading(both),
|
||||
uuid(f9d8d64e-a144-47dc-8ee0-f53498372c29)
|
||||
]
|
||||
coclass Gstreamer_Splitter {}
|
||||
coclass decodebin_parser {}
|
||||
|
||||
[
|
||||
threading(both),
|
||||
|
|
Loading…
Reference in New Issue