summaryrefslogtreecommitdiffstats
path: root/gst/udp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-07-27 10:05:27 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-07-27 10:05:27 +0000
commit538e3ef6000530d492942c56eceb1c799e512288 (patch)
treee3b12b92d9bd12e3edb34f8484588ecf0d6e4373 /gst/udp
parent3deb7ad298b4a8f03f16e3feb03d827029736717 (diff)
gst/udp/gstudpsrc.*: Rename "buffer" to "buffer-size" to make clear it is a size we set and not some sort of feature ...
Original commit message from CVS: * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init), (gst_udpsrc_set_property), (gst_udpsrc_get_property), (gst_udpsrc_start): * gst/udp/gstudpsrc.h: Rename "buffer" to "buffer-size" to make clear it is a size we set and not some sort of feature we enable.
Diffstat (limited to 'gst/udp')
-rw-r--r--gst/udp/gstudpsrc.c27
-rw-r--r--gst/udp/gstudpsrc.h2
2 files changed, 14 insertions, 15 deletions
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index e56dafd8..2a60ac21 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -133,7 +133,7 @@ GST_ELEMENT_DETAILS ("UDP packet receiver",
#define UDP_DEFAULT_PORT 4951
#define UDP_DEFAULT_MULTICAST_GROUP "0.0.0.0"
-#define UDP_DEFAULT_BUFFER 0
+#define UDP_DEFAULT_BUFFER_SIZE 0
#define UDP_DEFAULT_URI "udp://"UDP_DEFAULT_MULTICAST_GROUP":"G_STRINGIFY(UDP_DEFAULT_PORT)
#define UDP_DEFAULT_CAPS NULL
#define UDP_DEFAULT_SOCKFD -1
@@ -146,8 +146,7 @@ enum
PROP_URI,
PROP_CAPS,
PROP_SOCKFD,
- PROP_BUFFER
- /* FILL ME */
+ PROP_BUFFER_SIZE
};
static void gst_udpsrc_uri_handler_init (gpointer g_iface, gpointer iface_data);
@@ -224,10 +223,10 @@ gst_udpsrc_class_init (GstUDPSrcClass * klass)
g_param_spec_int ("sockfd", "Socket Handle",
"Socket to use for UDP reception. (-1 == allocate)",
-1, G_MAXINT, UDP_DEFAULT_SOCKFD, G_PARAM_READWRITE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFER,
- g_param_spec_int ("buffer", "Buffer",
- "Number of bytes of the UDP Buffer, 0=default", 0, G_MAXINT,
- UDP_DEFAULT_BUFFER, G_PARAM_READWRITE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFER_SIZE,
+ g_param_spec_int ("buffer-size", "Buffer Size",
+ "Size of the kernel receive buffer in bytes, 0=default", 0, G_MAXINT,
+ UDP_DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE));
gstbasesrc_class->start = gst_udpsrc_start;
gstbasesrc_class->stop = gst_udpsrc_stop;
@@ -247,7 +246,7 @@ gst_udpsrc_init (GstUDPSrc * udpsrc, GstUDPSrcClass * g_class)
udpsrc->sock = UDP_DEFAULT_SOCKFD;
udpsrc->multi_group = g_strdup (UDP_DEFAULT_MULTICAST_GROUP);
udpsrc->uri = g_strdup (UDP_DEFAULT_URI);
- udpsrc->buffer = UDP_DEFAULT_BUFFER;
+ udpsrc->buffer_size = UDP_DEFAULT_BUFFER_SIZE;
}
static GstCaps *
@@ -473,8 +472,8 @@ gst_udpsrc_set_property (GObject * object, guint prop_id, const GValue * value,
GstUDPSrc *udpsrc = GST_UDPSRC (object);
switch (prop_id) {
- case PROP_BUFFER:
- udpsrc->buffer = g_value_get_int (value);
+ case PROP_BUFFER_SIZE:
+ udpsrc->buffer_size = g_value_get_int (value);
break;
case PROP_PORT:
udpsrc->port = g_value_get_int (value);
@@ -527,8 +526,8 @@ gst_udpsrc_get_property (GObject * object, guint prop_id, GValue * value,
GstUDPSrc *udpsrc = GST_UDPSRC (object);
switch (prop_id) {
- case PROP_BUFFER:
- g_value_set_int (value, udpsrc->buffer);
+ case PROP_BUFFER_SIZE:
+ g_value_set_int (value, udpsrc->buffer_size);
break;
case PROP_PORT:
g_value_set_int (value, udpsrc->port);
@@ -621,8 +620,8 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
goto getsockname_error;
len = sizeof (rcvsize);
- if (src->buffer != 0) {
- rcvsize = src->buffer;
+ if (src->buffer_size != 0) {
+ rcvsize = src->buffer_size;
GST_DEBUG_OBJECT (src, "setting udp buffer of %d bytes", rcvsize);
/* set buffer size, Note that on Linux this is typically limited to a
diff --git a/gst/udp/gstudpsrc.h b/gst/udp/gstudpsrc.h
index 17c4421e..4b0b152b 100644
--- a/gst/udp/gstudpsrc.h
+++ b/gst/udp/gstudpsrc.h
@@ -56,7 +56,7 @@ struct _GstUDPSrc {
int port;
gchar *multi_group;
gint ttl;
- gint buffer;
+ gint buffer_size;
int sock;
int control_sock[2];