mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
3deb7ad298
commit
538e3ef600
3 changed files with 25 additions and 17 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,12 @@
|
|||
2006-07-27 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2006-07-27 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
|
||||
|
@ -12,10 +21,10 @@
|
|||
(gst_udpsrc_create), (gst_udpsrc_set_property),
|
||||
(gst_udpsrc_get_property), (gst_udpsrc_start):
|
||||
* gst/udp/gstudpsrc.h:
|
||||
Added "buffer" property to control the kernel receive buffer size.
|
||||
Added "buffer-size" property to control the kernel receive buffer size.
|
||||
Update documentation.
|
||||
Small cleanups. Fixes #348752.
|
||||
API: buffer property
|
||||
API: buffer-size property
|
||||
|
||||
2006-07-26 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -56,7 +56,7 @@ struct _GstUDPSrc {
|
|||
int port;
|
||||
gchar *multi_group;
|
||||
gint ttl;
|
||||
gint buffer;
|
||||
gint buffer_size;
|
||||
|
||||
int sock;
|
||||
int control_sock[2];
|
||||
|
|
Loading…
Reference in a new issue