Commit graph

636 commits

Author SHA1 Message Date
Maksym Khomenko
185307f0be appsink: add missing make_writable call
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5013>
2023-07-11 13:21:52 +01:00
Thibault Saunier
0e633b2a90 bad: audioaggregator: Do not post message before being constructed
`gst_aggregator_set_latency` will post a message on the bus which
triggers traces for not constructed objects which fails in rust tracers
as object should have names in all traces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4984>
2023-07-10 19:00:49 +01:00
Guillaume Desmottes
cdff561a76 subtitleoverlay: fix mutex error if sink caps is not video
We were trying to unlock a mutex that was not locked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4972>
2023-07-05 13:20:34 +01:00
Tim-Philipp Müller
adafbe4fad Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4907>
2023-06-20 19:10:38 +01:00
Tim-Philipp Müller
064711d8b3 Release 1.22.4 2023-06-20 17:42:25 +01:00
Sebastian Dröge
1d9b360708 subparse: Skip after the end of a valid closing tag instead of only skipping <
This is a small optimization and avoids restarting the next parsing
iteration on already accepted data.

On its own it would also fix ZDI-CAN-20968 (see previous commit) but the
previous commit independently is also a valid fix for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4898>
2023-06-20 09:23:07 +00:00
Sebastian Dröge
518ecba8f9 subparse: Look for the closing > of a tag after the opening <
Previously when fixing up subrip markip, we were looking from the start
of the remaining buffer instead. Due to how skipping over closing tags
works, the remaining buffer will still contain the closing `>` of the
previous tag so if a unexpected closing tag is found after another
closing tag, we would potentially do an out of bounds memmove().

Fixes ZDI-CAN-20968
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2662

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4898>
2023-06-20 09:23:07 +00:00
Sebastian Dröge
7bcd791fab tags: Don't allow image tags with G_MAXUINT32 length
This will cause an integer overflow a little bit further down because we
allocate a bit more memory to allow for a NUL-terminator.

The caller should've avoided passing that much data in already as it's
not going to be a valid image and there's likely not even that much data
available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4897>
2023-06-20 09:16:37 +01:00
Haihua Hu
4ab685c2a3 glfilter: add parent meta to output buffer for input buffer
glfilter will unref input buffer after _transform() call immidiately,
but gpu may still reading input buffer for rendering because gl
api is executed async. Need hold reference for input buffer by
adding parent meta to output buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4846>
2023-06-13 12:34:57 +01:00
Xavier Claessens
b226b62ae3 opus: Fix crash when getting unexpected channel position
gst_opus_channel_names is a static array with only 13 items.
GstAudioChannelPosition have bigger values than that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4843>
2023-06-13 09:23:59 +01:00
William Manley
da06637e4e basetextoverlay: Fix typo in "text-y" property description
Looks like a copy and paste error.

Co-authored-by: Fabian Orccon <cfoch.fabian@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4827>
2023-06-10 23:48:39 +01:00
Kevin Song
e8f9bd1649 appsink: unref gstbuffer in prev sample early
Appsink will unref prev sample in dispose function. Which is later
when V4L2 video decoder link with appsink as V4L2 video decoder
will close V4L2 device fd during GST_STATE_CHANGE_READY_TO_NULL.
If the video buffer return to V4L2 video decoder after the decoder
closed V4L2 device fd, V4L2 can't release the video frame buffer
which allocated with MMAP mode as application can't call
VIDIOC_REQBUFS 0 to release the video frame buffer by V4L2 driver.
The memory of the video frame will leak.
Unref the gstbuffer in stop() function, so V4L2 video decoder
can received all video frame buffers and release it before close
V4L2 device fd.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4820>
2023-06-09 15:58:49 +01:00
Matthew Waters
2f2eef88cb gldownload: handle passthrough without a critical
With passthrough mode, gldownload/glbasefilter may not ever retrieve a
relevant GstGLContext as it doesn't actually query the surrounding
elements.  Guard against that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4800>
2023-06-08 19:46:56 +00:00
Philippe Normand
da02436193 oggdemux: vp8: Detect keyframe packets
decodebin3 drops data on video streams until a keyframe or header is detected,
so for Ogg/VP8 we now need to correctly flag and signal keyframes downstream.
The first buffer pushed from each src pad also has the HEADER flag set.

Fixes playback of
https://github.com/web-platform-tests/wpt/raw/master/media/test.ogv in playbin3.

Fixes #1418

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4745>
2023-06-01 17:00:44 +00:00
Guillaume Desmottes
ee6e97f7c4 streamsynchronizer: check reset-time when handling FLUSH_STOP
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>
2023-06-01 11:15:00 +00:00
Guillaume Desmottes
dd6e889073 streamsynchronizer: reset eos on STREAM_START
self->eos was never reset after streamsynchronizer has sent EOS
(except on explicit flush or switching back to PAUSED).
As a result, synchronization was broken if new streams were pushed later
as gst_stream_synchronizer_wait() does not wait if self->eos is set.

Fix this by reseting self->eos on STREAM_START as that means a new
stream is being sent upstream and so a new EOS will follow later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4755>
2023-06-01 11:15:00 +00:00
Seungha Yang
3003f466ef video-blend: Fix linking error with C++
Add missing extern "C"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4735>
2023-05-30 01:17:36 +00:00
He Junyan
cf3fdabb22 videometa: Only validate the alignment only when it contains some info
When the alignment contains nothing, all its fields are 0 and always
can be satisfied. So there is no need to validate it in this case.
And there are a lot of places just setting this alignment to default
all zero value, this validation generates lots of warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4704>
2023-05-25 00:07:13 +00:00
Nicolas Beland
da11ea77c8 alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4699>
2023-05-24 14:01:05 +01:00
Seungha Yang
f58f292f05 video: convertframe: Add D3D11 specific conversion path
Add d3d11 conversion path to make gst_video_convert_sample() work
for GstD3D11Memory.

Note that just adding "d3d11download" to the exisitng code is
suboptimal from GstD3D11 point of view because:
* d3d11convert element can support crop/colorspace-conversion/scale
  all at once while existing software pipeline needs intermediate steps
  for the conversion
* "Process everything on GPU then download it to CPU memory" would be likely
  faster than "download GPU memory to CPU then processing it on CPU"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>
2023-05-22 16:27:35 +01:00
Seungha Yang
c7d48d294e video: convertframe: Remove pointless const qualifier
const keyword for refcounted object does not very make sense
and unnecessary in this case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4689>
2023-05-22 16:27:35 +01:00
Tim-Philipp Müller
9994bbbd4c Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4679>
2023-05-19 12:36:19 +01:00
Tim-Philipp Müller
ecd471f5ea Release 1.22.3 2023-05-19 09:23:19 +01:00
Matthew Waters
4306a6822d Revert "meson: Install viv-fb GL headers, needed by i.MX"
Missing pkg-config files and gir files as is required from any public
facing GL API for bindings reasons.

This reverts commit c95b7b8e7a.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4657>
2023-05-17 14:10:17 +00:00
Haihua Hu
d784bbe6ca decodebin3: fix random hang when remove failing stream
When reconfigure_output_stream entry missing decoder path,
requested_selection should been update with what is really
active/selected immdiately with SELECTION_LOCK hold. So
use an optional message return from reconfigure_output_stream
and post it after release SELECTION_LOCK. This can make sure
other thread call to check_slot_reconfiguration will got
a correct requested_selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4656>
2023-05-17 11:02:22 +00:00
Edward Hervey
0956b94184 uridecodebin3: Ensure atomic urisourcebin state change
When dynamically adding and synchronizing the state of urisourcebin, we need to
ensure that no-one else attempts to change the state in case of failures

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4620>
2023-05-12 14:53:06 +01:00
Nirbheek Chauhan
c95b7b8e7a meson: Install viv-fb GL headers, needed by i.MX
Needed by qmlglsink at build time to allocate a viv-fb display.

Without this, the GL fastpath doesn't work, and performance is really
bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4618>
2023-05-12 11:43:48 +00:00
Edward Hervey
fcd4085c25 decodebin3: Handle streams without CAPS or TIME segment
decodebin3 will do its best to figure out whether a parsebin is required to
process the incoming stream.

The problem is that for push-based stream it could happen that the stream would
not provide any caps, resulting in nothing being linked internally.

Furthermore, there is the possibility that a stream *with* caps would not be
using a TIME segment, which is required for multiqueue to properly work.

In order to fix those two issues, we force the usage of parsebin on push-based
streams:
* When the pad is linked, if upstream can't provide any caps
* When we get a non-TIME segment

Fixes #2521

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4499>
2023-04-27 14:48:09 +01:00
Sebastian Dröge
5baeb1e808 audiotestsrc: Initialize all samples in wave=ticks mode
Previously samples were only initialized in 2 out of 3 cases.

Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4476>
2023-04-22 12:31:31 +01:00
Patricia Muscalu
917424b3fb playsink: Fix volume leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4463>
2023-04-20 16:40:22 +01:00
Jan Alexander Steffens (heftig)
a299399f5c tests: allocators: Fix fdmem test with recent GLib
The test failed with recent GLib, where `g_close` emits a critical
warning on EBADF. Remove the `g_close` check from `test_fdmem` and add
another version that tests `GST_FD_MEMORY_FLAG_DONT_CLOSE`.

We will depend on the Valgrind test run to warn us about leaked FDs.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2480
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4422>
2023-04-14 10:14:48 +00:00
Matthias Fuchs
f4aeac45e5 glvideoflip: fix leaked caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4420>
2023-04-14 04:33:30 +00:00
Matthias Fuchs
07c1b891b6 glcontext_wgl: fix missing unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4419>
2023-04-14 03:45:12 +00:00
Tim-Philipp Müller
d838d8dd1b Back to development 2023-04-12 00:31:17 +01:00
Tim-Philipp Müller
a8f569e801 Release 1.22.2 2023-04-11 17:29:28 +01:00
Tim-Philipp Müller
4982c7d45e gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4390>
2023-04-11 12:10:37 +01:00
Rouven Czerwinski
1ff0e6d305 gst-plugins-base: gl: wayland: cleanup on close
The proxy and queue are created in the gst_gl_window_wayland_egl_open()
function and will be recreated on open. This leaks both objects, the
wayland client documentation mentions that they should be destroyed
using the appropriate destroy functions.

Found during valgrind memory leak testing, these blocks were marked as
definitely lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4355>
2023-04-06 12:16:58 +01:00
Sebastian Dröge
2c3a1d0006 sdp: Skip source-specific caps fields when creating an SDP media from caps
Regression from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132

We parse the source-specific fields from the SDP and put it into the
caps, but when converting caps into an SDP again this would need special
handling. By default it would end up as part of the fmtp field, which is
simply wrong.

Automatically putting it into the caps and SDP will need some more work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4344>
2023-04-05 11:44:11 +00:00
Seungha Yang
cb08a6d8dc tools: Count argc after parsing GOption on Windows
Existing codes rely on modified argc value by g_option_context_parse()
but g_option_context_parse_strv() is used in case of Windows.
Count arguments after the option parsing manually.
Fixing command "gst-inspect-1.0.exe -b"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4322>
2023-04-01 00:14:57 +00:00
Robert Rosengren
b2feff23bc alsasink: Fix for being stuck in stop_streaming_threads state
Moving from PLAYING to NULL will set the stop_streaming_threads to TRUE,
but when moving back upwards its not reset to FALSE (as only done in
uncalled init and resume callbacks).

Fix by reseting value in the prepare callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4321>
2023-03-31 23:46:28 +01:00
Ilie Halip
476a8aca78 typefindfunctions: Increase xml typefinder closing brace limit
If the first XML element in a DASH manifest has its closing brance
beyond the first 512 bytes (because of, e.g. lots of attributes),
the MPD typefinder fails. Try to read a larger block, and then
smaller blocks until 512 bytes.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4302>
2023-03-30 23:12:23 +00:00
Bart Van Severen
d2678a1f54 rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: use rtsps scheme for tls transport methods
gst_rtsp_url_get_request_uri returns rtsp://... url when requested url is rtsps://, this is not
in accordance with https://www.rfc-editor.org/rfc/rfc7826.html#section-19.2.
This also impedes setting up a rtsps session with a live555 rtsp server.

Don't expose other than rtsp and rtsps internal gstreamer rtsp url schemes
to avoid regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4298>
2023-03-30 22:05:37 +00:00
Bart Van Severen
e8d7f326ff Revert "rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect scheme for tls transport methods"
This reverts commit 024ef7659d because it causes a regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4298>
2023-03-30 22:05:37 +00:00
Haihua Hu
8a340bcc05 decodebin3: fix hang issue when remove failing stream
Need mark selection_update to true when update selection,
otherwise, pipeline will not handle this selection update
sometimes when this flag has been reset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4284>
2023-03-28 00:51:53 +01:00
Edward Hervey
02a8e4bb4c parsebin: Improve elementary stream handling
The goal of parsebin is to figure out which elements to link together in order
to provide elementary streams given any random input.

The problem is that deciding whether a given stream should still have more
elements plugged in or not was dependent on ... the presence of compatible
decoders (sic).

Instead of that, if we can't plug anymore elements on a given stream *and* it is
detected as being an elementary stream, expose it.

Fixes #2118

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4237>
2023-03-21 11:36:13 +00:00
Edward Hervey
9ea540c616 urisourcebin: Activate pad before transferring sticky events
Otherwise they get refused since the pad is flushing

Fixes #2384 for good

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4233>
2023-03-20 19:54:00 +00:00
Sebastian Dröge
5ddc082710 plugins: Fix various trivial clang compiler warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4221>
2023-03-18 19:52:40 +00:00
Edward Hervey
611fc00833 urisourcebin: Propagate sticky events from parsebin
If sticky events are present on parsebin source pads, we propagate them to the
multiqueue source pads. Those will be propagated on the new urisourcebin source
pads like in the other code paths.

This ensures that STREAM_START event are present on new source pads. If CAPS
event are also present (not guaranteed), they will also be available.

Fixes #2384

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4218>
2023-03-18 06:47:21 +00:00
Tim-Philipp Müller
3acf83be50 Back to development 2023-03-04 16:13:04 +00:00
Tim-Philipp Müller
3ab8a0bc3e Release 1.22.1 2023-03-04 13:42:32 +00:00