vbscript: Handle index read access to array properties.
[wine.git] / dlls / qedit / nullrenderer.c
blob87ef14240cd52d2abb764affd6c2f33ed702153e
1 /*
2 * Null renderer filter
4 * Copyright 2004 Christian Costa
5 * Copyright 2008 Maarten Lankhorst
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #define COBJMACROS
23 #include "dshow.h"
24 #include "wine/debug.h"
25 #include "wine/strmbase.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
29 struct null_renderer
31 struct strmbase_renderer renderer;
34 static struct null_renderer *impl_from_strmbase_renderer(struct strmbase_renderer *iface)
36 return CONTAINING_RECORD(iface, struct null_renderer, renderer);
39 static HRESULT null_renderer_render(struct strmbase_renderer *iface, IMediaSample *sample)
41 return S_OK;
44 static HRESULT null_renderer_query_accept(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt)
46 return S_OK;
49 static void null_renderer_destroy(struct strmbase_renderer *iface)
51 struct null_renderer *filter = impl_from_strmbase_renderer(iface);
53 strmbase_renderer_cleanup(&filter->renderer);
54 free(filter);
57 static const struct strmbase_renderer_ops renderer_ops =
59 .renderer_query_accept = null_renderer_query_accept,
60 .renderer_render = null_renderer_render,
61 .renderer_destroy = null_renderer_destroy,
64 HRESULT null_renderer_create(IUnknown *outer, IUnknown **out)
66 struct null_renderer *object;
68 if (!(object = calloc(1, sizeof(*object))))
69 return E_OUTOFMEMORY;
71 strmbase_renderer_init(&object->renderer, outer, &CLSID_NullRenderer, L"In", &renderer_ops);
73 TRACE("Created null renderer %p.\n", object);
74 *out = &object->renderer.filter.IUnknown_inner;
75 return S_OK;