Commit graph

118 commits

Author SHA1 Message Date
Vincent Penquerc'h
c0e101e93f various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:30:27 +00:00
Thijs Vermeir
cdc3b20ba9 udpsrc: allow skip-first-bytes of full buffer size 2011-06-01 10:19:31 +02:00
Stefan Kost
18213aa214 docs: fix parameter name in udpsrc docs
It is "buffer-size" and not "buffer". Also trim trailing whitespace.
2011-02-04 12:34:08 +02:00
Mark Nauwelaerts
7def8c9b98 udp: use socklen_t where appropriate rather than custom type
In particular, fixes Cygwin build where socklen_t is defined as int
in line with native win32 api definition.
2011-01-27 16:01:09 +01:00
Stefan Kost
d8167e3071 various (gst): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-13 18:00:28 +03:00
Wim Taymans
e739998adf udpsrc: add property to enable port reuse 2010-08-04 10:39:45 +02:00
Keith Nicholson
0773eed960 udpsrc: fix multicast support on windows builds
On windows builds, sets source address for bind to INADDR_ANY, while
maintaining the original multicast group address for subsequent join.

Fixes #595978
2010-06-18 16:49:08 +02:00
Benjamin Otte
3f511ec361 Add -Wwrite-strings to the configure flags
... and fix all warnings
2010-03-21 14:17:47 +01:00
Benjamin Otte
cccfeaa59c gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 14:32:00 +01:00
Wim Taymans
455f53c896 udp: use uri parsing code
Use the uri parsing helper functions to manage the host and port pairs. This
adds support for IPV6.
2010-03-10 11:21:19 +01:00
Wim Taymans
a0e3bc5997 udpsrc: add debug line for the socket 2009-06-16 15:06:50 +02:00
Wim Taymans
b3782442ae udpsrc: fix getaddrinfo error reporting
getaddrinfo errors should be reported with gai_strerror instead of errno as
spotted by MikeS.
2009-04-27 18:00:17 +02:00
Stefan Kost
ba2c101963 udp: don't use protocol in debug message after freeing 2009-03-31 11:50:41 +03:00
Wim Taymans
0c4f3d4afb udpsrc: convert _ in properties to -
--
2009-03-13 18:32:47 +01:00
Edgar E. Iglesias
469aced581 udpsrc: Add network interface selection
Add network interface selection when joining multicast groups.
Useful when using the udpsrc on multihomed hosts.
Fixes #575234.

API: GstUDPSrc::multicast-iface
2009-03-13 18:28:59 +01:00
Wim Taymans
40bc040064 udpsrc: fix compilation
Fix compilation on systems MSG_ERRQUEUE and IP_RECVERR.
2009-02-25 14:01:26 +01:00
Peter Kjellerstedt
7c56695160 udpsrc: Make sure the sockaddr length used for recvfrom() is big enough.
Previously the sockaddr length used for recvfrom() was calculated as
sizeof (struct sockaddr). However, this is too little to hold an IPv6
address, so the full size of the gst_sockaddr union should be used
instead.
2009-02-25 12:52:37 +01:00
Peter Kjellerstedt
6e5e9edabf udpsrc: Unify the use of union gst_sockaddr. 2009-02-25 12:52:37 +01:00
Jan Schmidt
8588ebd22a udp: Fix strict-aliasing warnings from gcc 4.4.0
Fix strict aliasing warnings by defining a union on the different
sockaddr structs that we need.
2009-02-24 18:19:57 +00:00
Aurelien Grimaud
969622b439 Read ICMP error messages instead of looping
When we are dealing with connected sockets shared between a udpsrc and a udpsink
we might receive ICMP connection refused error messages in udpsrc that will
cause it to go into a bursty loop because the poll returns right away without a
message to read.

Instead of looping, read the error message from the error queue in udpsrc.
Fixes #567857.
2009-02-23 20:49:37 +01:00
Stefan Kost
9cf73bdd8f Update and add documentation for plugins with deps (ext).
Link to properties. Correct titles for examples. Document a few trivial cases. Keep lists in section file and docs/plugins/Makefile.am alphabetically ordered. Fix warnings that gtk-doc points out.
2009-01-28 18:05:09 +02:00
Stefan Kost
a99d3f8769 Update and add documentation for plugins with no deps (gst).
Link to properties. Correct titles for examples. Document a few trivial cases. Keep lists in section file and docs/plugins/Makefile.am alphabetically ordered.
2009-01-28 12:32:59 +02:00
Michael Smith
9b372f1bbd gst/udp/: Fix multiudpsink on OSX by passing the specific length of the socket, refactor that into a function shared ...
Original commit message from CVS:
* gst/udp/gstmultiudpsink.c:
* gst/udp/gstudpnetutils.c:
* gst/udp/gstudpnetutils.h:
* gst/udp/gstudpsrc.c:
Fix multiudpsink on OSX by passing the specific length of the socket,
refactor that into a function shared with the same thing in udpsrc.
2008-11-20 22:56:58 +00:00
Sebastian Dröge
cbec4b2d9d gst/udp/: Fix "argument type mismatch" compiler warnings on Windows.
Original commit message from CVS:
Patch by: <lrn1986 at gmail dot com>
* gst/udp/gstdynudpsink.c: (gst_dynudpsink_render):
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_render):
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Fix "argument type mismatch" compiler warnings on Windows.
Fixes bug #557293.
2008-10-27 08:36:43 +00:00
Wim Taymans
712cd620af gst/udp/gstudpsrc.c: Switch on the socket family to get the addrlen size right.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_class_init),
(gst_udpsrc_set_uri), (gst_udpsrc_start):
Switch on the socket family to get the addrlen size right.
2008-09-25 11:30:35 +00:00
Daniel Franke
edd6239979 gst/udp/gstudpsrc.c: OS X's bind() implementation is picky about its addrlen parameter and fails with EINVAL if it is...
Original commit message from CVS:
Patch by: Daniel Franke <df at dfranke dot us>
* gst/udp/gstudpsrc.c: (gst_udpsrc_create), (gst_udpsrc_start):
OS X's bind() implementation is picky about its addrlen parameter and
fails with EINVAL if it is larger than expected for the socket's address
family. Set the length to the expected length instead. Fixes #553191.
2008-09-25 10:34:39 +00:00
Peter Kjellerstedt
7431491470 gst/udp/: Avoid leaking internally allocated file descriptors when setting custom file descriptors. Fixes #543101.
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj at axis com>
* gst/udp/gstdynudpsink.c: (gst_dynudpsink_init),
(gst_dynudpsink_finalize), (gst_dynudpsink_set_property),
(gst_dynudpsink_init_send), (gst_dynudpsink_close):
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_init),
(gst_multiudpsink_finalize), (gst_multiudpsink_set_property):
* gst/udp/gstudpsrc.c: (gst_udpsrc_finalize),
(gst_udpsrc_set_property):
Avoid leaking internally allocated file descriptors when setting
custom file descriptors. Fixes #543101.
2008-08-20 11:51:38 +00:00
Michael Smith
90fdf92640 gst/goom/: Fix build with MSVC: include glib.h to define inline appropriately, use header guards where needed.
Original commit message from CVS:
* gst/goom/convolve_fx.c:
* gst/goom/filters.c:
* gst/goom/goom_config.h:
* gst/goom/goom_core.c:
* gst/goom/goom_tools.h:
Fix build with MSVC: include glib.h to define inline appropriately,
use header guards where needed.
* gst/udp/gstudpnetutils.c:
* gst/udp/gstudpsrc.c:
Fix build with MSVC: use WSA* constants/functions where appropriate, use
g_snprintf rather than snprintf.
Fixes #544433.
2008-07-23 22:01:20 +00:00
Tero Saarni
cf3286dac7 gst/udp/gstudpsrc.c: Fix parsing of udp:// URIs containing IPv6 addresses.
Original commit message from CVS:
Patch by: Tero Saarni <tero dot saarni at gmail dot com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_set_uri):
Fix parsing of udp:// URIs containing IPv6 addresses.
Fixes bug #541650.
2008-07-05 19:01:28 +00:00
Sebastian Dröge
8ca7dbfae5 gst/udp/gstudpsrc.c: Call getsockname() after the call to bind() to get updated values for the port, etc. This fixes ...
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
Call getsockname() after the call to bind() to get updated values
for the port, etc. This fixes the usage of udpsrc on anonymous
binding and it's usage by rtspsrc. Fixes bugs #539372, #539548.
Thanks to Aurelien Grimaud for pointing out the obvious fix.
2008-06-25 08:12:18 +00:00
Wim Taymans
ccddfc5da7 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
2008-06-13 11:54:05 +00:00
Wim Taymans
e206f74bce gst/udp/: Joining a multicast group and setting the loop/ttl properties are totally unrelated tasks are must be separ...
Original commit message from CVS:
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_init_send),
(gst_multiudpsink_add_internal):
* gst/udp/gstudpnetutils.c: (gst_udp_set_loop_ttl),
(gst_udp_join_group):
* gst/udp/gstudpnetutils.h:
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
Joining a multicast group and setting the loop/ttl properties are
totally unrelated tasks are must be separated.
2008-05-21 17:35:50 +00:00
Bruno Santos
570718c2fe gst/udp/gstudpnetutils.*: Provide a bunch of helper methods to deal with IPv4 and IPv6 transparently.
Original commit message from CVS:
Patch by: Bruno Santos <brunof at ua dot pt>
* gst/udp/gstudpnetutils.c: (gst_udp_get_addr),
(gst_udp_join_group), (gst_udp_leave_group),
(gst_udp_is_multicast):
* gst/udp/gstudpnetutils.h:
Provide a bunch of helper methods to deal with IPv4 and IPv6
transparently.
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init),
(gst_multiudpsink_init), (gst_multiudpsink_set_property),
(gst_multiudpsink_get_property), (join_multicast),
(gst_multiudpsink_init_send), (gst_multiudpsink_add_internal),
(gst_multiudpsink_remove):
* gst/udp/gstmultiudpsink.h:
Add multicast TTL and loopback properties.
Use the helper methods to implement ip4 and ip6.
* gst/udp/gstudpsrc.c: (gst_udpsrc_create), (gst_udpsrc_start):
* gst/udp/gstudpsrc.h:
Use the helper methods to implement ip4 and ip6.
Fixes #515962.
2008-05-21 09:56:02 +00:00
Youness Alaoui
751f2bb364 gst/udp/gstudpsrc.c: Don't error out if we get an ICMP destination-unreachable message when trying to read packets on...
Original commit message from CVS:
Patch by: Youness Alaoui <youness.alaoui at collabora co uk>
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Don't error out if we get an ICMP destination-unreachable
message when trying to read packets on win32 (#529454).
2008-05-01 10:52:11 +00:00
Tim-Philipp Müller
327741a21a gst/: Use GLib versions of htonl, htons, ntohl and ntohs in order to avoid problems on win32 (#529707).
Original commit message from CVS:
* gst/rtp/gstasteriskh263.c: (gst_asteriskh263_chain):
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_add_internal):
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
Use GLib versions of htonl, htons, ntohl and ntohs in order
to avoid problems on win32 (#529707).
2008-04-25 13:31:48 +00:00
Wim Taymans
41e9c150f6 gst/udp/gstudpsrc.c: Fix compilation after removing the GstPollMode from the constructor.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
Fix compilation after removing the GstPollMode from the
constructor.
2008-03-07 15:54:09 +00:00
Ole André Vadla Ravnås
76fbca7103 gst/udp/gstudpsrc.c: Properly balance WSA_Cleanup with WSA_Startup.
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_finalize), (gst_udpsrc_start),
(gst_udpsrc_stop):
Properly balance WSA_Cleanup with WSA_Startup.
Also make the poll controllable on windows. Fixes #520888.
2008-03-07 10:01:40 +00:00
Peter Kjellerstedt
9c814472e5 gst/udp/gstudpsrc.*: Port to GstPoll. See #505417.
Original commit message from CVS:
Patch by: Peter Kjellerstedt <pkj at axis com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_init), (gst_udpsrc_create),
(gst_udpsrc_get_property), (gst_udpsrc_start), (gst_udpsrc_unlock),
(gst_udpsrc_unlock_stop), (gst_udpsrc_stop):
* gst/udp/gstudpsrc.h:
Port to GstPoll. See #505417.
2008-02-28 11:51:24 +00:00
Ole André Vadla Ravnås
13a9765877 Fix includes for MSVC and GLib-2.14.0 (#492388).
Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* configure.ac:
* gst/udp/gstdynudpsink.c:
* gst/udp/gstdynudpsink.h:
* gst/udp/gstmultiudpsink.c:
* gst/udp/gstmultiudpsink.h:
* gst/udp/gstudpsink.c:
* gst/udp/gstudpsink.h:
Fix includes for MSVC and GLib-2.14.0 (#492388).
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
No more pipe define since GLib-2.14.0, need to use _pipe() directly.
2007-11-02 21:16:09 +00:00
Laurent Glayal
961c985270 gst/udp/gstudpsrc.c: When the socket is used by the app for other purposes, don't generate an error if there is activ...
Original commit message from CVS:
Based on patch by: Laurent Glayal  <spglegle yahoo fr>
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
When the socket is used by the app for other purposes, don't generate an
error if there is activaty on the socket that is not data related.
Fixes #487488.
2007-10-18 17:04:14 +00:00
Wim Taymans
285ec58919 gst/udp/gstudpsrc.c: Update documentation.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Update documentation.
2007-09-26 14:28:20 +00:00
Wim Taymans
4b25ca6267 gst/udp/gstudpsrc.c: Make udpsrc timestamp outgoing buffers based on when they were received.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_init), (gst_udpsrc_create):
Make udpsrc timestamp outgoing buffers based on when they were received.
Also make it output a segment in time.
2007-09-10 19:53:28 +00:00
Wim Taymans
2e599ab037 gst/udp/gstmultiudpsink.*: Add support for getting and setting the socket to use.
Original commit message from CVS:
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init),
(gst_multiudpsink_init), (gst_multiudpsink_set_property),
(gst_multiudpsink_get_property), (gst_multiudpsink_init_send),
(gst_multiudpsink_close), (gst_multiudpsink_add):
* gst/udp/gstmultiudpsink.h:
Add support for getting and setting the socket to use.
* gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init),
(gst_udpsrc_create), (gst_udpsrc_get_property):
Add support for getting the currently used socket.
2007-08-17 13:59:15 +00:00
Wim Taymans
042d3a461c gst/udp/gstudpsrc.c: Improve UDP performance by avoiding a select() when we have data available immediatly.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Improve UDP performance by avoiding a select() when we have data
available immediatly.
2007-08-16 11:49:01 +00:00
Wim Taymans
127d233104 gst/udp/gstudpsrc.c: Since we depend on 0.10.13 -core, override the unlock_stop vmethod for safer shutdown.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_class_init),
(gst_udpsrc_create), (gst_udpsrc_unlock), (gst_udpsrc_unlock_stop):
Since we depend on 0.10.13 -core, override the unlock_stop vmethod for
safer shutdown.
2007-05-21 10:07:05 +00:00
Wim Taymans
589b8282e8 gst/udp/gstmultiudpsink.c: Fix multicast detection.
Original commit message from CVS:
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_add):
Fix multicast detection.
Don't try to join a multicast group if the address is not multicast.
* gst/udp/gstudpsrc.c: (gst_udpsrc_update_uri):
Small debug improvement.
2007-04-29 12:19:21 +00:00
Wim Taymans
45b77c57b4 gst/udp/gstudpsrc.c: Handle the case where there are exactly 0 bytes to read and the ioctl did not report an error. F...
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Handle the case where there are exactly 0 bytes to read and the ioctl
did not report an error. Fixes #433530.
2007-04-26 08:48:30 +00:00
Laurent Glayal
112216c22f gst/udp/: Rework the socket allocation a bit based on the sockfd argument so that it becomes usable.
Original commit message from CVS:
Patch by: Laurent Glayal <spglegle at yahoo dot fr>
* gst/udp/gstdynudpsink.c: (gst_dynudpsink_class_init),
(gst_dynudpsink_init), (gst_dynudpsink_set_property),
(gst_dynudpsink_get_property), (gst_dynudpsink_init_send),
(gst_dynudpsink_close):
* gst/udp/gstdynudpsink.h:
* 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:
Rework the socket allocation a bit based on the sockfd argument so that
it becomes usable.
Add a closefd property to instruct the udp elements to close the custom
file descriptors when going to READY. Fixes #423304.
API:GstUDPSrc::closefd property
API:GstDynUDPSink::closefd property
2007-03-29 09:59:23 +00:00
Wim Taymans
823b49268f gst/udp/gstudpsrc.c: Fix doc.
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_class_init),
(gst_udpsrc_create):
Fix doc.
2007-03-02 13:40:06 +00:00
Thijs Vermeir
afd829326e gst/udp/gstudpsrc.*: Add support to strip proprietary headers. Fixes #350296.
Original commit message from CVS:
Patch by: Thijs Vermeir <thijsvermeir at gmail dot com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init),
(gst_udpsrc_create), (gst_udpsrc_set_property),
(gst_udpsrc_get_property):
* gst/udp/gstudpsrc.h:
Add support to strip proprietary headers. Fixes #350296.
2007-03-02 12:56:13 +00:00