/* GStreamer
- * Copyright (C) <2005> Wim Taymand <wim@fluendo.com>
+ * Copyright (C) <2005> Wim Taymans <wim@fluendo.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
*
* 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.
*/
#ifndef __GST_MULTIUDPSINK_H__
#include <gst/gst.h>
#include <gst/base/gstbasesink.h>
+#include <gio/gio.h>
G_BEGIN_DECLS
#include "gstudpnetutils.h"
-#include "gstudp.h"
#define GST_TYPE_MULTIUDPSINK (gst_multiudpsink_get_type())
#define GST_MULTIUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIUDPSINK,GstMultiUDPSink))
typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass;
typedef struct {
- int *sock;
-
- struct sockaddr_in theiraddr;
- struct ip_mreq multi_addr;
+ gint refcount;
+ GSocketAddress *addr;
gchar *host;
gint port;
struct _GstMultiUDPSink {
GstBaseSink parent;
- int sock;
+ GSocket *used_socket, *used_socket_v6;
+ GCancellable *cancellable;
- GMutex *client_lock;
+ GMutex client_lock;
GList *clients;
+ GOutputVector *vec;
+ GstMapInfo *map;
+
/* properties */
guint64 bytes_to_serve;
guint64 bytes_served;
- int sockfd;
- gboolean closefd;
-
- gboolean externalfd;
+ GSocket *socket, *socket_v6;
+ gboolean close_socket;
+
+ gboolean external_socket;
+
+ gboolean auto_multicast;
+ gchar *multi_iface;
+ gint ttl;
+ gint ttl_mc;
+ gboolean loop;
+ gboolean force_ipv4;
+ gint qos_dscp;
+
+ gboolean send_duplicates;
+ gint buffer_size;
+ gchar *bind_address;
+ gint bind_port;
};
struct _GstMultiUDPSinkClass {
void (*add) (GstMultiUDPSink *sink, const gchar *host, gint port);
void (*remove) (GstMultiUDPSink *sink, const gchar *host, gint port);
void (*clear) (GstMultiUDPSink *sink);
- GValueArray* (*get_stats) (GstMultiUDPSink *sink, const gchar *host, gint port);
+ GstStructure* (*get_stats) (GstMultiUDPSink *sink, const gchar *host, gint port);
/* signals */
void (*client_added) (GstElement *element, const gchar *host, gint port);
void gst_multiudpsink_add (GstMultiUDPSink *sink, const gchar *host, gint port);
void gst_multiudpsink_remove (GstMultiUDPSink *sink, const gchar *host, gint port);
void gst_multiudpsink_clear (GstMultiUDPSink *sink);
-GValueArray* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port);
+GstStructure* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port);
G_END_DECLS