Commit graph

13 commits

Author SHA1 Message Date
Mathieu Duponchelle 04077ce906 onvif: tests: check for T flag on all packets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Jacob Johnsson eb0272e210 rtsp-server: Add new ensure-keyunit-on-start property
While the suspend modes NONE and PAUSED provided a low startup latency
for connecting clients they did not ensure that streams started on
fresh data.

With this property we can maintain the low startup latency of those
suspend modes while also ensuring that a stream starts on a key unit.
Furthermore, by modifying the value of a new property,
ensure-keyunit-on-start-timeout, it is possible to accept a keyunit of
a certain age but discard it if too much time has passed and instead
force a new keyunit.

Fixes #2443

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4334>
2023-10-02 16:22:33 +00:00
Nirbheek Chauhan 8e1b6accbd meson: Always use forward slashes in defines with paths
Fixes the following build failure on MSYS2:

```
../subprojects/gstreamer/tests/check/elements/filesrc.c: In function 'test_seeking':
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: error: incomplete universal character name \U
  107 |   g_object_set (G_OBJECT (src), "location", TESTFILE, NULL);
      |                                                     ^
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\A'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\s'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\g'
../subprojects/gstreamer/tests/check/elements/filesrc.c:107:53: warning: unknown escape sequence: '\c'
```

Due to: `-DTESTFILE=\"C:\\Users\\Administrator\[...]`

https://gitlab.freedesktop.org/nirbheek/gstreamer/-/jobs/45317733

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5018>
2023-07-12 21:17:25 +00:00
Stéphane Cerveau dd17beb681 gstreamer-full: add full static support
Allow a project to use gstreamer-full as a static library
and link to create a binary without dependencies.

Introduce the option 'gst-full-target-type' to
select the build type, dynamic(default) or static.

In gstreamer-full/static build configuration gstreamer (gst.c)
needs the symbol gst_init_static_plugins which is defined
in gstreamer-full.
All the tests and examples are linking with gstreamer but the
symbol gst_init_static_plugins is only defined in the gstreamer-full
library. gstreamer-full can not be built first as it needs to know what plugins
will be built.

One option would be to build all the examples and tests after
gstreamer-full as the tools.

Disable tools build in subprojects too as it will be built at the end of
build process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
2023-05-31 15:17:11 +00:00
Sebastian Dröge 55c961a4dc rtsp-server: media-factory: Make sure a shared media is actually still usable
Previously it was possible that a shared media was just in the process
of being unprepared because the last client disappeared, while another
client retrieved it from the cache and then tried to use it. Unless the
media was reusable this would've then failed unnecessarily.

To avoid this it is necessary to lock the media directly in
gst_rtsp_media_factory_construct() and return a locked media. After
locking the cached media it is necessary to check if the media was ever
unprepared or is actually reusable and based on that either reuse it or
create a new media.

This minimally changes the gst_rtsp_media_factory_construct() API to
always return a locked media, and adds a new
gst_rtsp_media_can_be_shared() function to check if a media can actually
be shared in practice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4606>
2023-05-19 11:09:48 +00:00
Peter Stensson ec605e7b52 rtsp-server: Add support for adjusting request response on pipeline errors
The idea is to give the application the possibility to adjust the error
code when responding to a request. For that purpose the pipeline's bus
messages are emitted to subscribers through a signal handle-message.
The subscribers can then check those messages for errors and adjust
the response error code by overriding the virtual method
adjust_error_code().

Fixes #1294

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2972>
2022-10-11 07:42:28 +02:00
Mathieu Duponchelle 4cd3830bc8 tests/onvif: improve robustness
The previous iteration of the code was inferring the type of the
frame by looking at the overall size of the gst-payloaded packet.

It is more robust to actually parse the payload and look at the
actual data buffers it contains.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2303>
2022-04-27 06:39:24 +00:00
Mathieu Duponchelle 9689693534 tests/onvif: don't push buffers outside segment
segment->stop is exclusive, so in reverse playback mode we do not
need to output a buffer at that position as it will simply get
clipped in basesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2303>
2022-04-27 06:39:24 +00:00
Branko Subasic 2689277a6b rtponviftimestamp: add support for using reference timestamps
Make it posible to configure the element to obtain the timestamps from
reference timestamp meta data instead of using the ntp-offset property,
or estimating its own offset. Currently the only time format supported
is "timestamp/x-unix", i.e. UTC time expressed in the unix time epoch.

In addition the custom event GstNtpOffset has been renamed to
GstOnvifTimestamp, to reflect that it is not necessarily used to convey
the ntp-offset. As a consequence we had to modify a couple of files in
the rtsp-server as well.

Fixes #984

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1683>
2022-03-11 08:39:50 +00:00
Branko Subasic 52c0763042 gst-rtsp-server: Plug a few memory leaks in tests
Found and fixed a few memory leaks in the gst_rtspserver, gst_onvif and
gst_stream tests by running the tests in valgrind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1742>
2022-03-07 13:57:27 +00:00
Tim-Philipp Müller 8dfab0b08c meson: update for meson.build_root() and .build_source() deprecation
-> use meson.project_build_root() or .global_build_root() instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller f1bb2c76c6 meson: update for dep.get_pkgconfig_variable() deprecation
... in favour of dep.get_variable('foo', ..) which in some
cases allows for further cleanups in future since we can
extract variables from pkg-config dependencies as well as
internal dependencies using this mechanism.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
2021-10-20 11:20: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