Commit graph

20 commits

Author SHA1 Message Date
Nirbheek Chauhan
5da9f62313 rtsp+rtmp: Forward warning added to tls-validation-flags to our users
With the 2.72 release, glib-networking developers have decided that
TLS certificate validation cannot be implemented correctly by them, so
they've deprecated it.

In a nutshell: a cert can have several validation errors, but there
are no guarantees that the TLS backend will return all those errors,
and things are made even more complicated by the fact that the list of
errors might refer to certs that are added for backwards-compat and
won't actually be used by the TLS library.

Our best option is to ignore the deprecation and pass the warning onto
users so they can make an appropriate security decision regarding
this.

We can't deprecate the tls-validation-flags property because it is
very useful when connecting to RTSP cameras that will never get
updates to fix certificate errors.

Relevant upstream merge requests / issues:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2214

https://gitlab.gnome.org/GNOME/glib-networking/-/issues/179

https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/193

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Bruce Liang
ebd8bd8f13 rtsp-client: Fix url for generating key in media factory
The mount point at / can be accessed by both the URL forms rtsp://<IP>:<PORT> and rtsp://<IP>:<PORT>/.
To make media factory generating the same key for both the URL forms, the url sent to gst_rtsp_media_factory_construct() needs to be normalized first.
This commit creates a new GstRTSPUrl as the normalized url to send to gst_rtsp_media_factory_construct().

Fixes:https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1297

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2681>
2022-07-12 10:01:35 +00:00
Patricia Muscalu
6c3445a83f rtsp-media: Correct logic on GstRTSPStreamBlocking message reception
We must take into account the receiving streams as well when calculating
the expected number of the received GstRTSPStreamBlocking messages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2429>
2022-05-20 07:37:05 +00:00
Pierre Bourré
4ac544d5aa rtspclientsink: fix possible shutdown deadlock collect_streams()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1696>
2022-04-22 18:14:04 +00:00
Sebastian Dröge
a91b1c64a1 rtsp-server: Add RFC5576 Source-specific media attribute to the SDP media for signalling the CNAME
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132>
2022-04-20 14:40:25 +00:00
Marc Leeman
5926da85ba gst-rtsp-server: minor spelling fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2170>
2022-04-13 14:38:52 +02:00
Matthew Waters
67e364b34d rtsp-stream: remove unused variable:
Fixes:

../gst/rtsp-server/rtsp-stream.c:2670:9: error: variable 'n_messages' set but not used [-Werror,-Wunused-but-set-variable]
  guint n_messages = 0;
        ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Vivienne Watermeier
8cb5d9f49e documentation: improve misleading wording
The documentation for several gst_*_writable_structure functions stated
that they would never return NULL, without making clear that the passed
object is required to be writable. This changes the wording in those
cases to make that requirement more clear.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1784>
2022-03-17 11:56:37 +00:00
Branko Subasic
41d436e56e gst-rtsp-server: fix race in rtsp-client
When tunneling over HTTP, if connection on the second channel happens
before the control timer is created we may trigger an assert in
rtsp_ctrl_timeout_remove(). Avoid that by taking the priv->lock before
attaching the client thread to the context.

Fixes #1025

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1867>
2022-03-07 09:15:11 +00:00
Fabrice Fontaine
e637aae629 rtsp-server: add gst_dep to gst_rtsp_server_deps
Add gst_dep to gst_rtsp_server_deps, in the context of buildroot, this
will avoid the following build failure, because the correct girdir
location will be retrieved from gstreamer-1.0.pc:

/home/giuliobenetti/autobuild/run/instance-3/output-1/host/riscv32-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler gst/rtsp-server/GstRtspServer-1.0.gir --output gst/rtsp-server/GstRtspServer-1.0.typelib --includedir=/usr/share/gir-1.0
Could not find GIR file 'Gst-1.0.gir'; check XDG_DATA_DIRS or use --includedir
error parsing file gst/rtsp-server/GstRtspServer-1.0.gir: Failed to parse included gir Gst-1.0
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"

Fixes:
 - http://autobuild.buildroot.org/results/04af6b22cfa0cffb6a3109a3b32b27137ad2e0b0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1460>
2021-12-20 13:08:33 +00:00
Mathieu Duponchelle
79f11eb778 rtsp-stream: fix get_rates raciness
Prior to this patch, we considered that a stream was blocking
whenever a pad probe was triggered for either the RTP pad or
the RTCP pad.

This led to situations where we subsequently unblocked and expected
to find a segment on the RTP pad, which was racy.

Instead, we now only consider that the stream is blocking when
the pad probe for the RTP pad has triggered with a blockable object
(buffer, buffer list, gap event).

The RTCP pad is simply blocked without affecting the state of the
stream otherwise.

Fixes #929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1452>
2021-12-16 22:18:12 +00:00
Tim-Philipp Müller
3603d94080 rtsp-server: define G_LOG_DOMAIN
Fixes #634

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009>
2021-10-19 00:12:25 +00:00
Thibault Saunier
6e79932ad9 meson: List libraries and their corresponding gir definition
Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier
e2dd28a753 meson: Mark files as files()
Making it more robust and future proof

And fix issues that it creates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Sebastian Dröge
14d636b224 rtsp-media: Unprepare suspended medias too
Previously suspended medias immediately reached the UNPREPARED state
without going through the media's unprepare() vfunc. This didn't allow
the media subclass to do any additional cleanup, and for example the
shutdown-eos property of GstRTSPMedia was ignored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1090>
2021-10-07 11:16:39 +00:00
Sebastian Dröge
e9d551b45c rtsp-media: Only unprepare a media if it was not already unpreparing anyway
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1083>
2021-10-07 05:28:19 +00:00
Ognyan Tonchev
7ba665995f rtsp-client: make sure sessmedia will not get freed while used
handle_*_request() functions were all retrieving the session media from
the session by calling gst_rtsp_session_get_media () which is a transfer-none
call. If a session timeout happens at that time, the session media may get freed
making the pointer invalid..

Fixes #757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1053>
2021-10-06 19:42:43 +00:00
Sebastian Dröge
55222db66e rtsp-media: Also mark receive-only (RECORD) medias as prepared when unsuspending
Previously the status was only changed for other medias.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1058>
2021-10-05 16:40:07 +00:00
Sebastian Dröge
7aa88364ac rtsp-session: Don't unref medias twice if it is removed inside gst_rtsp_session_filter() while the mutex is shortly released
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1004>
2021-10-01 21:15:44 +00:00
Thibault Saunier
a43d7eaef4 Move files from gst-rtsp-server into the "subprojects/gst-rtsp-server/" subdir 2021-09-24 16:15:21 -03:00