From ccddfc5da7afbd4475093a3b77231ed42911e5c8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 13 Jun 2008 11:54:05 +0000 Subject: gst/udp/gstudpsrc.*: Add property to control automatic join/leave of multicast groups. Original commit message from CVS: * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init), (gst_udpsrc_create), (gst_udpsrc_set_property), (gst_udpsrc_get_property), (gst_udpsrc_start), (gst_udpsrc_stop): * gst/udp/gstudpsrc.h: Add property to control automatic join/leave of multicast groups. Add G_LIKELY. Remove setting caps on buffers explicitly, basesrc does that for us now. Improve debug info. Convert some non-fatal error into warnings. Use g_ntohs for better portability. Leave multicast groups when stopping. When using external sockets, use getsockname() on them to fill up the addr structure before calling methods that use the structure. Should all fix #536903. API: GstUDPSrc::auto-multicast property --- gst/udp/gstudpsrc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gst/udp/gstudpsrc.h') diff --git a/gst/udp/gstudpsrc.h b/gst/udp/gstudpsrc.h index 597a6a70..cdf7b35e 100644 --- a/gst/udp/gstudpsrc.h +++ b/gst/udp/gstudpsrc.h @@ -44,6 +44,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; @@ -62,6 +63,7 @@ struct _GstUDPSrc { gint skip_first_bytes; int sockfd; gboolean closefd; + gboolean auto_multicast; /* our sockets */ GstPollFD sock; -- cgit