Commit graph

113579 commits

Author SHA1 Message Date
Tim-Philipp Müller 4bbb293eac Release 1.20.1 2022-03-14 11:33:40 +00:00
Tim-Philipp Müller b888003273 Update ChangeLogs for 1.20.1 2022-03-14 11:33:25 +00:00
Nicolas Dufresne 4563989deb doc: Fix doc comment for GstChildProxy
This removes warning like:

../subprojects/gstreamer/gst/gstchildproxy.h:57: Error: Gst: identifier not found on the first line:
   * #GstChildProxyInterface::get_child_by_name:
     ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1951>
2022-03-14 09:12:33 +00:00
Guillaume Desmottes fde6521664 rtpsource: fix rtp_source_get_nack_deadlines doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1950>
2022-03-14 03:48:13 +00:00
Nicolas Dufresne 12f082f7cf vp9parse: Fix auto-plugging of HW frame decoder
Decoders that required frame aligmment and didn't have an associated
alpha decoder were skipped. This is because the parser was constructing
caps based on the software alpha decoder, which specify super-frame
alignment.

Iterate over the caps to filter the one that have a matching codec-alpha, with
the semantic the no codec-alpha field means codec-alpha=false. Then if
everything was removed, callback to the original, so that the first non-alpha
decoder will be picked.

Fixes #820

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1949>
2022-03-14 03:04:46 +00:00
Tim Mooney fcfade3259 v4l2: include <sys/ioccom.h> on Illumos
Needed for _IOR/_IORW

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1947>
2022-03-14 02:19:37 +00:00
Hou Qi 61820ed0dc v4l2bufferpool: Fix race condition between qbuf and pool streamoff
There is a chance that pool->buffers[index] sets BUFFER_STATE_QUEUED, but
it has not been queued yet which makes pool->buffers[index] still NULL.
At this time, if pool_streamff release all buffers with BUFFER_STATE_QUEUED
state regardless of whether the buffer is NULL or not, it will cause segfault.

To fix this, also check buffer when streamoff release buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1948>
2022-03-14 00:57:24 +00:00
Jan Alexander Steffens (heftig) 832367c58e deinterlace: scalerbob: Reduce latency to 0
We only need the current field, just like `linear`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1944>
2022-03-13 00:13:35 +00:00
Seungha Yang 4bd486b9b7 nvenc: Fix deadlock because of too strict buffer pool size
The pool size might need to be larger than encoding surface pool size.
Also, because we always copy input frame into internal CUDA memory,
there's no reason to restrict max size of buffer pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1942>
2022-03-12 23:15:38 +00:00
Vivia Nikolaidou 7fac3c2c29 yadif: Fix CHECK macro for YUY2 format
Used to make comb artifacts for videotestsrc pattern=ball for YUY2
format only (not AYUV).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1943>
2022-03-12 19:56:44 +00:00
Seungha Yang d58aca531b nvh265sldec: Always fill SPS/PPS related parameters
Address compare was not a valid approach since it works
only if SPS/PPS id are changed. Otherwise it will always point to
the same address of member variables of h265parser.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1941>
2022-03-12 17:24:54 +00:00
Seungha Yang 35416105d8 h264decoder: Fix invalid memory access
gst_h264_dpb_needs_bump() can be called with null picture
in case of live

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1929>
2022-03-11 11:02:48 +00:00
Tim-Philipp Müller 41c1d913df sdpdemux: add media attributes to caps to fix ptp clock handling
Those are needed by rtpjitterbuffer to do the right thing, e.g.

a=ts-refclk:ptp=IEEE1588-2008:00-**-**-**-**-**-**-**:0
a=mediaclk:direct=1266592257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1925>
2022-03-10 23:44:06 +00:00
Edward Hervey 03522dcd95 mpegts: Handle glib < 2.58
By using a workaround to the lack of g_ptr_array_steal_index.

Fixes #1078

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1919>
2022-03-10 18:34:59 +00:00
Edward Hervey 2445c31c15 tsbase: Handle more program updates
There could be a case where the new program has the same program number as the
previous one ... but is actually located on a PID previously used for elementary
stream. In that case the program is guaranteed to not be an update of the
previous program but a completely new one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1919>
2022-03-10 18:34:59 +00:00
Edward Hervey ad74ba6100 mpegtsbase: Use an array to track programs
We need to be able to look for programs by their PID also. Using a hash table
was a bit sub-par (and overkill) for storing a range of programs.

This is needed because there could potentially be two programs with the same
program id but different PMT PID (while one is being deactivated the new one
would "exist").

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1919>
2022-03-10 18:34:59 +00:00
Nirbheek Chauhan 2fd6e40a7f rtpbasepayload: Remove dead twcc code
This feature was removed in 7a53fbad68,
but this code was left behind.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1922>
2022-03-10 16:20:26 +00:00
Sangchul Lee 3890ef40d8 rtpvp8depay: Fix crash when making 'GstRTPPacketLost' custom event
This patch fixes a seg.fault in gst_structure_new() with warnings as below.

GLib-GObject-WARNING **:
 ../gobject/gtype.c:4330: type id '0' is invalid
GLib-GObject-WARNING **:
 can't peek value table for type '<invalid>' which is not currently referenced

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1920>
2022-03-10 11:16:18 +00:00
Mathieu Duponchelle 19086d693e gst-python: gstmodule.c: fix build with 3.11
https://docs.python.org/fr/3.10/whatsnew/3.10.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1910>
2022-03-09 18:36:21 +00:00
Nirbheek Chauhan b9574c5e6a soup: Load the runtime library, not the development library
libsoup-2.4.so / libsoup-3.0.so are symlinks installed by development
packages, they are not available at runtime.

Also eliminate G_MODULE_SUFFIX since it's not useful for us, and is
actually incorrect on macOS anyway.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1907>
2022-03-09 16:36:04 +00:00
Jan Schmidt a7deddd98a playbin3: Add lock to protect buffering messages
Fix a small race where a group can receive stream-start
and post a pending buffering message just as another
thread posts a different buffering message, causing them
to be received by the application out of order. In the
worst case, this leads the application receiving a
stale 99% buffering message and going back to buffering
right after the 100% buffering message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1901>
2022-03-09 09:15:04 +00:00
Jan Alexander Steffens (heftig) 49af4733db mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1895>
2022-03-08 16:03:21 +00:00
Jan Alexander Steffens (heftig) 1a024521c0 mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1895>
2022-03-08 16:03:21 +00:00
Havard Graff 9b75fc0788 rtprtx: don't access type-system per buffer
When doing only a single stream of audio/video this hardly matters,
but when doing many at the same time, the fact that you have to get
a hold of the glib global type-system lock every time you process a buffer,
means that there is a limit to how many streams you can process in
parallel.

Luckily the fix is very simple, by doing a cast rather than a full
type-check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1890>
2022-03-08 14:27:30 +00:00
Havard Graff c25808c3c8 rtprtx: signed/unsigned and style fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1888>
2022-03-08 12:39:56 +00:00
Philippe Normand 04cd620ed7 gstplay: tests: Keep track of errors/warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1871>
2022-03-07 12:07:11 +00:00
Philippe Normand aaade8b62e gstplay: Do not error out on message parsing failures
Specially when parsing errors and warnings, the details field can be NULL and
the gst_structure_get() call would return FALSE in such cases, triggering false
positive errors.

Follow-up for #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1871>
2022-03-07 12:07:11 +00:00
Philippe Normand f1f6d01ea5 gstplay: Fix warning parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

See also #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1871>
2022-03-07 12:07:11 +00:00
Branko Subasic 341e55e9f2 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/1870>
2022-03-07 11:02:13 +00:00
Seungha Yang 2aa8ef4173 gldisplay: Reorder GST_GL_WINDOW check for egl-device
"egl-device" should be checked before the "egl", otherwise unexpected egl will be picked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1862>
2022-03-05 00:28:17 +00:00
Jan Alexander Steffens (heftig) 4b41af5d65 deinterlace: Prevent race between _set_method and latency query
It's possible that the method is being manipulated while downstream
queries our latency, leading to crashes.

Prevent that from happening.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1859>
2022-03-04 17:17:19 +00:00
Edward Hervey 5ff65fbca7 tsdemux: Handle PES headers bigger than a mpeg-ts packet
While the actual PES header parser could notify us that it needed more data, we
would never actually act on it.

This commit will accumulate incoming packets in such situation and re-attempt
the header parsing.

Fixes #1027

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1858>
2022-03-04 16:08:08 +00:00
Philippe Normand ca273f3454 play: Fix error parsing API
The GError is an out parameter, so should be a ** parameter, like the details
parameter.

Fixes #1063

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1850>
2022-03-04 10:54:56 +00:00
Nirbheek Chauhan 061d3d8cf8 soup: Fix static build with MSVC
../ext/soup/gstsouploader.c(818): error C4098: '_soup_session_send_async': 'void' function returning a value

It's technically a false warning, but that's how MSVC works, so fix
it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
2022-03-03 18:46:31 +00:00
Nirbheek Chauhan a0ad4b15dd soup: Fix pkgconfig generation and documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
2022-03-03 18:46:31 +00:00
Nirbheek Chauhan 299703f297 soup: Fix static build when default_library=both
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
2022-03-03 18:46:31 +00:00
Nirbheek Chauhan 06e79311c5 soup: Don't error out in static build unless option is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
2022-03-03 18:46:31 +00:00
Philippe Normand 496aa91a5e soup: Lookup libsoup dylib files on Apple platforms
Fixes #1007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1846>
2022-03-03 18:46:31 +00:00
Sebastian Dröge 6c14e7f518 matroska-mux: Handle pixel-aspect-ratio caps field correctly when checking caps equality
Not having this field is equivalent with it being 1/1 so consider
it like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1833>
2022-03-02 15:44:04 +00:00
Sebastian Dröge bae270dd26 matroska-mux: Handle multiview-mode/flags caps fields correctly when checking caps equality
Not having these fields is equivalent with them being mono/0 so consider
them like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1833>
2022-03-02 15:44:04 +00:00
Nirbheek Chauhan 655a8e69e3 webrtc_sendrecv.py: Sync element props with C version
Also add indentation to make it easier to read

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan 3680fca1db webrtc_sendrecv.py: Ensure that gst-python overrides are installed
Otherwise fetching of the offer will fail with a cryptic error:

```
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 56, in on_offer_created
    offer = reply['offer']
TypeError: 'Structure' object is not subscriptable
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan 4008e6d741 webrtc_sendrecv.py: Don't try to set state on a None pipe
```
ERROR peer '5762' not found
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 190, in <module>
    res = loop.run_until_complete(c.loop())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 155, in loop
    self.close_pipeline()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 142, in close_pipeline
    self.pipe.set_state(Gst.State.NULL)
AttributeError: 'NoneType' object has no attribute 'set_state'
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan 4a36e32ff2 webrtc_sendrecv.py: Fix SSLError when connecting to websocket server
```
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 189, in <module>
    loop.run_until_complete(c.connect())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 40, in connect
    self.conn = await websockets.connect(self.server, ssl=sslctx)
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/lib64/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1110, in _create_connection_transport
    await waiter
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 631, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 676, in _process_write_backlog
    ssldata = self._sslpipe.do_handshake(
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 116, in do_handshake
    self._sslobj = self._context.wrap_bio(
  File "/usr/lib64/python3.10/ssl.py", line 526, in wrap_bio
    return self.sslobject_class._create(
  File "/usr/lib64/python3.10/ssl.py", line 865, in _create
    sslobj = context._wrap_bio(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan e24e69f81c webrtc_sendrecv.py: Fix deprecation warning with Python 3.10
asyncio.get_event_loop() will not implicitly create a new event loop
in a future version of Python, so we need to do that explicitly.

```
webrtc_sendrecv.py:188: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan d80d9a023b webrtc_sendrecv.py: Fix styling errors
These are now enforced by the pre-commit python style hook.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Nirbheek Chauhan 854884d5c3 webrtc: Update Makefile for building webrtc-sendrecv
This now needs the RTP library.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1832>
2022-03-02 10:15:40 +00:00
Sebastian Fricke 86cdb62fa8 meson: Adjust ninja usage restriction info for devenv
The documentation within meson highlights, that `ninja` can be used
without problems for any case except `ninja reconfigure`. The warning
however describes to the user, that `ninja` shouldn't be used at all.
Fix the warning.

Fixes: 01eb252f67 Don't allow people to run meson inside the uninstalled env
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1829>
2022-03-01 23:47:35 +00:00
Sebastian Fricke 53b33cc4f2 docs: Fix typos in documentation
In building-from-source-using-meson.md:
s/implicitely/implicitly/

In README.md:
s/uncompatible/incompatible/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1829>
2022-03-01 23:47:35 +00:00
Sebastian Fricke f6e01d1ed0 docs: Extend documentation for the GStreamer development environment
Add more extensive documentation for the development environment.
Document how the tool works, how to use it and common use cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1829>
2022-03-01 23:47:35 +00:00