Commit graph

437 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig)
0ff50d6723 udpsrc: Plug leaks of saddr in error cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07 10:09:38 +00:00
Jan Alexander Steffens (heftig)
e425bcada5 udpsrc: Whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07 10:09:38 +00:00
Stéphane Cerveau
72c7ae54dd udp: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/876>
2021-03-29 12:45:23 +02:00
Sanchayan Maity
79efd372c1 udpsrc: Fix marker links
These should be with a single ':'. The double '::' results in a CI with
build failure message like below.

ERROR: [links]: (mandatory-link-not-found): Mandatory link Link GstSocketTimestamp -> None (GstSocketTimestamp) could not be resolved
ERROR: [check-missing-since-markers]: (missing-since-marker): Missing since marker for udpsrc:socket-timestamp
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>
2021-01-04 15:23:22 -05:00
Sanchayan Maity
e0b09a1612 udpsrc: Allow use of socket control message timestamps for DTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/828>
2021-01-04 15:23:22 -05:00
Stéphane Cerveau
0429c24637 meson: update glib minimum version to 2.56
In order to support the symbol g_enum_to_string in various
project using GStreamer ( gst-validate etc.), the glib minimum
version should be 2.56.0.

Remove compat code as glib requirement
is now > 2.56

Version used by Ubuntu 18.04 LTS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/774>
2020-10-15 18:21:54 +02:00
Niels De Graef
7cf4ab6229 Don't pass default GLib marshallers for signals
By passing `NULL` to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-11-17 15:32:30 +00:00
Sergey Nazaryev
b4b79a211f multiudpsink: don't lose scope_id 2019-11-05 23:50:11 +00:00
Edward Hervey
8e1c224fbc good: Avoid usage of deprecated API
GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26
2019-10-16 07:46:58 +00:00
Tim-Philipp Müller
c9a47c0c8d Remove autotools build system 2019-10-14 11:04:18 +01:00
Aaron Boxer
46989dca96 documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
Nicolas Dufresne
2c3c1072f7 multiudpsink: Add missing socket.h include
Without this include, macro like SO_BINDTODEVICE is not visible and
associated feature gets out-compiled. This also affects the support for
SO_SNDBUF.
2019-06-26 18:03:29 -04:00
Niels De Graef
f3970565f0 meson: Bump minimal GLib version to 2.44
This means we can use some newer features and get rid of some
boilerplate code using the G_DECLARE_* macros.

As discussed on IRC, 2.44 is old enough by now to start depending on it.
2019-06-03 16:18:55 +00:00
Thibault Saunier
af01988534 doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
Thibault Saunier
0a6a62aa76 docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
Robert Rosengren
2476e9e4ae multidupsink: Use gst_net_utils_set_socket_tos for QoS DSCP
Util function in net library exists for setting QoS DSCP on socket, hence
use it to simplify code.
2019-04-22 09:16:20 +00:00
Antonio Ospite
2dfe228740 docs: fix typos s/recieve/receive/ 2019-03-07 12:41:40 +01:00
Jordan Petridis
515ada7e22
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:52:16 +02:00
Marc Leeman
827d70daee udpsrc: print information about bind_error socket error
In some cases, a bind error occurs during operation. Printing
the information about the problem is critical for finding the
conflict

https://bugzilla.gnome.org/show_bug.cgi?id=797340
2018-10-27 13:12:53 +01:00
Nicolas Dufresne
cf34d51318 udpsrc: Fix build when SO_RCVBUFFORCE is not defined
This shoudl fix the mingw build.
2018-08-17 17:35:43 -04:00
Nicolas Dufresne
c61bcb1fd2 udpsrc: Balance Linux value of get/set_rcvbuf
On Linux, the kernel returns twice the size as it will allocate extra
space for accouting. We devides this value by two in order to ensure
that get/set value now match. This fixes the set buffer size validation
and allow having a nice warning when the size if surpassed and the
process does not have CAP_NET_ADMIN capabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=727067
2018-08-17 14:24:25 -04:00
Guillaume Desmottes
9b4a022dee updsrc: set udp buffer size forcibly
The udp buffer size is limited to a maximum of around 100K.
Some apps need to set the force bufsize for their own operation.
Use the SO_RCVBUFFORCE option in order to override the rmem_max limit
of linux kernel. Require user to have the CAP_NET_ADMIN privilege to
work.

Original patch from Kyungnam Bae <kyungnam.bae@lge.com>

https://bugzilla.gnome.org/show_bug.cgi?id=727067
2018-08-17 13:46:42 -04:00
Guillaume Desmottes
58a5f59fe9 udpsrc: factor out gst_udpsrc_get_rcvbuf()
No semantic change.

https://bugzilla.gnome.org/show_bug.cgi?id=727067
2018-08-17 13:46:42 -04:00
Tim-Philipp Müller
db688c5504 docs: fix typos 2018-05-23 13:14:27 +01:00
Xavier Claessens
edd9c8f6b8 Meson: Generate pc file for all plugins in good
https://bugzilla.gnome.org/show_bug.cgi?id=794568
2018-04-25 11:07:06 +01:00
Petr Kulhavy
738eb0d8ed udpsrc: switch to using a buffer pool
This exposes a new property, mtu, which is used to determine the
initial size of buffers from the buffer pool. If received data
exceeds this, the element gracefully handles that in a manner similar
to what we had previously: a large memory gets filled and reallocated
at the next call to "fill".

The default size is set to 1500, which should cover most use cases.

With contributions from Mathieu Duponchelle <mathieu@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772841
2018-03-21 17:47:27 -04:00
Petr Kulhavy
589019d8f5 udpsrc: optimize GstUdpSrc object for cache performance
Optimize GstUdpSrc for cache performance.

Move the hot properties, which are used by the read function, to the top:
@used_socket, @addr, @cancellable, @skip_first_bytes, @timeout,
@retrieve_sender_address.

Remove the unused property @ttl.

Where needed reorder so that holes are avoided (the 64-bit @timeout)

https://bugzilla.gnome.org/show_bug.cgi?id=772841
2018-03-21 17:47:26 -04:00
Florent Thiéry
7c5e39f7a7 udpsrc: fix typo in documentation
https://bugzilla.gnome.org/show_bug.cgi?id=792458
2018-01-12 18:21:06 +00:00
Mark Nauwelaerts
f3c3f8fb38 udpsrc: fix typo in multicast join error message 2017-12-23 12:48:20 +01:00
Sebastian Rasmussen
5091b5f39f multiudpsink: don't try to set IPV6_TCLASS on IPV4 sockets
Avoids ERROR log message.

https://bugzilla.gnome.org/show_bug.cgi?id=757449
2017-12-23 12:45:17 +01:00
Olivier Crête
6ea569841d multiudpsink: Call gst_base_sink_wait_preroll on unlock
This means that packets will not be lost on fast pause/playing cycles.

Also refactor the code a little to simplify it.

https://bugzilla.gnome.org/show_bug.cgi?id=774945
2017-12-19 16:47:52 -05:00
Olivier Crête
0a15d1782b multiudpsink: Remove unused variable 2017-12-19 15:50:14 -05:00
Alvaro Margulis
66f253ed9b multiudpsink: fix bind address leak
https://bugzilla.gnome.org/show_bug.cgi?id=790986
2017-12-08 00:31:32 +00:00
Nicolas Dufresne
b68d936ae0 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:41:19 -04:00
Sebastian Dröge
71c76e677a udpsrc: Use IP_MULTICAST_ALL for filtering IPv4 packets if available
This goes around the inefficient control message based filtering and
does all the filtering kernel-side. Unfortunately this is Linux-only and
there is no IPv6 variant of it (yet).
2017-02-15 00:14:32 +02:00
Wonchul Lee
c7e23476c4 updsrc: Add to join multiple multicast interfaces
https://bugzilla.gnome.org/show_bug.cgi?id=776030
2016-12-19 10:50:14 +02:00
Petr Kulhavy
89ad2de93e udpsrc: remove redundant saddr unref
The g_object_unref (saddr) before receiving message seems to be redundant as it
is done just before jumping to retry

Though not directly related, part of
https://bugzilla.gnome.org/show_bug.cgi?id=772841
2016-11-14 15:26:13 +02:00
Petr Kulhavy
1fc572d740 udpsrc: receive control messages only in multicast
Control messages are used only in multicast mode - to detect if the destination
address is not ours and possibly drop the packet. However in non-multicast
modes the messages are still allocated and freed even if not used. Therefore
request control messages from g_socket_receive_message() only in multicast
mode.

https://bugzilla.gnome.org/show_bug.cgi?id=772841
2016-11-14 11:05:04 +02:00
Scott D Phillips
023744a577 udpsrc: Check for G_PLATFORM_WIN32 for presence of ipi_spec_dest
G_OS_WIN32 is only set when not building with cygwin, but
ipi_spec_dest is missing both with and without cygwin.

https://bugzilla.gnome.org/show_bug.cgi?id=773114
2016-10-27 12:09:00 +01:00
Thomas Klausner
22d6c7f106 udpsrc: Fix compilation on NetBSD
https://bugzilla.gnome.org/show_bug.cgi?id=771278
2016-09-12 15:09:26 +02:00
Nirbheek Chauhan
b09f478e80 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:21:12 +01:00
Thomas Bluemel
578e93cd0b multiudpsink: Initialize bytes_sent field.
This fixes endpoints not receiving any data intermittently.

https://bugzilla.gnome.org/show_bug.cgi?id=769773
2016-08-12 09:21:20 +02:00
Sebastian Dröge
ccdd76fd18 udpsrc: Use correct in6_pktinfo struct instead of in_pktinfo
Fixes the build on FreeBSD, which does not have the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=768623
2016-07-10 21:30:58 +03:00
Sebastian Dröge
75963b47f4 udpsrc: Windows has no ipi_spec_dst in struct in_pktinfo 2016-06-28 16:44:50 +03:00
Sebastian Dröge
cdd5fa4d96 udpsrc: #define __APPLE_USE_RFC_3542 to be able to use IPV6_PKTINFO on OSX/iOS 2016-06-28 15:15:14 +03:00
Sebastian Dröge
36a154fa96 udpsrc: Move #includes around to a) work around broken glibc header and b) Windows 2016-06-28 15:08:04 +03:00
Sebastian Dröge
7e47579f17 udpsrc: Fix compilation on Windows and *BSD/OSX 2016-06-28 14:25:03 +03:00
Sebastian Dröge
123d62712c udpsrc: Filter out multicast packets that are not for our multicast address
https://bugzilla.gnome.org/show_bug.cgi?id=767980
2016-06-28 13:40:06 +03:00
Tim-Philipp Müller
0686174f19 udpsrc: fix Since version for new "loop" property 2016-05-18 18:35:27 +01:00
Tim-Philipp Müller
21e281feea udpsrc: add doc blurb with since marker for new "loop" property 2016-05-17 05:33:35 +01:00