summaryrefslogtreecommitdiff
path: root/gst/rtsp-server/rtsp-stream.c
Commit message (Collapse)AuthorAgeFilesLines
* All around: add annotations and API guardsMathieu Duponchelle2018-02-121-19/+25
|
* rtsp: Set udpsink_out ttl-mc property on creationIan Jamison2018-01-071-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=791743
* rtsp-stream: fix connection delay due to wrong assumption on last-sampleJulien Isorce2017-07-251-2/+17
| | | | | | | | | | | | Commit 852cc09f542af5cadd79ffd7fe79d6475cf57e14 assumed that multiudpsink's last-sample always comes from the payloader. Which is wrong if auxiliary streams are multiplexed in the same stream. So check the buffer's ssrc against the caps'ssrc before to use its seqnum. If not the same ssrc just use the payloader as done prior the commit above or when there is no last-sample yet. https://bugzilla.gnome.org/show_bug.cgi?id=784094
* gi: Fix some annotations and docstringsThibault Saunier2017-04-131-4/+5
|
* rtsp-stream: corrected if-statement in _get_server_port()Patricia Muscalu2017-01-101-2/+2
| | | | | | | This bug was accidentally introduced while fixing a segfault in _get_server_port() function. https://bugzilla.gnome.org/show_bug.cgi?id=776345
* rtsp-stream: fixed segmenation fault in _get_server_port()Patricia Muscalu2017-01-091-2/+7
| | | | | | | | | | Calling function gst_rtsp_stream_get_server_port() results in segmenation fault in the RTP/RTSP/TCP case. Port that the server will use to receive RTCP makes only sense in the UDP case, however the function should handle the TCP case in a nicer way. https://bugzilla.gnome.org/show_bug.cgi?id=776345
* rtsp-stream: Fixed TCP transport casePatricia Muscalu2016-12-221-0/+1
| | | | | | | Make sure that the appsink element is actually added to the bin before trying to link it with the elements in it. https://bugzilla.gnome.org/show_bug.cgi?id=776343
* stream: block the output of rtpbin instead of the source pipelineMatthew Waters2016-11-231-10/+15
| | | | | | | | | | | | | | | 85c52e194bcb81928b96614be0ae47d59eccb1ce introduced a more correct detection of the srtp rollover counter to add to the SDP. Unfortunately, it was incomplete for live pipelines where the logic blocks the source bin before creating the SDP and thus would never have the necessary informaiton to create a correct SDP with srtp encryption. Move the pad blocks to rtpbin's output pads instead so that the necessary information can be created before we need the information for the SDP. https://bugzilla.gnome.org/show_bug.cgi?id=770239
* rtsp-stream: Set close-socket FALSE on UDP src:esGöran Jönsson2016-11-221-0/+3
| | | | | | | | | With this RTSP server can use the sockets independent on the udpsrc state. When the udp src is finalized it will unref socket and when g_socket is finalized the socket will be closed. https://bugzilla.gnome.org/show_bug.cgi?id=765673
* stream: Fix randomly missing streams from SDP with dynamic elementsXavier Claessens2016-10-061-0/+1
| | | | | | | | | | | | | When using dynamic elements, gst_rtsp_stream_join_bin() is called from "pad-added" signal. In that case priv->srcpad could already have its caps, and they'll be sent to priv->send_src[0] pad. That means that when it connects "notify::caps" signal, that pad could already have received its caps and the signal won't be emitted anymore. In that case priv->caps stay to NULL and when building the SDP that stream gets ignored. Leading to missing video or audio when playing in client side. https://bugzilla.gnome.org/show_bug.cgi?id=772478
* rtsp-server: Hint that set_multicast_iface expects the name of the interfaceIan Jamison2016-09-181-1/+1
| | | | | | To prevent any possibly confusion with IPs or anything else. https://bugzilla.gnome.org/show_bug.cgi?id=771530
* rtsp-stream: Remove unused _locked() variant of a functionSebastian Dröge2016-09-071-31/+23
| | | | It was added during refactoring.
* stream: cosmetic cleanupXavier Claessens2016-09-071-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: Compare IP addresses case insensitive in more placesXavier Claessens2016-09-071-2/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: Fix leaked joined_binXavier Claessens2016-09-071-2/+1
| | | | | | | There is no need to keep a strong ref on it, and _leave_bin() was setting it to NULL before calling g_clear_object() so it was leaked. https://bugzilla.gnome.org/show_bug.cgi?id=766612
* rtsp-stream: Compare IP address strings case insensitiveSebastian Dröge2016-09-061-3/+4
| | | | Otherwise IPv6 addresses might fail this comparision.
* rtsp-stream: Bind multicast sockets to ANY as beforeSebastian Dröge2016-09-061-1/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612#c48
* rtsp-stream: Always create multicast UDP elements if the protocol flag is setSebastian Dröge2016-09-051-163/+115
| | | | | | | | | Adding them later will cause deadlocks due to 1) pre-rolling and staying in PAUSED with the unicast/TCP sinks 2) adding the multicast sink 3) waiting for it to get data to preroll again 3) never happens because the queues after the tee are full.
* rtsp-stream: Fix up various multicast related issuesSebastian Dröge2016-09-051-10/+16
|
* stream: revert back to create udpsrc/udpsink on DESCRIBE for unicastXavier Claessens2016-09-051-298/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is basically reverting changes introduced in commit f62a9a7, because it was introducing various regressions: - It introduces a leak of udpsrc elements that got wrongly fixed by adding an hash table in commit cba045e. We should have at most 4 udpsrc for unicast: ipv4/ipv6, rtp/rtcp. They can be reused for all unicast clients. - If a mcast client connects, it creates a new socket in SETUP to try to respect the destination/port given by the client in the transport, and overrides the socket already set on the udpsink element. That means that if we already had a client connected, the source address on the udp packets it receives suddenly changes. - If a 2nd mcast client connects, the destination/port in its transport is ignored but its transport wasn't updated. What this patch does: - Revert back to create udpsrc/udpsink for unicast clients on DESCRIBE. - Always have a tee+queue when udp is enabled. This could be optimized again in a later patch, but is more complicated. If no unicast clients connects then those elements are useless, this could be also optimized in a later patch. - When mcast transport is added, it creates a new set of udpsrc/udpsink, seperated from those for unicast clients. Since we already support only one mcast address, we also create only one set of elements. https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: factor our plug_src functionXavier Claessens2016-09-051-43/+34
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: factor out plug_sink functionXavier Claessens2016-09-051-46/+36
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: small documentation clarificationXavier Claessens2016-09-051-2/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: rename addr_v4/6 to mcast_addr_v4/6 for clarityXavier Claessens2016-09-051-14/+14
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: Keep a ref on joined binXavier Claessens2016-09-051-19/+21
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: code cleanupXavier Claessens2016-09-051-281/+206
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* stream: small fix in error code pathXavier Claessens2016-09-051-4/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766612
* Revert "rtsp-stream: Fix crash on cleanup with shared media and multiple udpsrc"Xavier Claessens2016-09-051-168/+131
| | | | | | | This partly reverts commit cba045e1b19fad6e689e10206f57903e15f1229a, but keeps unit tests. https://bugzilla.gnome.org/show_bug.cgi?id=766612
* sdp: add rollover counters for all sender SSRCAleix Conchillo Flaqué2016-06-141-0/+26
| | | | | | | | | | We add different crypto sessions in MIKEY, one for each sender SSRC. Currently, all of them will have the same security policy, 0. The rollover counters are obtained from the srtpenc element using the "stats" property. https://bugzilla.gnome.org/show_bug.cgi?id=730539
* rtsp-stream: Fix crash on cleanup with shared media and multiple udpsrcJake Foytik2016-04-291-131/+168
| | | | | | | | - Unicast udpsrcs are now managed in a hash table. This allows for proper cleanup in with shared streams and fixes a memory leak. - Unicast udpsrcs are now properly cleaned up when shared connections exit. See the update_transport() function. - Create unit test for shared media. https://bugzilla.gnome.org/show_bug.cgi?id=764744
* rtsp-stream: Always bind to ANY when address is a multicast address and not ↵Sebastian Dröge2016-04-291-10/+2
| | | | | | | | | only on Windows For IPv6 addresses, binding to a multicast group does not work on Linux either. Always bind to ANY and then later join the multicast group. https://bugzilla.gnome.org/show_bug.cgi?id=764679
* rtsp-server: Implement clock signalling according to RFC7273Sebastian Dröge2016-04-031-0/+77
| | | | | | | | | | | | | | | For NTP and PTP clocks we signal the actual clock that is used and signal the direct media clock offset. For all other clocks we at least signal that it's the local sender clock. This allows receivers to know which clock was used to generate the media and its RTP timestamps. Receivers can then implement network synchronization, either absolute or at least relative by getting the sender clock rate directly via NTP/PTP instead of estimating it from RTP timestamps and packet receive times. https://bugzilla.gnome.org/show_bug.cgi?id=760005
* rtsp-media: Add support for setting the multicast interfaceSebastian Dröge2016-03-251-2/+71
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=763000
* rtsp-stream: Don't set the state of the appsrc from PLAYING to PAUSED again ↵Sebastian Dröge2016-03-161-2/+0
| | | | | | | | | during setup This would get us NO_PREROLL in the bin again and break seeking. Thanks to Carlos Rafael Giani for helping to debug this! https://bugzilla.gnome.org/show_bug.cgi?id=740509
* rtsp-stream: Ensure that the pipeline is live and later-added udpsrcs are ↵Sebastian Dröge2016-03-101-3/+22
| | | | | | | | | | | | | syncing the state with the parent bin Without this, RECORD pipelines are broken because a) we wait for ASYNC_DONE which never happens anymore because udpsrc would be added later. Previously it was there earlier and due to NO_PREROLL caused the pipeline to preroll immediately b) the udpsrc for the pipeline is added later and never set to PLAYING state, as the corresponding code previously was only for PLAY pipelines. https://bugzilla.gnome.org/show_bug.cgi?id=763281
* rtsp-stream: Fix typo in the docstringJan Schmidt2016-03-111-1/+1
| | | | gst_rtsp_stream_set_client_side -> gst_rtsp_stream_is_client_side
* rtsp-stream: Disable multicast loopback for all our socketsSebastian Dröge2016-03-051-0/+2
| | | | | | | | | On Windows this is a receiver-side setting, on Linux a sender-side setting. As we provide a socket ourselves to udpsrc, udpsrc is never setting the multicast loopback setting on the socket... while udpsink does which unfortunately has no effect here on Windows but on Linux. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: Only bind multicast sockets to ANY on WindowsSebastian Dröge2016-03-041-3/+10
| | | | | | On Linux it is still needed to bind to the multicast address to filter out random other packets, while on Windows binding to multicast addresses just fails.
* rtsp-stream: Only use the address pool for unicast UDP if it contains ↵Sebastian Dröge2016-03-031-9/+8
| | | | | | | | | | | unicast addresses Otherwise we fail to allocate UDP ports if the pool only contains multicast addresses, which is something that used to work before. For unicast addresses if the pool contains none, we just allocate them as if there is no pool at all. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-server: Fix indentationSebastian Dröge2016-03-021-18/+21
|
* rtsp-stream: Don't bind the sockets to multicast addressesSebastian Dröge2016-03-021-0/+9
| | | | | | | This works on Linux but fails completely on Windows. You're supposed to bind to ANY and then join the multicast group. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: postpone UDP socket allocation until SETUPPatricia Muscalu2016-02-231-172/+165
| | | | | | | | | Postpone the allocation of the UDP sockets until we know what transport has been chosen by the client. Both unicast and multicast UDP sources are created in one function. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: postpone the creation of the UDP sourcesPatricia Muscalu2016-02-231-16/+59
| | | | | | | | | Code refactoring: allocate the UDP ports after the sender and the reciver parts have been created. We postpone the creation of the UDP sources until the UDP ports have been allocated. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: added function for setting UDP sources to PLAYING statePatricia Muscalu2016-02-231-0/+54
| | | | | | | Code refactoring: Introduced a function for setting UDP sources to PLAYING state. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: added function for creating and configuring UDP sourcesPatricia Muscalu2016-02-231-38/+43
| | | | | | Code refactoring: create and configure UDP sources in a separate function. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: added function for RTP/RTCP socket configurationPatricia Muscalu2016-02-231-8/+19
| | | | | | | Code refactoring: configure RTP and RTCP sockets for UDP sinks in a separate function. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: added function for creating and configuring UDP sinksPatricia Muscalu2016-02-231-64/+85
| | | | | | Code refactoring: create and configure UDP sinks in a separate function. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: added helper function for creating the sender/receiver partsPatricia Muscalu2016-02-231-127/+166
| | | | | | | Code refactoring: introduced helper function for creating the receiver and the sender parts of the streaming pipeline. https://bugzilla.gnome.org/show_bug.cgi?id=757488
* rtsp-stream: Add functions for using rtsp-stream from the clientJan Schmidt2016-01-291-2/+66
| | | | | | | | | Add a boolean to indicate that the rtsp-stream is running on the 'client' side of an RTSP connection, for sending streams via RECORD. In that case, the roles of the client/server ports in transport setup are swapped. https://bugzilla.gnome.org/show_bug.cgi?id=758180
* rtsp-stream: fixed assert during update transportSrimanta Panda2016-01-071-9/+13
| | | | | | | | When RTSP server trying update transport during multicast, it throws an assert. The assert is thrown because it is trying to get the parent of an non-existing funnel element. https://bugzilla.gnome.org/show_bug.cgi?id=760150