Commit graph

1133 commits

Author SHA1 Message Date
Edward Hervey 5280f0b733 adaptivedemux2: Add libsoup tracing debug
Provides more information for debugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6409>
2024-03-20 09:48:12 +00:00
Edward Hervey 3d500636a9 adaptivedemux2: Don't use g_str_equal on potentially NULL strings
It is only meant to be used as a callback. The fallback macro uses strcmp which
doesn't handle NULL strings gracefully. Instead use g_strcmp0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey ab11c20d59 hlsdemux2: Avoid NULL pointer usage
The pending/current variant are both NULL when the demuxer is resetted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey 46bb0bfa57 adaptivedemux2: Handle context going away
This issue can happen when the scheduler loop was stopped (and context went
away). We no longer want to push/pop main context threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey 8438c3f567 hlsdemux2: Improve detection of playlist updates
In the case we are not updating an existing playlist, we only want to reset the
download error count if the URI we are downloading was not the previous one we
were trying to load

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Alexander Slobodeniuk 650534c940 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/6355>
2024-03-13 19:32:46 +00:00
Sebastian Dröge 38011a01dc 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/6318>
2024-03-13 12:48:36 +00:00
Piotr Brzeziński e9802f5f41 macos: Add Apple AAC encoder (atenc)
Adds the `atenc` element capable of encoding AAC-LC audio, using the AudioToolbox framework.
It's able to encode up to 7.1 channel configurations.
Comes with basic knobs for rate control (bitrate for CBR, quality for VBR).

Support for more profiles (LD, HE-AAC) should be simple, but is not included here because of bugs
with parsing of the AudioSpecificConfig.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6254>
2024-03-12 19:50:06 +00:00
Piotr Brzeziński d3fba31da0 macos: Move atdec from applemedia (-bad) to osxaudio (-good)
osxaudio has a few helper methods potentially useful in atdec (or future atenc), like GStreamer -> CoreAudio
channel mapping. Doesn't make sense to duplicate them in applemedia, and atdec is the only audio-oriented
element there anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6223>
2024-03-12 09:55:10 +00:00
Piotr Brzeziński 9c084faa75 qtdemux: Fix wrapping temporary memory in buffers
That memory can disappear at any moment, doesn't cost much to just copy those few bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6320>
2024-03-11 18:18:01 +00:00
Nirbheek Chauhan 3bed35c342 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/6302>
2024-03-11 09:15:50 +00:00
François Laignel 7d5bb1ea7a webrtc: add all SSRC attributes getting CAPS for a PT
The transport stream only returned the CAPS for the first matching PT entry
from the `ptmap`. Other SSRC with the same PT where not included. For a stream
which bundled multiple audio streams for instance, only the first SSRC was
knowed to the SSRC demux and downstream elements.

This commit adds all the `ssrc-` attributes from the matching PT entries.

The RTP jitter buffer can now find the CNAME corresponding its SSRC even if it
was not the first to be registered for a particular PT.

The RTP PT demux removes `ssrc-*` attributes cooresponding to other SSRCs
before pushing SSRC specific CAPS to downstream elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6119>
2024-03-08 10:28:15 +00:00
Michael Tretter 5b3082257e meson: Fix description in qt options
The qt-x11 description contains a copy/paste error from the qt-wayland option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6292>
2024-03-08 02:14:11 +00:00
Mathieu Duponchelle 519546aea3 rtpgstpay: flush on EOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Sebastian Dröge b88d69b722 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/5173>
2024-03-07 14:02:33 +00:00
Elizabeth Figura e2167867d5 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/6225>
2024-03-07 12:52:30 +02:00
Jan Schmidt f53dbb28b2 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/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 57013e1a7c 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/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 4d2f000125 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/6248>
2024-03-06 17:50:53 +00:00
Tim-Philipp Müller 4db25f1500 rtspsrc: Consider 503 Service Not Available when handling broken control urls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6213>
2024-03-05 17:45:18 +00:00
Tim-Philipp Müller 756064b9c3 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6261>
2024-03-05 12:58:57 +00:00
Tim-Philipp Müller b125253cad Release 1.24.0 2024-03-04 23:59:25 +00:00
Nirbheek Chauhan cf2238a522 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/6226>
2024-02-27 11:36:01 +00:00
Edward Hervey a3980f4838 docs: Use Discourse and Matrix as prefered communication channels
Part of: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6220
2024-02-27 09:35:47 +01:00
Seungha Yang 125c89319a 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/6181>
2024-02-26 23:21:44 +09:00
Seungha Yang 3afeb73538 jpegdec: Remove trailing white space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6181>
2024-02-26 23:14:54 +09:00
Tim-Philipp Müller d474de8ff0 Release 1.23.90 2024-02-23 18:20:11 +00:00
Nirbheek Chauhan 4fc56a08ee 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/6197>
2024-02-23 11:47:47 +05:30
Matthew Waters 697b35fe58 examples/qmlsinnk-multisink: allow running with leaks tracer
Include a gst_deinit() after the qml engine has been destroyed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:39 +00:00
Matthew Waters f1637a3601 examples/qml: fix some leaks in the multisink example
A GstPad was being leaked and possibly the qmlglsink element depending
on if Qt runs the scenegraph thread again when destroying the example
video item.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:39 +00:00
Matthew Waters 392fd00f4c qml, qml6: Fix leak of QSGMaterial/Geometry (and therefore a possible GstBuffer)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:31 +00:00
Matthew Waters 2dae3775d9 qml6: fix a leak of the wrapped QSGTextures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:24:24 +00:00
Sebastian Dröge 69e4564c87 rtphdrext-clientaudiolevel: Fix typo in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6175>
2024-02-21 17:25:43 +00:00
Arnaud Vrac 9e2e456d9f adaptivedemux2: fix build with recent meson
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6168>
2024-02-21 13:53:40 +00:00
Tim-Philipp Müller 0a6948ee20 rtppassthroughpay: fix critical in gst-inspect
gst_segment_to_running_time() will fail noisily
if the segment has not been initialised yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6151>
2024-02-21 11:25:10 +00:00
Nirbheek Chauhan 11f6984bf5 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/6156>
2024-02-21 09:27:59 +05:30
Jan Schmidt f7e494f348 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/6137>
2024-02-21 01:50:13 +00:00
Maksym Khomenko ccf544a50e osxaudio: add mapping for top/left/right surround channels
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5731>
2024-02-20 08:03:15 +00:00
Maksym Khomenko f1e02ebb92 osxaudio: correct mapping for left/right surround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5731>
2024-02-20 08:03:15 +00:00
Marc Leeman eb17de27d6 qt6: search in /usr/lib/qt6/bin/ for qsb
In Debian and possibly other distributions, qsb (qt6-shader-baker) is
not in the default path, but in a QT6 specific path. Search there too

Applied changes from Nirbheek

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6095>
2024-02-19 12:29:32 +00:00
Jochen Henneberg 6608b89977 rtpxqtdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 5d1d0cf9a5 rtpmp4gdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 75849c63c8 rtpsbcdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 3fffcd021a rtpvorbisdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg e1e7421982 rtpmp4vdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 334ceaca21 rtptheoradepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 0a4918a509 rtpsv3vdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg d810049f01 rtpmp4adepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one process
run we push them all into a GstBufferList and push them out at once to
make sure that each buffer gets notified about each header extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 90b5d2eb93 rtpklvdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 2c3f169ebb rtpjpegdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00