summaryrefslogtreecommitdiff
path: root/gst/rtp
Commit message (Collapse)AuthorAgeFilesLines
* rtpsrc: Plug leak of rtcp_send_addrJan Alexander Steffens (heftig)2021-05-071-0/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2226>
* rtpsink: Return proper pad from _request_new_padJan Alexander Steffens (heftig)2021-05-071-2/+7
| | | | | | | | Bizarrely, it returned a pad from the child rtpbin. I noticed because our application leaked the implicitly created ghost pad. Make an explicit ghost pad so this works properly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2227>
* Use gst_element_request_pad_simple...François Laignel2021-05-051-1/+1
| | | | | | Instead of the deprecated gst_element_get_request_pad. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2180>
* rtpsrc: Fix wrong/NULL URI handlingThibault Saunier2021-04-231-3/+16
| | | | | | | We can reset the URI to NULL and this fix a deadlock in that case or when the URI was invalid. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2132>
* gst-plugins: allow per feature registrationStéphane Cerveau2021-04-115-6/+8
| | | | | | | | | | | | | 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-bad/-/merge_requests/2110>
* rtpmanagerbad: allow setting caps on rtpsrcMarc Leeman2020-12-042-0/+44
| | | | | | | rtpsrc tries to do a lookup of the caps based on the encoding-name. For not so standard encodings, the caps can be set, avoiding the lookup. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1406>
* rtpsrc: Cleanup on BYE, timeout or when pad is reusedNicolas Dufresne2020-10-161-0/+24
| | | | | | | | In this patch, we enabled 'autoremove' feature of rtpbin and also call 'clear-ssrc' on the rtpssrcdemux element when a pad is being reused. This ensure that the jitterbuffer is removed and no threads accumulates. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1575>
* rtpsrc: re-use the same src pad for streams that have the same payload typeGeorge Kiagiadakis2020-10-161-5/+18
| | | | | | | | | Also use payload type when naming pads, this will make it easier to identify pads and simplify the code. Fixes #1395 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1575>
* rtpmanagerbad: remove duplicate parent declarationMarc Leeman2020-10-121-2/+0
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1689>
* rtpsrc: drop stream-start & eos messages posted from the internal udp sink(s)George Kiagiadakis2020-07-291-0/+18
| | | | | | See #1368 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1472>
* rtpsrc: Add domain name supportNicolas Dufresne2020-07-141-5/+33
| | | | | | | | | This add domain name resolution (similar to udpsrc does) to the rtpsrc element. Fixes 1352 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
* rtpsrc: Always set rtcp socket addressNicolas Dufresne2020-07-141-9/+1
| | | | | | | | | | | | Regardless if it's multicast or not, set the address property to match the element address. This is the address of the interface to listen to, which is expected to be ANY in most cases, but should be honnored even for RTCP non-multicast case. This also fixes an assertion if the address is not a parsable IPv4 or IPv6 string. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
* rtpsink: Fix error handling on bad DNSNicolas Dufresne2020-07-141-3/+1
| | | | | | | This will properly print the DNS being attempted to resolved and avoid trying to unref a NULL pointer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
* rtpsrc/sink: Use g_signal_connect_object()Sebastian Dröge2020-07-072-16/+16
| | | | | | | | | | rtpbin can still emit signals when it is being disposed, and while rtpbin is inside rtpsrc/rtpsink it can still live longer. So we either have disconnect all signals at some point, or let GObject take care of that automatically. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1412>
* rtpmanagerbad: fix two minor memory leaksMarc Leeman2020-02-211-0/+2
|
* rtpmanagerbad: reduce lock in rtpsinkMarc Leeman2020-02-211-2/+2
|
* rtpmanagerbad: documentation comment fixMarc Leeman2020-02-211-1/+2
|
* rtpmanagerbad: allow setting multicast-ifaceMarc Leeman2019-11-194-0/+66
| | | | | | Allowing the UDP elements to bind on an interface is needed in more complex networks where there are mutiple networks interfaces without default gateway
* rtpmanagerbad: name the element childrenMarc Leeman2019-11-172-10/+11
| | | | | As discussed with RIST, it is best to name the children of the elements since these are now created at the element initialisation.
* documentation: fixed a heap o' typosAaron Boxer2019-11-051-2/+2
|
* Remove autotools build systemTim-Philipp Müller2019-10-141-16/+0
|
* build: fix werror build with newer gccMatthew Waters2019-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstbin.h:27, from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:35, from ../gst/rtp/gstrtpsink.h:23, from ../gst/rtp/gstrtpsink.c:49: In function ‘gst_rtp_sink_start’, inlined from ‘gst_rtp_sink_change_state’ at ../gst/rtp/gstrtpsink.c:509:11: ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstelement.h:422:18: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 422 | gchar *__txt = _gst_element_error_printf text; \ ../gst/rtp/gstrtpsink.c:476:3: note: in expansion of macro ‘GST_ELEMENT_ERROR’ 476 | GST_ELEMENT_ERROR (self, RESOURCE, NOT_FOUND, | ^~~~~~~~~~~~~~~~~ ../gst/rtp/gstrtpsink.c: In function ‘gst_rtp_sink_change_state’: ../gst/rtp/gstrtpsink.c:477:37: note: format string is defined here 477 | ("Could not resolve hostname '%s'", remote_addr), | ^~ In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstbin.h:27, from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:35, from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/rtp/gstrtpdefs.h:27, from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/rtp/rtp.h:25, from ../gst/rist/gstristsink.c:72: In function ‘gst_rist_sink_setup_rtcp_socket’, inlined from ‘gst_rist_sink_start’ at ../gst/rist/gstristsink.c:658:10, inlined from ‘gst_rist_sink_change_state’ at ../gst/rist/gstristsink.c:801:13: ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstelement.h:422:18: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 422 | gchar *__txt = _gst_element_error_printf text; \ ../gst/rist/gstristsink.c:595:3: note: in expansion of macro ‘GST_ELEMENT_ERROR’ 595 | GST_ELEMENT_ERROR (sink, RESOURCE, NOT_FOUND, | ^~~~~~~~~~~~~~~~~ ../gst/rist/gstristsink.c: In function ‘gst_rist_sink_change_state’: ../gst/rist/gstristsink.c:596:37: note: format string is defined here 596 | ("Could not resolve hostname '%s'", remote_addr), | ^~
* rtpmanagerbad: allow creation of elements at initialisationMarc Leeman2019-09-203-248/+377
|
* rtp: do not overrule RtpInfo when non dynamic typeMarc Leeman2019-08-081-3/+8
| | | | | When looking up the Rtp information, do not overwrite information already found with encoding-name by static information.
* rtp: Fix incompatible type build warningSeungha Yang2019-06-262-2/+2
| | | | | | | | | | Use GstURIType instead of guint ../subprojects/gst-plugins-bad/gst/rtp/gstrtpsink.c(575): warning C4133: '=': incompatible types ... ../subprojects/gst-plugins-bad/gst/rtp/gstrtpsrc.c(725): warning C4133: '=': incompatible types ...
* rtpmanagerbad: fix the plugin registrationMarc Leeman2019-06-071-0/+2
| | | | | | | After compilation, the compiled library needs to be added to the list of plugin libraries. . Also, fix for static builds
* rtp: fix autotools build some moreTim-Philipp Müller2019-06-051-2/+2
|
* make: rtp: Remove spurious header fileNicolas Dufresne2019-06-031-1/+0
| | | | This header file no longer exist.
* rtpmanagerbad: add RTP streaming elementsMarc Leeman2019-06-039-0/+1567
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-implementation of the RTP elements that are submitted in 2013 to handle RTP streams. The elements handle a correct connection for the bi-directional use of the RTCP sockets. https://bugzilla.gnome.org/show_bug.cgi?id=703111 The rtpsink and rtpsrc elements add an URI interface so that streams can be decoded with decodebin using the rtp:// interface. The code can be used as follows ``` gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=3 ! rtpsink uri=rtp://239.1.1.1:1234 gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000 gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=H264 ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink gst-launch-1.0 videotestsrc ! avenc_mpeg4 ! rtpmp4vpay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000 gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=MP4V-ES ! rtpmp4vdepay ! avdec_mpeg4 ! videoconvert ! xvimagesink ``` rtpmanagerbad: add pkg-config rtpmanagerbad: Rtp should be uppercase rtpmanagerbad: add G_OS_WIN32 for shielding unix headers rtpmanagerbad: remove Since from documentation rtpmanagerbad: rename lib name from nrtp to rtpmanagerbad rtpmanagerbad: sync meson.build with other modules rtpmanagerbad: add Makefile.am rtpmanagerbad: use GstElement to count pads rtpmanagerbad: use gst_bin_set_suppressed_flags rtpmanagerbad: check element creation rtpmanagerbad: post message when trying to access missing rtpbin rtpmanagerbad: return FALSE with g_return tests rtpmanagerbad: use gsocket multicast check rtpmanagerbad: use gst_caps_new_empty_simple iso gst_caps_from_string rtpmanagerbad: sync with gstrtppayloads.h rtpmanagerbad: correct media type X-GST rtpmanagerbad: test if a compatible pad was found rtpmanagerbad: remove evil copy of GstRTPPayloadInfo rtpmanagerbad: add gio_dep to meson rtpmanagerbad: revert to old glib boilerplate GStreamer 1.16 does not yet support the newer GLib templates, so revert. rtpmanagerbad: return GST_STATE_CHANGE_NO_PREROLL for live sources for live sources, NO_PREROLL should be returned for PLAYING->PAUSED and READY->PAUSED transitions. rtpmanagerbad: use GstElement pad counting rtpmanagerbad: just use template name to request pad rtpmanagerbad: remove commented code rtpmanagerbad: use funnel to send multiple streams on one socket rtpmanagerbad: avoid beaches beaches should only be used during the summer, so rewrite the code to return explicitly and avoid beaches during the winter. rtpmanagerbad: add copyright to test code rtpmanagerbad: g_free is NULL safe rtpmanagerbad: do not trace rtpbin rtpmanagerbad: return NULL explitly rtpmanagerbad: warn when data port is not even According to RFC 3550, RTP data should be sent on even ports, while RTCP is sent on the following odd port. rtpmanagerbad: document port allocation in rtpsink/src rtpmanagerbad: improve uri description rtpmanagerbad: add comment re-use socket rtpmanagerbad: rename gst_object_set_properties_from_uri_query rtpmanagerbad: loan prop/val setter from rist rtpmanagerbad: rtpsrc: fix unitialised pointer rtpmanagerbad: fix silly typo rtpmanagerbad: test for empty key/value rtpmanagerbad: rtpsrc: deprecate ssrc collision to INFO rtpmanagerbad: sync debug with rist rtpmanagerbad: small strings allocated on stack rtpmanagerbad: correct rename rtpmanagerbad: add locking on prop setters/getters Locking is added because the URI allows to access the properties too. rtpmanagerbad: allow for RTCP through NAT rtpmanagerbad: move gio to header file rtpmanagerbad: free small strings too rtpmanagerbad: ttl_mc for ttl on dynudpsink rtpmanagerbad: add comments on the URI registered rtpmanagerbad: correct macro after file rename rtpmanagerbad: code style rtpmanagerbad: handle wrong URIs in setter rtpmanagerbad: nit URI notation correction In an URI, the first key/value pair should not have an ampersand, the parser did not die though.
* rtp: move RTP H.265 payloader/depayloader to -goodTim-Philipp Müller2016-02-166-3357/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=761606
* gstrtph265depay: keep consistency with rtph264depayLuis de Bethencourt2016-02-052-10/+27
| | | | | | Use gst_rtp_drop_meta() and the same function prototype for gst_rtp_copy_meta() to keep consistency with the RTP elements in gst-plugins-good
* rtph265depay: fix termination of access unitLuis de Bethencourt2016-02-051-2/+0
| | | | | Only consider the access unit complete when the next-occurring VCL NAL unit has the first bit after its NAL unit header equal to 1.
* rtph265depay: fix unneeded sub-buffer creationLuis de Bethencourt2016-01-151-16/+8
| | | | | We create a sub-buffer just to copy over its metas and then throw it away immediately, just use the original input buffer directly.
* rtph265pay: add "send VPS/SPS/PPS with every key frame" modeLuis de Bethencourt2016-01-151-40/+46
| | | | | | | | | | | | | | | | | | It's not enough to have timeout or event based VPS/SPS/PPS information sent in RTP packets. There are some scenarios when key frames may appear more frequently than once a second, in which case the minimum timeout for "config-interval" of 1 second for sending VPS/SPS/PPS isn't enough. It might also be desirable in general to make sure the VPS/SPS/PPS is available with every keyframe (packet loss aside), so receivers can actually pick up decoding immediately from the first keyframe if VPS/SPS/PPS is not signaled out of band. This commit adds the possibility to send VPS/SPS/PPS with every key frame. This mode can be enabled by setting "config-interval" property to -1. In this case the payloader will add VPS, SPS and PPS before every key (IDR) frame. https://bugzilla.gnome.org/show_bug.cgi?id=757892
* rtph265pay: change config-interval property type from uint to intLuis de Bethencourt2016-01-152-5/+5
| | | | | | This way we can use -1 as special value, which is nicer than MAXUINT. https://bugzilla.gnome.org/show_bug.cgi?id=757892
* rtph265depay: make sure we call handle_nal for each NALLuis de Bethencourt2015-08-151-1/+5
| | | | | | | Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure we correctly extract the SPS and PPS. https://bugzilla.gnome.org/show_bug.cgi?id=730999
* rtph265pay: Copy metadata in the payloader, but only the relevant onesLuis de Bethencourt2015-08-151-6/+8
| | | | | | | | The payloader didn't copy anything so far, the depayloader copied every possible meta. Let's make it consistent and just copy all metas without tags or with only the video tag. https://bugzilla.gnome.org/show_bug.cgi?id=751774
* rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()Luis de Bethencourt2015-08-151-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=753228
* rtph265pay: fix potential crash when shutting downLuis de Bethencourt2015-08-151-2/+7
| | | | | | | | | | A race condition in the state change function may cause buffers to be unreffed while they are still used by the streaming thread in gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the parent class first in the state change function to make sure streaming has stopped and only then free those buffers. https://bugzilla.gnome.org/show_bug.cgi?id=741381
* rtph265pay: fix buffer leak when using SPS/PPSLuis de Bethencourt2015-08-141-1/+3
| | | | | | | Fixes a buffer leak that would occur if the pipeline was shutdown while a SPS/PPS header was being created. https://bugzilla.gnome.org/show_bug.cgi?id=741271
* rtph265depay: copy metadata in the depayloader, but only the relevant onesLuis de Bethencourt2015-08-142-0/+89
| | | | | | | | The payloader didn't copy anything so far, the depayloader copied every possible meta. Let's make it consistent and just copy all metas without tags or with only the video tag. https://bugzilla.gnome.org/show_bug.cgi?id=751774
* rtph265depay: checking if depay has sps/pps nals before insertionLuis de Bethencourt2015-08-121-1/+1
| | | | | | Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430 https://bugzilla.gnome.org/show_bug.cgi?id=753228
* rtph265depay: only update the srcpad caps if something else than the ↵Luis de Bethencourt2015-08-121-2/+41
| | | | | | | | | | codec_data changed h264parse and gstrtph264depay do the same, let's keep the behaviour consistent. As we now include the codec_data inside the stream, this causes less caps renegotiation. https://bugzilla.gnome.org/show_bug.cgi?id=753228
* rtph265depay: PPS replaces old PPS if it has the same idLuis de Bethencourt2015-08-121-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=753228
* rtph265depay: Insert SPS/PPS NALs into the streamLuis de Bethencourt2015-08-121-0/+50
| | | | | | | | | rtph264depay does the same and this fixes decoding of some streams with 32 SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255), but the field in the codec_data for the number of SPS or PPS is only 5 (or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere. This looks like a mistake in the part of the spect about the codec_data.
* rtph265depay: implement process_rtp_packet() vfuncLuis de Bethencourt2015-08-121-16/+8
| | | | | | | | | | For more optimised RTP packet handling: means we don't need to map the input buffer again but can just re-use the mapping the base class has already done. Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235 https://bugzilla.gnome.org/show_bug.cgi?id=753228
* rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()Luis de Bethencourt2015-08-121-2/+2
| | | | Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.
* rtph265depay: prevent trying to get 0 bytes from adapterLuis de Bethencourt2015-08-121-4/+6
| | | | | | | | This causes an assertion and would lead to getting a NULL instead of a buffer. Without proper checking this would easily lead to a segfault. Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
* rtp: remove dead assignmentLuis de Bethencourt2015-07-291-2/+0
| | | | | Value set to ret will be overwritten at least once at the end of the while loop, removing assignment.
* Remove obsolete Android build cruftTim-Philipp Müller2015-04-261-14/+0
| | | | This is not needed any longer.