initial checkin
[platform/upstream/gstreamer.git] / gst / elements / gstesdsink.h
1 /* Gnome-Streamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20
21 #ifndef __GST_ESDSINK_H__
22 #define __GST_ESDSINK_H__
23
24
25 #include <gst/gstfilter.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30
31
32 #define GST_TYPE_ESDSINK \
33   (gst_esdsink_get_type())
34 #define GST_ESDSINK(obj) \
35   (GTK_CHECK_CAST((obj),GST_TYPE_ESDSINK,GstEsdSink))
36 #define GST_ESDSINK_CLASS(klass) \
37   (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_ESDSINK,GstEsdSinkClass))
38 #define GST_IS_ESDSINK(obj) \
39   (GTK_CHECK_TYPE((obj),GST_TYPE_ESDSINK))
40 #define GST_IS_ESDSINK_CLASS(obj) \
41   (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK)))
42
43 typedef struct _GstEsdSink GstEsdSink;
44 typedef struct _GstEsdSinkClass GstEsdSinkClass;
45
46 struct _GstEsdSink {
47   GstFilter filter;
48
49   GstPad *sinkpad;
50
51   /* soundcard state */
52   
53   int fd;
54   gint format;
55   gint channels;
56   gint frequency;
57 };
58
59 struct _GstEsdSinkClass {
60   GstFilterClass parent_class;
61
62   /* signals */
63   void (*handoff) (GstElement *element,GstPad *pad);
64 };
65
66 GtkType gst_esdsink_get_type(void);
67 GstElement *gst_esdsink_new(gchar *name);
68 void gst_esdsink_chain(GstPad *pad,GstBuffer *buf);
69
70 void gst_esdsink_sync_parms(GstEsdSink *esdsink);
71
72 void gst_esdsink_set_format(GstEsdSink *esdsink,gint format);
73 void gst_esdsink_set_channels(GstEsdSink *esdsink,gint channels);
74 void gst_esdsink_set_frequency(GstEsdSink *esdsink,gint frequency);
75
76 #ifdef __cplusplus
77 }
78 #endif /* __cplusplus */
79
80
81 #endif /* __GST_ESDSINK_H__ */