2 * Copyright 2017 Fabian Maurer
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/debug.h"
26 #include "evr_private.h"
28 #include "wine/strmbase.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(evr
);
40 static const IBaseFilterVtbl basefilter_vtbl
=
42 BaseFilterImpl_QueryInterface
,
43 BaseFilterImpl_AddRef
,
44 BaseFilterImpl_Release
,
45 BaseFilterImpl_GetClassID
,
46 BaseRendererImpl_Stop
,
47 BaseRendererImpl_Pause
,
49 BaseRendererImpl_GetState
,
50 BaseRendererImpl_SetSyncSource
,
51 BaseFilterImpl_GetSyncSource
,
52 BaseFilterImpl_EnumPins
,
53 BaseFilterImpl_FindPin
,
54 BaseFilterImpl_QueryFilterInfo
,
55 BaseFilterImpl_JoinFilterGraph
,
56 BaseFilterImpl_QueryVendorInfo
59 static inline evr_filter
*impl_from_BaseFilter(BaseFilter
*iface
)
61 return CONTAINING_RECORD(iface
, evr_filter
, filter
);
64 static IPin
*evr_get_pin(BaseFilter
*iface
, unsigned int index
)
66 FIXME("iface %p, index %u, stub!\n", iface
, index
);
70 static void evr_destroy(BaseFilter
*iface
)
72 evr_filter
*filter
= impl_from_BaseFilter(iface
);
74 strmbase_filter_cleanup(&filter
->filter
);
75 CoTaskMemFree(filter
);
78 static const BaseFilterFuncTable basefilter_functable
=
80 .filter_get_pin
= evr_get_pin
,
81 .filter_destroy
= evr_destroy
,
84 HRESULT
evr_filter_create(IUnknown
*outer
, void **out
)
90 object
= CoTaskMemAlloc(sizeof(evr_filter
));
94 strmbase_filter_init(&object
->filter
, &basefilter_vtbl
, outer
, &CLSID_EnhancedVideoRenderer
,
95 (DWORD_PTR
)(__FILE__
": EVR.csFilter"), &basefilter_functable
);
97 *out
= &object
->filter
.IUnknown_inner
;