• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 2018 Joshua M. Doe <oss@nvl.army.mil>
3  *
4  * dshowdeviceprovider.h: DirectShow device probing
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 
23 #ifndef __GST_DSHOW_DEVICE_PROVIDER_H__
24 #define __GST_DSHOW_DEVICE_PROVIDER_H__
25 
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29 
30 #include <gst/gst.h>
31 
32 G_BEGIN_DECLS
33 
34 typedef struct _GstDshowDeviceProvider GstDshowDeviceProvider;
35 typedef struct _GstDshowDeviceProviderPrivate GstDshowDeviceProviderPrivate;
36 typedef struct _GstDshowDeviceProviderClass GstDshowDeviceProviderClass;
37 
38 #define GST_TYPE_DSHOW_DEVICE_PROVIDER                 (gst_dshow_device_provider_get_type())
39 #define GST_IS_DSHOW_DEVICE_PROVIDER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DSHOW_DEVICE_PROVIDER))
40 #define GST_IS_DSHOW_DEVICE_PROVIDER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DSHOW_DEVICE_PROVIDER))
41 #define GST_DSHOW_DEVICE_PROVIDER_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DSHOW_DEVICE_PROVIDER, GstDshowDeviceProviderClass))
42 #define GST_DSHOW_DEVICE_PROVIDER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DSHOW_DEVICE_PROVIDER, GstDshowDeviceProvider))
43 #define GST_DSHOW_DEVICE_PROVIDER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE_PROVIDER, GstDshowDeviceProviderClass))
44 #define GST_DSHOW_DEVICE_PROVIDER_CAST(obj)            ((GstDshowDeviceProvider *)(obj))
45 
46 struct _GstDshowDeviceProvider {
47   GstDeviceProvider parent;
48 };
49 
50 typedef enum {
51   GST_DSHOW_DEVICE_TYPE_INVALID = 0,
52   GST_DSHOW_DEVICE_TYPE_VIDEO_SOURCE,
53   GST_DSHOW_DEVICE_TYPE_AUDIO_SOURCE,
54 } GstDshowDeviceType;
55 
56 struct _GstDshowDeviceProviderClass {
57   GstDeviceProviderClass    parent_class;
58 };
59 
60 GType gst_dshow_device_provider_get_type (void);
61 
62 
63 typedef struct _GstDshowDevice GstDshowDevice;
64 typedef struct _GstDshowDevicePrivate GstDshowDevicePrivate;
65 typedef struct _GstDshowDeviceClass GstDshowDeviceClass;
66 
67 #define GST_TYPE_DSHOW_DEVICE                 (gst_dshow_device_get_type())
68 #define GST_IS_DSHOW_DEVICE(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DSHOW_DEVICE))
69 #define GST_IS_DSHOW_DEVICE_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DSHOW_DEVICE))
70 #define GST_DSHOW_DEVICE_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DSHOW_DEVICE, GstDshowDeviceClass))
71 #define GST_DSHOW_DEVICE(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DSHOW_DEVICE, GstDshowDevice))
72 #define GST_DSHOW_DEVICE_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DEVICE, GstDshowDeviceClass))
73 #define GST_DSHOW_DEVICE_CAST(obj)            ((GstDshowDevice *)(obj))
74 
75 struct _GstDshowDevice {
76   GstDevice         parent;
77 
78   GstDshowDeviceType   type;
79   guint             device_index;
80   gchar            *device;
81   gchar            *device_name;
82   const gchar      *element;
83 };
84 
85 struct _GstDshowDeviceClass {
86   GstDeviceClass    parent_class;
87 };
88 
89 GType gst_dshow_device_get_type (void);
90 
91 G_END_DECLS
92 
93 #endif /* __GST_DSHOW_DEVICE_PROVIDER_H__ */
94