*
* 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) \
(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;
GstPushSrc parent;
/* properties */
- gchar *uri;
- int port;
- gchar *multi_group;
- gint ttl;
- GstCaps *caps;
- gint buffer_size;
- guint64 timeout;
- gint skip_first_bytes;
- int sockfd;
- gboolean closefd;
+ 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 */
- int sock;
- int control_sock[2];
- gboolean externalfd;
+ GSocket *used_socket;
+ GCancellable *cancellable;
+ GInetSocketAddress *addr;
+ gboolean external_socket;
- struct sockaddr_in myaddr;
- struct ip_mreq multi_addr;
+ gchar *uri;
};
struct _GstUDPSrcClass {