/* * WM ASF reader * * Copyright 2020 Jactry Zeng for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "qasf_private.h" WINE_DEFAULT_DEBUG_CHANNEL(qasf); struct asf_reader { struct strmbase_filter filter; }; static inline struct asf_reader *impl_reader_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, struct asf_reader, filter); } static struct strmbase_pin *asf_reader_get_pin(struct strmbase_filter *iface, unsigned int index) { return NULL; } static void asf_reader_destroy(struct strmbase_filter *iface) { struct asf_reader *filter = impl_reader_from_strmbase_filter(iface); strmbase_filter_cleanup(&filter->filter); free(filter); } static struct strmbase_filter_ops filter_ops = { .filter_get_pin = asf_reader_get_pin, .filter_destroy = asf_reader_destroy, }; HRESULT asf_reader_create(IUnknown *outer, IUnknown **out) { struct asf_reader *object; if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; strmbase_filter_init(&object->filter, outer, &CLSID_WMAsfReader, &filter_ops); TRACE("Created WM ASF reader %p.\n", object); *out = &object->filter.IUnknown_inner; return S_OK; }