Remove all config.h includes from header files, add it to each source file and remove...
[platform/upstream/gst-plugins-good.git] / gst / udp / gstudpsrc.h
1 /* GStreamer
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_UDPSRC_H__
22 #define __GST_UDPSRC_H__
23
24 #include <gst/gst.h>
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
30 #include <errno.h>
31 #include <string.h>
32 #include <sys/types.h>
33 #include <netdb.h>
34 #include <sys/socket.h>
35 #include <netinet/in.h>
36 #include <arpa/inet.h>
37
38 #include <fcntl.h>
39 #include "gstudp.h"
40
41 #define GST_TYPE_UDPSRC \
42   (gst_udpsrc_get_type())
43 #define GST_UDPSRC(obj) \
44   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_UDPSRC,GstUDPSrc))
45 #define GST_UDPSRC_CLASS(klass) \
46   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_UDPSRC,GstUDPSrc))
47 #define GST_IS_UDPSRC(obj) \
48   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_UDPSRC))
49 #define GST_IS_UDPSRC_CLASS(obj) \
50   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSRC))
51
52 typedef struct _GstUDPSrc GstUDPSrc;
53 typedef struct _GstUDPSrcClass GstUDPSrcClass;
54
55 typedef enum {
56   GST_UDPSRC_OPEN             = GST_ELEMENT_FLAG_LAST,
57
58   GST_UDPSRC_FLAG_LAST        = GST_ELEMENT_FLAG_LAST + 2,
59 } GstUDPSrcFlags;
60
61 struct _GstUDPSrc {
62   GstElement element;
63
64   /* pads */
65   GstPad *sinkpad,*srcpad;
66
67   int port;
68   int sock;
69   int control_sock;
70   Gst_UDP_Control control;
71   gchar *multi_group;
72
73   struct sockaddr_in myaddr;
74   struct ip_mreq multi_addr;
75   GstClock *clock;
76
77   gboolean first_buf;
78 };
79
80 struct _GstUDPSrcClass {
81   GstElementClass parent_class;
82 };
83
84 GType gst_udpsrc_get_type(void);
85
86
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90
91
92 #endif /* __GST_UDPSRC_H__ */