mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
gst/udp/gstmultiudpsink.*: Add a fixme for the auto-multicast property.
Original commit message from CVS: * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init), (gst_multiudpsink_setup_qos_dscp), (gst_multiudpsink_add_internal): * gst/udp/gstmultiudpsink.h: Add a fixme for the auto-multicast property. Fix some confusing debug messages. Disable setting a qos value by default.
This commit is contained in:
parent
9d494db510
commit
7e120f5dac
4 changed files with 35 additions and 15 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,12 @@
|
|||
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init),
|
||||
(gst_multiudpsink_setup_qos_dscp), (gst_multiudpsink_add_internal):
|
||||
* gst/udp/gstmultiudpsink.h:
|
||||
Add a fixme for the auto-multicast property.
|
||||
Fix some confusing debug messages.
|
||||
Disable setting a qos value by default.
|
||||
|
||||
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
Patch by: Gustaf Räntilä <g dot rantila at gmail dot com>
|
||||
|
@ -14,7 +23,7 @@
|
|||
(gst_multiudpsink_set_property), (gst_multiudpsink_get_property),
|
||||
(gst_multiudpsink_init_send), (gst_multiudpsink_add_internal):
|
||||
* gst/udp/gstmultiudpsink.h:
|
||||
Add qos-dscp property to manage the Quality of service.
|
||||
Add qos-dscp property to manage the Quality of service. Fixes #469917.
|
||||
|
||||
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit e365978c480a8fffa4bdb61568fb2cd989d1b197
|
||||
Subproject commit d0749502b0e891038593866f619a75305367b409
|
|
@ -80,10 +80,13 @@ enum
|
|||
#define DEFAULT_CLOSEFD TRUE
|
||||
#define DEFAULT_SOCK -1
|
||||
#define DEFAULT_CLIENTS NULL
|
||||
/* FIXME, this should be disabled by default, we don't need to join a multicast
|
||||
* group for sending, if this socket is also used for receiving, it should
|
||||
* be configured in the element that does the receive. */
|
||||
#define DEFAULT_AUTO_MULTICAST TRUE
|
||||
#define DEFAULT_TTL 64
|
||||
#define DEFAULT_LOOP TRUE
|
||||
#define DEFAULT_QOS_DSCP 0
|
||||
#define DEFAULT_QOS_DSCP -1
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -307,9 +310,9 @@ gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass)
|
|||
"Used for setting the multicast loop parameter. TRUE = enable,"
|
||||
" FALSE = disable", DEFAULT_LOOP, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_QOS_DSCP,
|
||||
g_param_spec_uint ("qos-dscp", "QoS diff srv code point",
|
||||
"Quality of Service, differentiated services code point", 0, 63,
|
||||
DEFAULT_QOS_DSCP, G_PARAM_READWRITE));
|
||||
g_param_spec_int ("qos-dscp", "QoS diff srv code point",
|
||||
"Quality of Service, differentiated services code point (-1 default)",
|
||||
-1, 63, DEFAULT_QOS_DSCP, G_PARAM_READWRITE));
|
||||
|
||||
gstelement_class->change_state = gst_multiudpsink_change_state;
|
||||
|
||||
|
@ -481,6 +484,10 @@ gst_multiudpsink_setup_qos_dscp (GstMultiUDPSink * sink)
|
|||
{
|
||||
gint tos;
|
||||
|
||||
/* don't touch on -1 */
|
||||
if (sink->qos_dscp < 0)
|
||||
return;
|
||||
|
||||
if (sink->sock < 0)
|
||||
return;
|
||||
|
||||
|
@ -667,15 +674,19 @@ gst_multiudpsink_add_internal (GstMultiUDPSink * sink, const gchar * host,
|
|||
g_get_current_time (&now);
|
||||
client->connect_time = GST_TIMEVAL_TO_TIME (now);
|
||||
|
||||
if (*client->sock > 0) {
|
||||
/* check if its a multicast address */
|
||||
if (*client->sock > 0 && gst_udp_is_multicast (&client->theiraddr) &&
|
||||
sink->auto_multicast) {
|
||||
if (gst_udp_is_multicast (&client->theiraddr)) {
|
||||
GST_DEBUG_OBJECT (sink, "multicast address detected");
|
||||
if (sink->auto_multicast) {
|
||||
GST_DEBUG_OBJECT (sink, "joining multicast group");
|
||||
gst_udp_join_group (*(client->sock), sink->loop, sink->ttl,
|
||||
&client->theiraddr);
|
||||
}
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (sink, "normal address detected");
|
||||
}
|
||||
}
|
||||
|
||||
if (lock)
|
||||
g_mutex_lock (sink->client_lock);
|
||||
|
|
|
@ -73,7 +73,7 @@ struct _GstMultiUDPSink {
|
|||
gboolean auto_multicast;
|
||||
gint ttl;
|
||||
gboolean loop;
|
||||
guint qos_dscp;
|
||||
gint qos_dscp;
|
||||
};
|
||||
|
||||
struct _GstMultiUDPSinkClass {
|
||||
|
|
Loading…
Reference in a new issue