Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / dshowdecwrapper / gstdshowutil.h
1 /* GStreamer
2  * Copyright <2006, 2007, 2008, 2009, 2010> Fluendo <support@fluendo.com>
3  * Copyright (C) 2007 Sebastien Moutte <sebastien@moutte.net>
4  *
5  * gstdshow.h:
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
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  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #ifndef _GST_DSHOW_UTIL_H_
24 #define _GST_DSHOW_UTIL_H_
25
26 #include <windows.h>
27 #include <tchar.h>
28 #include <comdef.h>
29 #include <objbase.h>
30 #include <dshow.h>
31 #include <Rpc.h>
32 #include <streams.h>
33 #include <strmif.h>
34
35 #include <glib.h>
36
37 _COM_SMARTPTR_TYPEDEF(IBaseFilter, __uuidof(IBaseFilter));
38 _COM_SMARTPTR_TYPEDEF(IFilterGraph, __uuidof(IFilterGraph));
39 _COM_SMARTPTR_TYPEDEF(IFilterMapper2, __uuidof(IFilterMapper2));
40 _COM_SMARTPTR_TYPEDEF(IEnumMediaTypes, __uuidof(IEnumMediaTypes));
41 _COM_SMARTPTR_TYPEDEF(IEnumMoniker, __uuidof(IEnumMoniker));
42 _COM_SMARTPTR_TYPEDEF(IEnumPins, __uuidof(IEnumPins));
43 _COM_SMARTPTR_TYPEDEF(IMediaFilter, __uuidof(IMediaFilter));
44 _COM_SMARTPTR_TYPEDEF(IMoniker, __uuidof(IMoniker));
45 _COM_SMARTPTR_TYPEDEF(IPin, __uuidof(IPin));
46
47 typedef struct {
48   const GUID *filter_guid;  /* The filter GUID, or DMO GUID */
49   const GUID *dmo_category; /* If non-NULL, the filter is a DMO of this
50                                category */
51 } PreferredFilter;
52
53 /* get a pin from directshow filter */
54 IPin *gst_dshow_get_pin_from_filter (IBaseFilter *filter, PIN_DIRECTION pindir);
55
56 /* find and return a filter according to the input and output types */
57 IBaseFilter * 
58 gst_dshow_find_filter(CLSID input_majortype, CLSID input_subtype, 
59                       CLSID output_majortype, CLSID output_subtype, 
60                       PreferredFilter *preferred_filters);
61
62 #define DSHOW_CODEC_QDATA g_quark_from_string ("dshow-codec")
63
64 #endif /* _GST_DSHOW_UTIL_H_ */