dynudpsink: return FLUSHING when sendto got canceled, not an error
[platform/upstream/gst-plugins-good.git] / gst / udp / gstudpsrc.h
index 97ef7a2..c631e35 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 
 
 #include <gst/gst.h>
 #include <gst/base/gstpushsrc.h>
+#include <gio/gio.h>
 
 G_BEGIN_DECLS
 
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-
 #include "gstudpnetutils.h"
 
-#include "gstudp.h"
-
 #define GST_TYPE_UDPSRC \
   (gst_udpsrc_get_type())
 #define GST_UDPSRC(obj) \
@@ -44,6 +39,7 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_UDPSRC))
 #define GST_IS_UDPSRC_CLASS(klass) \
   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSRC))
+#define GST_UDPSRC_CAST(obj) ((GstUDPSrc *)(obj))
 
 typedef struct _GstUDPSrc GstUDPSrc;
 typedef struct _GstUDPSrcClass GstUDPSrcClass;
@@ -51,19 +47,27 @@ typedef struct _GstUDPSrcClass GstUDPSrcClass;
 struct _GstUDPSrc {
   GstPushSrc parent;
 
-  gchar *uri;
-  int port;
-
-  gchar *multi_group;
-  gint ttl;
-
-  int sock;
-  int control_sock[2];
-
-  struct sockaddr_in myaddr;
-  struct ip_mreq multi_addr;
-
-  GstCaps *caps;
+  /* properties */
+  gchar     *address;
+  gint       port;
+  gchar     *multi_iface;
+  gint       ttl;
+  GstCaps   *caps;
+  gint       buffer_size;
+  guint64    timeout;
+  gint       skip_first_bytes;
+  GSocket   *socket;
+  gboolean   close_socket;
+  gboolean   auto_multicast;
+  gboolean   reuse;
+
+  /* our sockets */
+  GSocket   *used_socket;
+  GCancellable *cancellable;
+  GInetSocketAddress *addr;
+  gboolean   external_socket;
+
+  gchar     *uri;
 };
 
 struct _GstUDPSrcClass {