Commit graph

813 commits

Author SHA1 Message Date
Tim-Philipp Müller 3abc1c8c7b Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6408>
2024-03-20 00:07:00 +01:00
Tim-Philipp Müller e49b86e82e Release 1.22.11 2024-03-19 22:01:08 +01:00
Haihua Hu 6a71f0e99d v4l2src: fix cannot reuse current caps when fixate caps in negotiation
when regotiation happens, v4l2src will check if it can reuse current caps,
but we need check if current caps is subset of all query caps from downstream
instead of check it with query caps one by one.

Assuming that the current caps is not the subset of first caps from query caps,
it will go to try fmt. when try fmt success, v4l2src will make pending_set_fmt
to TRUE and going to reset.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6393>
2024-03-18 15:30:01 +01:00
Alexander Slobodeniuk f04ea0c1be rtspsrc: remove 'deprecated' flag from the 'push-backchannel-sample' signal
It seems that it was added by accident when copying from push-backchannel-buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6366>
2024-03-14 00:36:07 +00:00
Sebastian Dröge eaffd61da6 mpg123audiodec: Correctly handle the case of clipping all decoded samples
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3365

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6360>
2024-03-13 17:13:51 +00:00
Nirbheek Chauhan acd40e7852 rtspsrc: Don't invoke close when stopping if we've started cleanup
When we're doing a state change from PLAYING to NULL, first we invoke
gst_rtspsrc_loop_send_cmd_and_wait (..., CMD_CLOSE, ...) during
PAUSED_TO_READY which will schedule a TEARDOWN to happen async on the
task thread.

The task thread will call gst_rtspsrc_close(), which will send the
TEARDOWN and once it's complete, it will call gst_rtspsrc_cleanup()
without taking any locks, which frees src->streams.

At the same time however, the state change in the app thread will
progress further and in READY_TO_NULL it will call gst_rtspsrc_stop()
which calls gst_rtspsrc_close() a second time, which accesses
src->streams (without a lock again), which leads to simultaneous
access of src->streams, and a segfault.

So the state change and the cleanup are racing, but they almost always
complete sequentially. Either the cleanup sets src->streams to NULL or
_stop() completes first. Very rarely, _stop() can start while
src->streams is being freed in a for loop. That causes the segfault.

This is unlocked access is unfixable with more locking, it just leads
to deadlocks. This pattern has been observed in rtspsrc a lot: state
changes and cleanup in the element are unfixably racy, and that
foundational issue is being addressed separately via a rewrite.

The bandage fix here is to prevent gst_rtspsrc_stop() from accessing
src->streams after it has already been freed by setting src->state to
INVALID.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6346>
2024-03-12 19:22:47 +00:00
Mathieu Duponchelle 8830b03ec1 rtpgstpay: flush on EOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6294>
2024-03-07 19:58:09 +00:00
Sebastian Dröge 01469a7de5 rtpgstpay: Delay pushing of event packets until the next buffer
And also re-timestamp them with the current buffer's PTS.

Not doing so keeps the timestamps of event packets as
GST_CLOCK_TIME_NONE or the timestamp of the previous buffer, both of
which are bogus.

Making sure that (especially) the first packet has a valid timestamp
allows putting e.g. the NTP timestamp RTP header extension on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6294>
2024-03-07 19:58:09 +00:00
Elizabeth Figura a1d1c74be1 qtdemux: Do not set channel-mask to zero
Leave it uninitialized, so that the downstream decoder will initialize it appropriately. Setting it to zero is wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6288>
2024-03-07 13:34:54 +00:00
Jan Schmidt 375d16a9fa rtspsrc: Parse Speed/Scale before Range in responses
Parse the speed and scale in the server's response
*before* the range, so that the range start/stop
are swapped (or not swapped) correctly based
on the server's actual chosen values. Otherwise,
the old rate from the segment is used - what the
last seek asked for, but not necessarily what
the server chooses.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6287>
2024-03-07 12:03:04 +00:00
Jan Schmidt 6a07ced605 rtspsrc: Handle queries and events with no manager
When doing direct output with no session manager, we still
want to respond to queries and events from downstream, so
install the handlers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6287>
2024-03-07 12:03:04 +00:00
Jan Schmidt 7ad4055557 rtspsrc: return NO_PREROLL on PLAYING->PAUSED too
When transitioning back to PAUSED and rtspsrc is live, return
NO_PREROLL so the pipeline knows to skip preroll here too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6287>
2024-03-07 12:03:04 +00:00
Tim-Philipp Müller dea9cfb5ee rtspsrc: Consider 503 Service Not Available when handling broken control urls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6272>
2024-03-06 11:13:57 +00:00
Nirbheek Chauhan 6a18121fdc soup: Re-add soup-lookup-dep option
It's still useful on Linux since it ensures that the tests are going
to be built, since they use the same dep lookup as the plugin now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Arnaud Vrac 0db7773d5b adaptivedemux2: fix build with recent meson
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Nirbheek Chauhan 2b121be8f0 soup: Link to libsoup in all cases on non-Linux
We have unsolvable issues on macOS because of this, and the feature
was added specifically for issues that occur on Linux distros since
they ship both libsoup 2.4 and 3.0.

Everyone else should just pick one and use it, since you cannot mix
the two in a single process anyway.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Nirbheek Chauhan 2abbc2e0d9 good/tests: Don't enable soup tests if soup is disabled
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3268

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Olivier Crête 4f777ab6ae soup: Avoid using GUri before GLib 2.66
Let's use gpointer for now

Fixes: #3169
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Olivier Crête b4003f4449 adaptivedemux2: Parse cookies in downloadhelper
We need to parse any cookie headers, otherwise we end up
sending back attributes likes "Secure" and "httponly" which break
some servers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6198>
2024-03-04 14:58:26 +00:00
Edward Hervey 30738b09c1 plugins: Fix wrong enum usage
gcc 13 now detects conflicting enum usages. Fix the various cases where it was wrong

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6234>
2024-02-28 01:18:22 +00:00
Seungha Yang 0640147cee jpegdec: Fix progressive/interlaced detection
If input height and parsed one are identical, do not consider it as interlaced

Fixing below pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=640,height=10 \
  ! jpegenc ! jpegparse ! jpegdec ! videoconvert ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6229>
2024-02-27 23:58:15 +00:00
Seungha Yang 42c07de96c jpegdec: Remove trailing white space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6229>
2024-02-27 23:58:15 +00:00
Nirbheek Chauhan 1e384e5414 rtspsrc: Increase rank to PRIMARY for autoplug purposes
This affects autoplug by gst_element_make_from_uri() in, for example,
uridecodebin. The element should've already been PRIMARY rank, but it
was NONE because gst_element_make_from_uri() doesn't ignore NONE rank
elements when searching for element factories, unlike decodebin.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/502

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6231>
2024-02-27 17:23:43 +00:00
Jan Schmidt fb8131b7da rtspsrc: Reset combined flows after a seek before restarting
After a flushing seek, rtspsrc doesn't reset the last_ret value for
streams, so might immediately shut down again when it resumes pushing
buffers to pads due to a cached `GST_FLOW_FLUSHING` result

Prevent a stored flushing value from immediately stopping
playback again by resetting pad flows before (re)starting
playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6216>
2024-02-24 11:20:51 +00:00
Tim-Philipp Müller dcd9d8a87d Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6111>
2024-02-13 16:27:38 +00:00
Tim-Philipp Müller 29d6413c3f Release 1.22.10 2024-02-13 14:39:08 +00:00
Piotr Brzeziński 2f4e8d14cf macos: Set activation policy in osxvideosink and glimagesink
Upon creating a window, glimagesink and osxvideosink now set the policy to
NSApplicationActivationPolicyRegular, which lets us show an icon in the Dock
for convenience and appear in the top menu bar like other apps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6103>
2024-02-12 18:25:18 +01:00
Jonas Kvinge da03d2f2a0 meson: Set cpp_std to c++17 for TagLib
TagLib uses C++17 as of version 2.0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6097>
2024-02-12 11:55:33 +00:00
Tim-Philipp Müller 1a0df09c8f test: souphttpsrc: update test_icy_stream url
The old URL would result in multiple redirects, which
causes memory leaks with old versions of libsoup as
used on the CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6049>
2024-02-04 14:00:01 +01:00
Tim-Philipp Müller 600e105e64 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5990>
2024-01-25 00:18:12 +00:00
Tim-Philipp Müller 3e41b8f18b Release 1.22.9 2024-01-24 18:21:13 +00:00
Dan Searles 19d3b14f51 rtspsrc: fix ttl setting for udpsink[1]
Fix ttl setting being incorrectly applied to udpsink[0] rather
than to udpsink[1].

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5967>
2024-01-23 23:52:25 +00:00
Dan Searles ba5692005d rtspsrc: set multicast-iface on udpsinks
Copy rtspsrc property multicast-iface to its udpsinks to
allow messages over those sinks back to the server to work (and
prevent 'Network unreachable' warnings).

Closes: #3239
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5967>
2024-01-23 23:52:25 +00:00
Xavier Claessens 0ce3a2782c v4l2src: Consider framerate during caps selection
This simplifies the way it picks the closest caps to preference and take into
consideration the framerate to avoid picking high resolution at 5fps or so.
Simply calculate a "distance" of caps A and B from the preference and put
closest first, sorting by framerate first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5956>
2024-01-22 18:52:57 +00:00
Philippe Normand 36518d81e7 vpxdec: Use appropriate domain and code for decoding errors
STREAM domain and DECODE error is commonly used in other decoders. ENCODE is for
encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5918>
2024-01-13 18:21:41 +00:00
Sanchayan Maity daa60e39f9 rtphdrext-clientaudiolevel: Fix level value being written by the extension
When level value is greater than 127, it was being clamped but this clamped
value was not the one being actually used. For level values greater than 127
this resulted in an incorrect value being used. As an example, a level value
of 187, after and'ed with 0x7F, it would result in 0x3B being reported as the
level value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5894>
2024-01-07 12:58:27 +00:00
Sebastian Dröge a4dc820899 rtpsession: Only warn once if configured latency needs to be known but isn't yet
Otherwise we would warn about this once for every single packet until
the LATENCY event is received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5874>
2023-12-29 12:46:23 +01:00
Chao Guo 0587c2754e v4l2object: clear old fds in poll when closing v4l2object
When reopening a v4l2 device, the v4l2object->poll will include some old fds,
which was assigned to this device before. If the pipeline opens multiple v4l2
devices, the old fd may been assigned to other v4l2 devices when reopening
devices.

This will cause the timing of the pipeline become confusing when polling devices,
leading functional abnormalities.

Therefore, when closing v4l2object, remove the old fds in poll to ensure that the
pipeline timing is normal.

Signed-off-by: Chao Guo <chao.guo@nxp.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5840>
2023-12-19 17:18:58 +00:00
Tim-Philipp Müller 79cdbc37d5 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5826>
2023-12-18 13:52:12 +00:00
Tim-Philipp Müller 4af14db10e Release 1.22.8 2023-12-18 12:09:37 +00:00
Arun Raghavan a0558cf8d4 rtp: Fix incorrect RTP channel order lookup by name
The g_ascii_strcasecmp() logic is inverted, since it returns 0 on equality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5817>
2023-12-16 11:04:57 +00:00
Tim-Philipp Müller 44503fc88c matroska-demux: fix accumulated base offset in segment seeks
When doing a segment seek, the base offset in the new segment
would be increased by segment.position which is basically the
timestamp of the last packet. This does not include the duration
of the last packet though, so might be slightly shorter than the
actual duration of the clip or the requested segment.

Increase the base offset by the segment duration instead when
accumulating segments, which is more correct as it doesn't cut
off the last frame and makes the effective loop segment duration
consistent with the actual duration returned from a duration
query.

In case a segment stop was specified it's also possible that
some data was sent beyond the stop that's necessary for decoding
so the base offset increment should be based on that then and
not on the timestamp of the last buffer pushed out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5787>
2023-12-09 14:06:53 +00:00
Guillaume Desmottes ef734f1134 qtdemux: fix bug report URL
Using PACKAGE_BUGREPORT as in other modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5786>
2023-12-09 12:45:25 +00:00
Hosang Lee 4356d4262e qtdemux: Don't overflow sample index
Don't reduce sample index if it is already at 0.
Assigning -1 to a guint32 variable causes unexpected behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5751>
2023-12-01 15:54:46 +00:00
Hosang Lee f4ed87283b qtdemux: Fix reverse playback for pcm audio stream
Some raw lpcm or adpcm may have larger sample sizes than the max
buffer size value set.
Trimming the buffer causes bogus size error on reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5745>
2023-12-01 09:54:41 +00:00
jeri.li 390d43dcde v4l2bufferpool: add lock as atomic operation for seek
When seek flush, gst v4l2 buffer pool flush is not atomic which will
lead double enqueue buffer (qbuf) issue, and v4l2 buffer pool qbuf is
also not atomic which will lead no free buffer found in the pool.
1. add lock for calculate enqueue number in streamon function
2. add lock for v4l2 capture end streamoff in pool flush function
3. lock the whole funciton of v4l2 buffer pool qbuf, then the buffer
   pool index and qbuf operation are atomic

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5695>
2023-11-20 21:30:39 +00:00
Robin Gustavsson 97f3ed0f3b rtpklvdepay: Recover after invalid fragmented KLV unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5686>
2023-11-17 10:16:50 +00:00
Piotr Brzeziński 15e9b513da qtdemux: Ignore raw audio streams when adjusting seek
Because we treat raw audio chunks/samples as keyframes, they were interfering
with seek time adjustment.
Became apparent when the accompanying video stream was I-frame only,
for example ProRes.
Since raw audio streams can be seeked freely, it's fine to just ignore them here,
giving priority to the real keyframes in the video stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5674>
2023-11-15 19:44:38 +00:00
Tim-Philipp Müller faf6edc026 rtpac3depay: should output audio/x-ac3 not audio/ac3
audio/x-ac3 is the canonical media format in GStreamer.
audio/ac3 is sometimes accepted as input (e.g. in rtpac3pay
or ac3parse), but shouldn't be output.

Fixes #3038.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5662>
2023-11-15 00:10:35 +00:00
Dongyun Seo 23bc229e7f dcaparse: keep upstream buffer meta
Some audio decoders cannot decode DTS stream if there is no
valid timestamp. So, keep upstream buffer meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5664>
2023-11-14 22:21:16 +00:00