Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 1 | /* GStreamer |
| 2 | * Copyright (C) 2007 Sebastien Moutte <sebastien@moutte.net> |
| 3 | * |
| 4 | * gstdshowaudiosrc.h: |
| 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 |
Tim-Philipp Müller | 9e1b75f | 2012-11-03 20:38:00 +0000 | [diff] [blame] | 18 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 19 | * Boston, MA 02110-1301, USA. |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | |
| 23 | #ifndef __GST_DSHOWAUDIOSRC_H__ |
| 24 | #define __GST_DSHOWAUDIOSRC_H__ |
| 25 | |
| 26 | #include <gst/gst.h> |
| 27 | #include <gst/audio/gstaudiosrc.h> |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 28 | |
Julien Isorce | 30469d4 | 2009-07-21 10:49:37 +0200 | [diff] [blame] | 29 | #include "gstdshow.h" |
Julien Isorce | dabb692 | 2009-07-27 14:52:57 +0200 | [diff] [blame] | 30 | #include "gstdshowfakesink.h" |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 31 | |
| 32 | G_BEGIN_DECLS |
| 33 | #define GST_TYPE_DSHOWAUDIOSRC (gst_dshowaudiosrc_get_type()) |
| 34 | #define GST_DSHOWAUDIOSRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DSHOWAUDIOSRC,GstDshowAudioSrc)) |
| 35 | #define GST_DSHOWAUDIOSRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DSHOWAUDIOSRC,GstDshowAudioSrcClass)) |
| 36 | #define GST_IS_DSHOWAUDIOSRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DSHOWAUDIOSRC)) |
| 37 | #define GST_IS_DSHOWAUDIOSRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DSHOWAUDIOSRC)) |
| 38 | typedef struct _GstDshowAudioSrc GstDshowAudioSrc; |
| 39 | typedef struct _GstDshowAudioSrcClass GstDshowAudioSrcClass; |
| 40 | |
| 41 | struct _GstDshowAudioSrc |
| 42 | { |
| 43 | GstAudioSrc src; |
| 44 | |
| 45 | /* device dshow reference (generally classid/name) */ |
| 46 | gchar *device; |
| 47 | |
| 48 | /* device friendly name */ |
| 49 | gchar *device_name; |
| 50 | |
| 51 | /* list of caps created from the list of supported media types of the dshow capture filter */ |
| 52 | GstCaps *caps; |
| 53 | |
| 54 | /* list of dshow media types filter's pins mediatypes */ |
| 55 | GList *pins_mediatypes; |
| 56 | |
| 57 | /* dshow audio capture filter */ |
| 58 | IBaseFilter *audio_cap_filter; |
| 59 | |
| 60 | /* dshow fakesink filter */ |
Julien Isorce | dabb692 | 2009-07-27 14:52:57 +0200 | [diff] [blame] | 61 | CDshowFakeSink *dshow_fakesink; |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 62 | |
| 63 | /* graph manager interfaces */ |
| 64 | IMediaFilter *media_filter; |
| 65 | IFilterGraph *filter_graph; |
| 66 | |
Julien Isorce | 0518509 | 2009-09-07 10:59:53 +0200 | [diff] [blame] | 67 | /* bytes array */ |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 68 | GByteArray *gbarray; |
Jerome Laheurte | 4f60ecd | 2014-09-17 12:24:39 +0200 | [diff] [blame] | 69 | GMutex gbarray_lock; |
Sébastien Moutte | 0a0c136 | 2007-05-23 22:44:12 +0000 | [diff] [blame] | 70 | |
| 71 | gboolean is_running; |
| 72 | }; |
| 73 | |
| 74 | struct _GstDshowAudioSrcClass |
| 75 | { |
| 76 | GstAudioSrcClass parent_class; |
| 77 | }; |
| 78 | |
| 79 | GType gst_dshowaudiosrc_get_type (void); |
| 80 | |
| 81 | G_END_DECLS |
| 82 | #endif /* __GST_DSHOWAUDIOSRC_H__ */ |