g_param_spec_enum ("control", "control", "The type of control",
GST_TYPE_UDPSINK_CONTROL, CONTROL_UDP, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, ARG_MTU,
- g_param_spec_int ("mtu", "mtu", "mtu", G_MININT, G_MAXINT,
+ g_param_spec_int ("mtu", "mtu", "maximun transmit unit", G_MININT, G_MAXINT,
0, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_udpsink_set_property;
perror("sending");
return GST_PAD_LINK_REFUSED;
}
-
close (fd);
break;
case CONTROL_TCP:
xmlDocDump(f, doc);
fclose (f);
close (fd);
-
break;
case CONTROL_NONE:
return GST_PAD_LINK_OK;
gst_udpsink_chain (GstPad *pad, GstBuffer *buf)
{
GstUDPSink *udpsink;
- guint tolen;
- /*guint tolen, i;*/
+ guint tolen, i;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
tolen = sizeof(udpsink->theiraddr);
+ /*
if (sendto (udpsink->sock, GST_BUFFER_DATA (buf),
GST_BUFFER_SIZE (buf), 0, (struct sockaddr *) &udpsink->theiraddr,
tolen) == -1) {
perror("sending");
}
-
- /*for (i = 0; i < GST_BUFFER_SIZE (buf); i += udpsink->mtu) {
+*/
+ /* MTU */
+ for (i = 0; i < GST_BUFFER_SIZE (buf); i += udpsink->mtu) {
if (GST_BUFFER_SIZE (buf) - i > udpsink->mtu) {
if (sendto (udpsink->sock, GST_BUFFER_DATA (buf) + i,
udpsink->mtu, 0, (struct sockaddr *) &udpsink->theiraddr,
perror("sending");
}
}
- }*/
+ }
gst_buffer_unref(buf);
}