Commit graph

801 commits

Author SHA1 Message Date
Haihua Hu 1c488626da 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/4500>
2023-05-01 15:05:26 +00:00
Jordan Petridis 8339384d3a jack: return TRUE during init when failing to dlopen
If we return FALSE, that means the plugin won't be tried again,
even if jack is available afterwards.

Followup to 689dbd1fbe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4507>
2023-04-28 14:57:38 +00:00
Sebastian Dröge 3044b0992f Revert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"
This reverts commit f29c19be58. If this is
called for the reference context then we would run into an infinite
loop, which is not really better than an assertion.

By fixing up DTS to never be ahead of the PTS in the previous commit
this situation should be impossible to hit now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4498>
2023-04-28 11:00:19 +00:00
Sebastian Dröge de907c225b splitmuxsink: Catch invalid DTS to avoid running into problems later
DTS > PTS makes no sense, so we clamp DTS to the PTS. Also if there's a
PTS but no DTS, then assume that PTS=DTS to make sure we're not working
with a much older DTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4498>
2023-04-28 11:00:19 +00:00
Sebastian Dröge ef89bac181 rtspsrc: Fix handling of * control path
Regression introduced by 7f9d689572.
Thanks to Tristan Matthews for reporting this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4497>
2023-04-27 13:47:56 +00:00
Sebastian Szczepaniak 277a9f0cef qtdemux: Add support for cenc sample grouping
Co-authored-by: Xabier Rodriguez Calvar <calvaris@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3551>
2023-04-26 18:51:56 +00:00
Thibault Saunier 7aaf2b48ef doc: Avoid shelling out to hotdoc to generate plugins config files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4479>
2023-04-25 02:57:55 +00:00
Guillaume Desmottes d4a9106499 videoflip: check that stream actually changed when resetting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:03:16 +02:00
Guillaume Desmottes 7c4e36acfd videoflip: reset orientation if not present in a tag update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes c0fa04fcaf videoflip: handle tag list scopes
STREAM taglist can now overrides the orientation from the GLOBAL
taglist, but not the other way around.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes 96afec6253 videoflip: reset orientation on new stream
Fix the following use:
- upstream sends a video with a rotation tag, say 90°
- upstream switches to another video without rotation
- the second video was still rotated by videoflip

Fix this by resetting the orientation when receiving STREAM_START.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Guillaume Desmottes 61a5da1014 videoflip: add test rotating from tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4377>
2023-04-22 14:02:13 +02:00
Jordan Petridis 689dbd1fbe jack: Dynamically load libjack at runtime instead of linking
In order to provide build and provide the jack plugin with the prebuilt
binaries of gstreamer we distribute with releases, we can not depend
on an external dependency nor can we ship plugins linking to libraries
we don't provide.

We can also not provide jack ourselves, as it would likely cause a
mismatch with the jack daemon on the host.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4350>
2023-04-20 11:10:15 +03:00
Nicolas Dufresne e709e2d97c meson: Add a wrap file for libgudev
And allow fallback to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4447>
2023-04-19 22:47:19 +00:00
Guillaume Desmottes 901383771d dash: mpdclient: fix divide by 0 if segment has no duration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4436>
2023-04-18 06:37:27 +00:00
Seungha Yang 52cb42f4bb deinterlace: Add support for high bitdepth planar YUV formats
Add C implementation for high bitdepth planar YUV formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1476>
2023-04-18 01:32:25 +09:00
Seungha Yang aabe9136f6 deinterlace: yadif: Prettify indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1476>
2023-04-18 01:25:45 +09:00
Edward Hervey 4c6f41a00a qtdemux: Fix av1C parsing
This is a regression introduced by
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882

The av1c codec configuration parsing would always fail due to an off-by-one
error, the content of an atom starting at offset 8 (i.e. the 9th byte) and not
9 (the 10th byte).

Also introduce a break in order to not get stray warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4433>
2023-04-17 09:28:43 +02:00
Mathieu Duponchelle 6a27fe8955 docs: mark GstRTPMux as plugin API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4408>
2023-04-13 21:46:59 +00:00
Nicolas Dufresne 2e76371666 v4l2: Fix use after free of fmtdesc part 2
Add missing code in merge commit e890e6e8d8
("v4l2: Fix use after free of fmtdesc"). The v4l2object code was
missing.

Related to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4317

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4411>
2023-04-13 13:54:32 -04:00
Nicolas Dufresne e890e6e8d8 v4l2: Fix use after free of fmtdesc
The decoder needs to force another enumeration of the format. For
this it was clearing the v4l2object insternal list, leaving a fmtdesc
pointer pointing to freed memory. This patch clears the fmtdesc pointer
that has just been free. It also makes sure the probe function does not
use the cached formats list. The probe function will restore the current
fmtdesc pointer based on the currently configured pixelformat.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4317>
2023-04-13 15:32:14 +00:00
Nicolas Dufresne 3a17200638 v4l2: videodec: Prefer acquired caps over anything downstream
As we don't have anything smart in the fixation process, we may endup with
a format that has a lower bitdepth, even if downstream can handle higher
depth. it is notably the case when negotiating with deinterlace, which places
is non-passthrough caps before its passthrough one. This makes the generic
fixation prefer the formats natively supported by deinterlace element over
the HW 10bit format. As some HW can downscale 10bit to 8bit, this can break
10bit decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4317>
2023-04-13 15:32:13 +00:00
Nicolas Dufresne 89854fd2f3 v4l2: videodec: Remove leading space in comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4317>
2023-04-13 15:32:13 +00:00
Jan Alexander Steffens (heftig) ac83e121a7 imagesequencesrc: Properly set default location
Noticed this because the generic_states test kept segfaulting at random.
GLibC 2.37 can crash when NULL is supplied as a format string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4109>
2023-04-13 01:55:23 +00:00
Tim-Philipp Müller b020d399cb multifile: error out if no filename was set
Fixes #2483

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4404>
2023-04-12 18:55:26 +00:00
Seungha Yang 3374f2f44d udpsrc: Add support for IGMPv3 SSM
Adding "multicast-source" property to support Source Specific Muliticast
RFC 4604. The source can be multiple address with '+' (for positive
filter) or '-' (negative filter) prefix, or URI query can be used.
Note that negative filter is not implemented yet and it will be
ignored

Example:
gst-launch-1.0 uridecodebin \
  uri=udp://{ADDRESS}:PORT?multicast-source=+SOURCE0+SOURCE1

Inspired by:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2620

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3485>
2023-04-12 16:32:07 +00:00
Guillaume Desmottes df3b2e2d41 adaptivedemux2: fix critical when using an unsupported URI
adaptivedemux2 only supports http(s), trying to use it with, say,
file:// was raising a CRITICAL in libsoup.

Fix #2476

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4396>
2023-04-12 06:33:39 +00:00
Matthias Fuchs 884dbb4ace qtwindow: unref caps in destructor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4393>
2023-04-11 18:39:02 +00:00
Edward Hervey 7e619f7e83 twcc: Better handle duplicate packets
The previous code would only check if two packets in a row were duplicates. If
not (i.e. a packet is a duplicate of a packet received slightly before) the code
would generate completely bogus FCI because it assumes there were no duplicates
present in the array.

In order to be efficient, just store all received packets and remove the
duplicates just before the FCI is generated once the array of observations have
been sorted by seqnum.

Fixes TWCC usage with moderate to high packet duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4328>
2023-04-10 09:37:51 +00:00
Jordan Petridis 1c301df91a jack: remove version guards from the code
We already require >= 1.9.7 in meson and thus we can remove
the older codepath.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4348>
2023-04-05 21:39:00 +00:00
Alexande B 452c06782e osxvideosink: fix broken aspect ration and frame drawing region
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3336>
2023-04-05 09:48:34 +00:00
Sebastian Dröge 43e4db9fc9 rtspsrc: Skip PTs with caps incompatible to the global caps
Otherwise empty caps are created while all following code assumes that
the caps will have exactly one structure, and then run into assertions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4339>
2023-04-04 22:13:59 +00:00
Jan Schmidt 8ec6ef8ca4 adaptivedemux: Don't parse URI unnecessarily
Short-circuit parsing and recreating the playlist URI if
no HLS directives are going to be applied to it.

Fixes problems playing some streams (YouTube) that have
unneeded escaped characters in the URI and then complain
when GStreamer removes the escaping

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4335>
2023-04-04 19:21:31 +00:00
Shengqi Yu 8cf21fe744 v4l2object: Add support for YVU420M format
This is a multi-planar format with planes non contiguous in memory. It
is intended to be used only in drivers and applications that support the
multi-planar API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4287>
2023-03-31 13:42:05 +00:00
Tim-Philipp Müller ba417b0e07 rtpjpegdepay: fix logic error when checking if an EOI is present
We wouldn't add the missing EOI marker if the frame ended with
either 0xFF NN or 0xNN D9.

Fixes #2407

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4256>
2023-03-24 19:39:33 +00:00
Piotr Brzeziński 5beef42922 qtdemux: Fix seek adjustment with SNAP_AFTER flag
With GST_SEEK_FLAG_SNAP_AFTER present, the previous version would
adjust seek time based on the keyframe farthest away from desired_time.
This was incorrect, because we always want the *earliest* suitable keyframe
to seek to, not the last one.
With this fix, in case of the SNAP_AFTER, we now look for the closest keyframe
that can be found after desired_time. Behaviour for SNAP_BEFORE should remain
unchanged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4183>
2023-03-22 13:05:53 +00:00
Michael Tretter a11f811155 v4l2object: mark jpeg as parsed
Assuming that V4L2 CAPTURE devices always use one buffer per JPEG image, we can
always mark JPEGs provided by a V4L2 element as parsed.

The V4L2 elements require that JPEG images sent to V4L2 OUTPUT devices must
always be parsed.

This is necessary to link a V4L2 CAPTURE device with a V4L2 OUTPUT device
without explicitly marking the stream as parsed or adding a jpegparse into the
pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4229>
2023-03-21 14:58:15 +00:00
Edward Hervey ee759fb4bf 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/4225>
2023-03-20 11:40:30 +00:00
Edward Hervey dd3542aa4d adaptivedemux2: Don't blindly set the main manifest URI as referer
There's no guarantee it will *actually* be the URI which refered to what we are
downloading. It could be a stream URI or anything else.

Instead of putting something wrong, put no (specific) referer as a better choice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3972>
2023-03-20 07:59:27 +00:00
Edward Hervey bead28ad5c hlsdemux2: Don't set a referer when updating playlists
In the same way we don't for regular playlists in the base class.

If there is a referer specified by the app/user, the downloadhelper will set it
accordingly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3972>
2023-03-20 07:59:26 +00:00
Sebastian Dröge 621ec7b6e8 matroskademux: Make gst_byte_reader_get_data() usage less confusing
This is effectively the same behaviour but retrieving 0 bytes of data is
confusing to read.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
2023-03-18 16:34:19 +02:00
Sebastian Dröge 7e2a0779c3 flacenc: Fix mapping of GStreamer image tag type to FLAC image tag type
These enums are not compatible so just casting them does not work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
2023-03-18 16:17:01 +02:00
Sebastian Dröge ccad9a7338 plugins: Fix various trivial clang compiler warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
2023-03-18 16:16:55 +02:00
Enrique Ocaña González 735dac9d2f qtdemux: Fix crash on MSE-style flush
The flowcombiner and active_streams shouldn't be cleared in the
mse-bytestream variant, only in the mss-fragmented one. Otherwise the
soft reset leaves qtdemux in a state where it still believes that it has
streams, but they've been cleared. In that case, a null pointer
dereference happens and the app crashes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4199>
2023-03-17 15:33:49 +00:00
Tim-Philipp Müller 0fc568c6b1 gst-plugins-good: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:54 +00:00
Arun Raghavan 82b892ba3e matroskamux: Set rate/channels in Opus template caps
For some reason these were missed, and if caps didn't have them, we would emit
an invalid Matroska file with a 0 value for Sampling Frequency or channels.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2354
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4151>
2023-03-14 11:09:08 -04:00
Arun Raghavan 0ed51294e0 rtpopusdepay: Assume 48 kHz if sprop-maxcapturerate is missing
This matches 7587, section 6.1:

>   sprop-maxcapturerate:  a hint about the maximum input sampling rate
>      [...]
>      bandwidths (Table 1).  By default, the sender is assumed to have
>      no limitations, i.e., 48000.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2354
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4151>
2023-03-14 11:09:08 -04:00
Itamar Marom b8730bc98e splitmuxsink: Fix docs support version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4138>
2023-03-09 15:08:19 +02:00
Matt Feury 224030ff0c rtspsrc: Consider "451: Parameter Not Understood" when handling broken control urls
similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3854

it seems that some implementations return this when
the server does not implement URL handling correctly

this fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2334

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4123>
2023-03-07 10:32:32 -05:00
Seungha Yang 40300172ad adaptivedemux2: Fix MSVC build error
downloadrequest.c(497): error C4013: 'atoi' undefined; assuming extern returning int

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4107>
2023-03-03 23:15:42 +09:00