Commit graph

1770 commits

Author SHA1 Message Date
Sebastian Dröge
ac5213dcdf rtspclientsink: Add "update-sdp" signal that allows updating the SDP before sending it to the server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/178>
2021-01-08 13:26:01 +00:00
John Lindgren
d6d3ecaafb Add test cases for mountpoint of '/'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/168>
2020-12-23 19:45:13 +00:00
John Lindgren
c4762da9b7 Make a mount point of "/" work correctly.
As far as I can tell, this is neither explicitly allowed nor
forbidden by RFC 7826.

Meanwhile, URLs such as rtsp://<IP>:554 or rtsp://<IP>:554/ are in
use in the wild (presumably with non-GStreamer servers).

GStreamer's prior behavior was confusing, in that
gst_rtsp_mount_points_add_factory() would appear to accept a mount
path of "" or "/", but later connection attempts would fail with a
"media not found" error.

This commit makes a mount path of "/" work for either form of URL,
while an empty mount path ("") is rejected and logs a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/168>
2020-12-23 19:45:13 +00:00
Sebastian Dröge
9f42f941d7 rtspclientsink: Use proper types instead of G_TYPE_POINTER for the RTSP messages in the "handle-request" signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/177>
2020-12-21 10:18:05 +00:00
Tobias Ronge
07c009dc80 rtsp-media: Only count senders when counting blocked streams
Only sender streams sends the GstRTSPStreamBlocking message, so only
these should be counted before setting media status to prepared.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/180>
2020-12-17 15:28:29 +01:00
Jimmi Holst Christensen
d1783cf381 rtspclientsink add proper support for uri queries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/166>
2020-12-15 10:14:04 +00:00
Lawrence Troup
6bf45b5965 rtsp-client: Only unref client watch context on finalize, to avoid deadlock
Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/issues/127

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/176>
2020-12-15 12:06:32 +13:00
Mathieu Duponchelle
5b08a6042d rtsp-stream: collect a clock_rate when blocking
This lets us provide a clock_rate in a fashion similar to the
other code paths in get_rtpinfo()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/174>
2020-11-18 20:36:50 +01:00
Sebastian Dröge
c1ede049eb rtsp-media: Use guint64 for setting the size-time property on rtpstorage
Otherwise this will cause memory corruption as the property expects a 64
bit integer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/169>
2020-11-16 10:34:41 +02:00
David Phung
4f673af4b5 rtsp-media: Ignore GstRTSPStreamBlocking from incomplete streams
To prevent cases with prerolling when the inactive stream prerolls first
and the server proceeds without waiting for the active stream, we will
ignore GstRTSPStreamBlocking messages from incomplete streams. When
there are no complete streams (during DESCRIBE), we will listen to all
streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/167>
2020-11-11 13:59:09 +01:00
Kristofer Björkström
1c8a6af13c media test: Add test for seeking one active stream with a demuxer
Add another seek_one_active_stream test but with a demuxer. The demuxer
will flush both streams in opposed to the existing test which only
flushes the active stream. This will help exposing problems with the
prerolling process after a flushing seek.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/167>
2020-11-11 13:58:15 +01:00
Xavier Claessens
6f336227cd Meson: Use pkg-config generator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/1>
2020-10-23 14:03:43 +00:00
Sebastian Dröge
e7e0343a5b meson: update glib minimum version to 2.56
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/164>
2020-10-19 11:25:25 +03:00
Mathieu Duponchelle
1730940abd rtsp-media-factory: expose API to disable RTCP
This is supported by the RFC, and can be useful on systems where
allocating two consecutive ports is problematic, and RTCP is not
necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/159>
2020-10-10 02:06:18 +02:00
Mathieu Duponchelle
5029335dcb git: use our standard pre commit hook
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/162>
2020-10-08 21:48:55 +00:00
Mathieu Duponchelle
6d319f8e49 rtsp-stream: make use of blocked_running_time in query_position
When blocking, the sink element will not have received a buffer
yet and the position query will fail. Instead, we make use of
the running time of the buffer we blocked on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/160>
2020-10-08 22:28:04 +02:00
Mathieu Duponchelle
a446ba4fb0 rtsp-stream: collect rtp info when blocking
We don't unblock the stream anymore before replying to the
play request (883ddc72bb),
so the sinks don't have a last-sample after potentially flush
seeking. seek_trickmode waits for preroll however, which means
the stream will block and wait for a first buffer. Subsequent
calls to get_rtpinfo() can thus make use of the information.

See https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/issues/115

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/160>
2020-10-08 22:28:04 +02:00
Seungha Yang
6a1e121a54 examples: Add an example for loop playback
This demo example shows a way of file loop playback of a given source.
Note that client seek request is not properly implemented yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/154>
2020-09-30 19:47:18 +09:00
David Phung
1589cb737b rtsp-media: Plug memory leak
The get-storage signal of rtpbin increases the ref count of the storage.
So we have to unref it after usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/155>
2020-09-29 10:58:37 +02:00
Guiqin Zou
c747711ac5 rtsp-media: Get rates only on sender streams
When play a media with both sender and receiver stream, like ONVIF
back channel audio in, gst_rtsp_media_get_rates call
gst_rtsp_stream_get_rates for each stream to set the rates. But
gst_rtsp_stream_get_rates return false for the receiver steam, which
lead a g_assert crash.

Instead to get rates on all streams, now just get rates on sender
streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/150>
2020-09-18 07:02:12 +00:00
Mathieu Duponchelle
3b9eaa092e rtsp-media: set a 0 storage size for TCP receivers
ulpfec correction is obviously useless when receiving a stream
over TCP, and in TCP modes the rtp storage receives non
timestamped buffers, causing it to queue buffers indefinitely,
until the queue grows so large that sanity checks kick in and
warnings start to get emitted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/149>
2020-09-09 20:18:44 +00:00
Mathieu Duponchelle
5699ada939 rtsp-stream: preroll on gap events
This allows negotiating a SDP with all streams present, but only
start sending packets at some later point in time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/146>
2020-09-09 17:46:40 +00:00
Mathieu Duponchelle
883ddc72bb rtsp-media: do not unblock on unsuspend
rtsp_media_unsuspend() is called from handle_play_request()
before sending the play response. Unblocking the streams here
was causing data to be sent out before the client was ready
to handle it, with obvious side effects such as initial packets
getting discarded, causing decoding errors.

Instead we can simply let the media streams be unblocked when
the state of the media is set to PLAYING, which occurs after
sending the play response.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/147>
2020-09-08 21:09:30 +00:00
Tim-Philipp Müller
17edff4926 ci: include template from gst-ci master branch again 2020-09-08 17:30:49 +01:00
Tim-Philipp Müller
3b08c08cf9 Back to development 2020-09-08 16:58:58 +01:00
Tim-Philipp Müller
12eef97248 Release 1.18.0 2020-09-08 00:08:29 +01:00
Tim-Philipp Müller
1984e679bd Release 1.17.90 2020-08-20 16:15:06 +01:00
Jordan Petridis
e3e946c0b0 rtsp-thread-pool.c: fix clang 10 warning
clang 10 is complaining about incompatible types due to the
glib typesystem.

```
../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-thread-pool.c:534:10: error: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'GThreadPool **' (aka 'struct _GThreadPool **') [-Werror,-Wincompatible-pointer-types]
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/145>
2020-08-03 22:29:49 +03:00
Jordan Petridis
3254b992aa rtsp-thread-pool.c: fix clang 10 warning
clang 10 is complaining about incompatible types due to the
glib typesystem.

```
../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-thread-pool.c:534:10: error: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'GThreadPool **' (aka 'struct _GThreadPool **') [-Werror,-Wincompatible-pointer-types]
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/145>
2020-08-03 19:34:30 +03:00
Srimanta Panda
e55515188d rtsp-sdp: Fix resource leak in mikey messsage
Fixed a resource leak for mikey message while adding crypto session
failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/144>
2020-07-15 11:19:40 +02:00
Tim-Philipp Müller
af290ae0e0 meson: set release date from .doap file for releases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/143>
2020-07-08 17:28:57 +01:00
Mathieu Duponchelle
34590b342e rtsp-stream: explicitly set caps on udpsrc elements
This causes them to send caps events before data flow, which is
usually a pretty correct thing to do!

Not doing so manifested in a bug where ssrcdemux wouldn't forward
the caps it had received with an extra ssrc field, as it hadn't
received any caps event.

Fixes #85

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/141>
2020-07-06 10:20:32 +00:00
Tim-Philipp Müller
60d8ed7d4f Back to development 2020-07-03 02:04:04 +01:00
Tim-Philipp Müller
ab4952a786 Release 1.17.2 2020-07-03 00:33:55 +01:00
Thibault Saunier
289350572d doc: Stop documenting properties from parents 2020-06-23 12:08:40 -04:00
Sebastian Dröge
0696b699ab docs: Fix version in the plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/138>
2020-06-22 20:04:45 +03:00
Sebastian Dröge
1c74592806 rtspclientsink: Don't call gst_ghost_pad_construct() anymore
It's deprecated, unneeded and doesn't do anything anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/138>
2020-06-22 12:33:32 +03:00
Tim-Philipp Müller
7174f04103 Back to development 2020-06-20 00:28:28 +01:00
Tim-Philipp Müller
f9f649ea6a Release 1.17.1 2020-06-19 19:24:39 +01:00
Sebastian Dröge
fb8004a6eb rtsp-media: Add/configure transports when completing the pipeline
Otherwise the transports are not set up yet during the PLAY request
handling when unsuspending (and thus unblocking) the media.

In case of live pipelines this then causes the first few packets to go
to the sinks before they know what to do with them, and they simply
discard them which is rather suboptimal in case of keyframes.

For non-live pipelines this is not a problem because the sink will still
be PAUSED and as such not send out the data yet but wait until it goes
to PLAYING, which is late enough.

Adding the transports multiple times is not a problem: if the transport
is already added it won't be added another time and TRUE will be
returned.

This fixes a regression introduced by a7732a68e8
before 1.14.0.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/issues/107

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
2020-06-15 19:45:38 +03:00
Sebastian Dröge
5562656ec0 rtsp-media: Fix misleading comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
2020-06-15 19:45:21 +03:00
Sebastian Dröge
b681200673 rtsp-media: Make sure to also unblock pads when going to PLAYING while buffering
The pad probes are not needed anymore at this point and later when
reaching buffering 100% only the state is changed, no unblocking
happens.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
2020-06-15 18:29:13 +03:00
Sebastian Dröge
e4624197da rtsp-media: Remove duplicated media_unblock() function
It does literally the same as media_streams_set_blocked(FALSE).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
2020-06-15 18:17:40 +03:00
Lenny Jorissen
ef408ee167 test-onvif-server: cast ntp-offset property value to 64 bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/134>
2020-06-12 19:02:29 +02:00
Thibault Saunier
e16cbc217e docs: Update plugins cache 2020-06-10 13:37:17 +00:00
Mathieu Duponchelle
ec5aa720d7 onvif-media-factory: define autoptr cleanup function
And have the factory in the onvif-server example inherit from
GstRTSPOnvifMediaFactory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/133>
2020-06-10 11:51:31 +00:00
Thibault Saunier
e9e15579e6 docs: Update plugins cache 2020-06-09 08:38:48 -04:00
Guillaume Desmottes
77eead2874 tests: enforce I420 format
Test was not enforcing a video format on videotestsrc. I420 was picked as it
was the first format in GST_VIDEO_FORMATS_ALL which will no longer be
true (gst-plugins-base!689).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/129>
2020-06-08 09:45:15 +02:00
Mathieu Duponchelle
7e598e9184 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:41:51 +02:00
Thibault Saunier
11f4fe79d7 doc: Require hotdoc >= 0.11.0 2020-06-03 18:36:25 -04:00