Commit graph

4173 commits

Author SHA1 Message Date
Mathieu Duponchelle
e728c0e71a ges-source: make sure internal decodebin doesn't get seeked too early
When uridecodebin exposes pads for its streams, we immediately ghost
the relevant (selected) one and let composition send a seek as soon as a
buffer is probed.

This means that sometimes uridecodebin is still linking elements
internally (for non-selected streams) and sees flush events travel down
the elements it is still busy trying to link / forward sticky events to.

This causes all sorts of nasty issues, which can be avoided by simply
blocking all data flow from the source until no-more-pads has been
emitted by uridecodebin (or whatever sub_element is wrapped).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3971>
2023-02-15 22:24:51 +00:00
Mathieu Duponchelle
2fd2af9420 ges-source: do not emit no-more-pads on child element
This most likely never caused any issues as we don't connect to
no-more-pads in the first place, and the element isn't directly exposed
to the user, but emitting it makes no sense, and we are actually going
to connect to no-more-pads in a subsequent commit.

The call was added in 86b893e54c, a patch
by me in 2013, I have no idea why but I probably didn't have a firm
grasp on what I was doing then.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3971>
2023-02-15 22:24:51 +00:00
Mengkejiergeli Ba
585d2d93f6 codecparsers: {h264,h265}bitwriter: Remove redundant condition checks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3967>
2023-02-15 16:00:04 +08:00
Khem Raj
817339c4de v4l2: Define ioctl_req_t for posix/linux case
this is an issue seen with musl based linux distros e.g. alpine [1]
musl is not going to change this since it breaks ABI/API interfaces
Newer compilers are stringent ( e.g. clang16 ) which can now detect
signature mismatches in function pointers too, existing code warned but
did not error with older clang

Fixes
gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types]
    v4l2object->ioctl = ioctl;
                      ^ ~~~~~

[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950>
2023-02-14 20:36:28 +00:00
Fernando Jiménez Moreno
1cabfebd2f docs: fix gst-validate-launch test suite example.
According to gst-validate-1.0 --list-scenarios, play_5s is not
a valid scenario. Runnning the test suite example with it
ends up raising an AttributeError. Switching to play_15s makes
it work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3941>
2023-02-14 19:49:04 +00:00
Evgeny Pavlov
351b72a59a amfcodec: Initial support of Smart Access Video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3904>
2023-02-14 19:04:30 +00:00
Evgeny Pavlov
38c3de565b amfcodec: Update AMF headers to version 1.4.29
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3904>
2023-02-14 19:04:30 +00:00
Tim-Philipp Müller
7cb9cea2b5 validate: add elements_srtp.test_play_key_error to flaky test list
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1777

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3959>
2023-02-14 18:27:12 +00:00
U. Artie Eoff
233de05a98 avviddec: change AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS
This fixes a compile error with recent upstream FFmpeg.

The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to
AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit
7d09579190de (lavc 58.132.100).

The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream
commit 10c9a0874cb3 (lavc 59.63.100).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3951>
2023-02-14 09:01:04 -05:00
Sebastian Dröge
cfb14c4b5d svtav1enc: Drain and completely reallocate the encoder instance on caps changes
The encoder does not support reconfiguration, and only deinitializing it
and then initializing it again causes deadlocks.

Also only reconfigure and drain the encoder if the video info has
actually changed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3957>
2023-02-14 11:59:48 +00:00
Yang, Xuchen
a14f8008fb audio: channel-mix: Fix channel count limit to be able to equal 64
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3949>
2023-02-14 07:04:45 +00:00
Thibault Saunier
dc1c9c8985 glvideomixer: Keep a reference to the underlying pad
There was cases where we were accessing the pad while it was already
destroyed. Ensure it can't happen by owning a ref on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3916>
2023-02-13 22:23:13 +00:00
Piotr Brzeziński
04615ca55a vtenc/vtdec: Fix typo in RGBA64_LE availability define
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3912>
2023-02-13 17:48:37 +00:00
Piotr Brzeziński
8d81c4827c vtenc: Disable ARGB/RGBA64 caps on M1 Pro/Max with macOS <13
Fixes #1358.
Passing ARGB64/RGBA64 to vtenc caused the encoding to fail
when running on M1 Pro/Max variants with macOS 12.x, so let's
remove these formats from caps when such scenario is detected.
This issue appears to have been fixed OS-side in macOS 13.0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3912>
2023-02-13 17:48:37 +00:00
Evgeny Pavlov
cf9a82cf84 amfcodec: Add 10-bit & HDR support in AMF AV1 encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3641>
2023-02-13 15:38:07 +00:00
Evgeny Pavlov
ec7eb75312 amfcodec: Add 10-bit & HDR support in h265 encoder
This commit adds 10 bit source file encoding and HDR metadata support in AMF HEVC encoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3641>
2023-02-13 15:38:07 +00:00
Edward Hervey
15bb6abeca gst-play: Don't force accurate seeking
This crept in several years ago sadly :(

The usage of accurate seeking should be reserved to use-cases where it is
essential that we seek to that position. This should not be the default.

There is a new option `--acurate-seeks/-a` to be able to force that.

Furthermore, if accurate seeks aren't required, a player should be using the
GST_SEEK_FLAG_KEY_UNIT flag to seek to the closest keyframe and provide the most
reactive experience.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3926>
2023-02-13 09:25:31 +00:00
Seungha Yang
b3acafc2b0 amfav1enc: Set stream-format on caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3946>
2023-02-12 23:18:25 +09:00
Seungha Yang
13ae9d2067 qsvav1enc: Set stream-format on caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3946>
2023-02-12 23:18:04 +09:00
Jan Vermaete
c99db9a42b rtsp-server: test-launch: added the argument mount/m to specify the mountpoint
Default is the previous hardcoded "/test"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3942>
2023-02-12 09:21:19 +01:00
Vivia Nikolaidou
4e7a5ebb11 qtdemux: Handle moov atom length=0 case by reading until the end
Previously it would fail to demux the file by trying to read G_MAXUINT64
bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3934>
2023-02-11 02:20:39 +00:00
Vivia Nikolaidou
3a9acff978 qtdemux: Fix guint vs gsize type confusion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3934>
2023-02-11 02:20:39 +00:00
Piotr Brzeziński
e2deebb103 vtdec: Fix not waiting for async frames when flushing
This was causing incorrect output when seeking, especially
when used with a multithreaded source like `videotestsrc n-threads=2`.
It should now correctly wait for frames still being processed by VT
while vtdec is flushing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3922>
2023-02-10 18:35:40 +00:00
Alessandro Bono
fcd983440e win32ipcutils: Add missing include
We are using std::isspace() with one parameter. That function is defined
in the cctype header.

```
win32ipcutils.cpp(34): error C2672: 'std::isspace': no matching overloaded function found
win32ipcutils.cpp(34): error C2780: 'bool std::isspace(_Elem,const std::locale &)': expects 2 arguments - 1 provided
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3933>
2023-02-10 14:35:20 +00:00
Thibault Saunier
0f577533e6 examples: Add an option to disable tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3930>
2023-02-10 12:59:55 +00:00
Sebastian Dröge
fc5bad5f75 examples: webrtc: rust: Fix a couple of minor clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3928>
2023-02-10 11:43:00 +00:00
Sebastian Dröge
28ab612a88 examples: webrtc: rust: Update to gstreamer-rs 0.20
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3928>
2023-02-10 11:43:00 +00:00
Edward Hervey
f072b25940 adaptivedemux2: Use track ID for debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3890>
2023-02-10 10:56:52 +00:00
Edward Hervey
5e193730db adaptivedemux2: Split track id from event stream-id
The id is used for naming of the various objects and debugging. We don't
want/need it to be obfuscated with the massive upstream id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3890>
2023-02-10 10:56:52 +00:00
Tim-Philipp Müller
edaf3252c5 tests: mark elements_srtp.test_play test as flaky
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1777

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3927>
2023-02-10 10:04:39 +00:00
Edward Hervey
edc66ce003 mxfdemux: Add support for FFV1 demuxing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3899>
2023-02-10 10:02:25 +01:00
Edward Hervey
3768ef89b9 mxf: simplify essence track matching
By directly providing a valid descriptor to match against

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3899>
2023-02-10 10:02:25 +01:00
Edward Hervey
2d5b71d6e3 mxfdemux: Handle empty tracks
This can happen when tracks aren't fully/properly detected due to new descriptors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3899>
2023-02-10 10:02:25 +01:00
Edward Hervey
206ed12368 mxfdemux: Handle sub-descriptor in generic descriptors
Specificied in S377-1 (2019) B.2 Generic Descriptor

This is one of the ways to store more "sub descriptors" for a single track

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3899>
2023-02-10 10:02:25 +01:00
Edward Hervey
56a50c3008 mxf: Add convenience function for looking up primer tags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3899>
2023-02-10 06:25:29 +01:00
Jan Alexander Steffens (heftig)
aeb262a7e1 pad: Don't leak user_data in gst_pad_start_task
When the task already exists, we forgot to free the passed `user_data`.
This wasn't an issue for most C code, which doesn't pass a
`GDestroyNotify`, but bindings such as gstreamer-rs do!

That said, allocating a trampoline in gstreamer-rs just for it to get
thrown away again is awkward. Maybe we need a `gst_pad_resume_task`?

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3920>
2023-02-09 15:40:56 +00:00
Sebastian Dröge
5119ca25e4 av1parser: Don't consider unknown metadata OBUs a bitstream error
Just don't parse them.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3898>
2023-02-09 14:52:58 +00:00
Sebastian Dröge
5486ed24a5 qtmux: Implement writing of av1C version 1 box
Version 0 is ancient and not specified in any documents. Take it
directly from the `codec_data` if presents or otherwise try to construct
a reasonably looking `av1C` box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882>
2023-02-09 14:04:06 +00:00
Sebastian Dröge
8593a58916 qtdemux: Drop av1C version 0 parsing and implement version 1 parsing
The av1C box is optional so dropping parsing does not break anything
fundamentally, and there seems to be no historical record how version 0
even looks like while the comments and the parsing disagreed with each
other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882>
2023-02-09 14:04:06 +00:00
Edward Hervey
3d506a0978 subparse: Properly forward segment seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3913>
2023-02-08 14:12:07 +00:00
Thibault Saunier
1bab0ef2aa bin: Do not deactivate pad in NULL_TO_READY
Since b76d336549
pads are deactivated when going to READY but in `uridecodebin(3)`, the
sources source pads are activated while in NULL state (when PULL mode is
supported), meaning that we are ending up deactivating those pads in
NULL_TO_READY, breaking the pipeline.

The intent of the commit mentioned above is to ensure that the pads are
deactivated either in PAUSED_TO_READY or READY_TO_READY, so it should
be safe to avoid deactivating in NULL_TO_READY.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3849>
2023-02-08 13:23:46 +00:00
Patricia Muscalu
c3e52d5c4f rtph264pay: Don't insert SPS/PPS before the second image slice
Only the first slice, for which fist_mb_in_slice is set to 0,
should trigger insertion of SPS and PPS buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3402>
2023-02-08 12:10:11 +00:00
Thibault Saunier
4067bbdd91 uridecodebin: Set source element to READY before querying it
Generating the source element is done when uridecodebin is doing the
READY to PAUSED state change, so it is reasonable to set the new source
element to that state.

This also allows detecting early failures with backing libraries or
hardware (checks done in NULL->READY).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3857>
2023-02-08 11:07:21 +00:00
Philipp Zabel
485c8ef4b5 gleglimage: cache EGL images per DmabufUpload
Do not store cached EGL images in GstMemory QData. Instead, use a
per-DmabufUpload GHashTable to store cache entries with a weak
reference to the GstMemory.

This allows two glupload elements on separate tee branches to have
their own EGL image cache. For this pipeline:

  gst-launch-1.0 v4l2src ! tee name=t \
      t. ! queue ! glupload ! fakesink
      t. ! queue ! glupload ! fakesink

this gets rid of the occasional critical error message:

  GStreamer-CRITICAL **: 08:26:33.194: gst_mini_object_unref: assertion 'GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) > 0' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3880>
2023-02-07 19:32:14 +00:00
medithe
3943503fc1 gstreamer: bin: Don't unlock unlocked mutex in gst_bin_remove_func()
Calling `g_mutex_unlock(mutex)` leads to an undefined behavior if the
mutex is not locked by the current thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3903>
2023-02-07 19:03:43 +02:00
Edward Hervey
d10f9a00e2 closedcaption: Don't leak caps event
All events that we handle should be unreffed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3902>
2023-02-07 08:51:18 +01:00
Jan Schmidt
621604aa3e webrtc: Calculate the jitter for remote-inbound-rtp stats
Populate the clock-rate in the internal stats structure, so
it can be used by the _get_stats_from_remote_rtp_source_stats()
method to calculate remote receivers' jitter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3900>
2023-02-07 04:58:04 +11:00
Jan Schmidt
615a019457 webrtcbin: Report full codec-stats for source pads
Use the current caps for webrtcbin srcpads, as received_caps
are only stored for sink pads based on incoming caps events.

Makes it so that webrtcbin stats reports contain fuller
codec information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3900>
2023-02-07 04:49:34 +11:00
Anders Hellerup Madsen
acb8f2ee5d glstereosplit: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:16:14 +01:00
Anders Hellerup Madsen
f0040149a0 glbasefilter: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:15:46 +01:00
Anders Hellerup Madsen
ecd9a4e37c glbasemixer: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:15:06 +01:00
Anders Hellerup Madsen
7bee4619dd glbasesrc: use gst_display_ensure_context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:14:34 +01:00
Anders Hellerup Madsen
0da0da69aa gldisplay: Add gst_gl_display_ensure_context
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/439

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3843>
2023-02-06 16:14:07 +01:00
Adrian Fiergolski
06b778e0a1 avtp: specify the required version of libavtp
Support of RVF requires libavtp in version 0.2.0 at least.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3897>
2023-02-06 13:31:51 +00:00
Enrique Ocaña González
92a4cfe20f qtdemux: Don't emit GstSegment correcting start time when in MSE mode
When using qtdemux in a pipeline that should only work as a pure demuxer (not
for actual playback), qtdemux shouldn't emit new GstSegments to correct
the start time (jump to the future) to ensure that the user experiences no
playback delay. By doing so, it's generating the wrong segments when an append
of data from the past happens. When that happens, downstream elements such as
parsers (eg: aacparse) may clip those buffers laying before the GstSegment and
create problems on the GStreamer client app (eg: WebKit).

Getting buffers clipped out because of the wrong GstSegments started becoming
a problen when this commit was introduced:

ab6e49e9cc audioparsers: add back segment clipping to parsers that have lost it

This clipping makes test DASH shaka 35 from MVT tests[1] to fail in
WebKitGTK/WPE (at least) and can potentially cause a number of other problems
in the WebKit Media Source Extensions (MSE) code.

Note that this new behaviour of not emitting new GstSegments only makes sense
when qtdemux is being used as a pure demuxer and not as part of a regular
pipeline. This is why the variant field has been added. When equal to
VARIANT_MSE_BYTESTREAM, it will make qtdemux behave differently in push mode,
taking decisions that meet the expectations for an MSE-like processing mode.
This kind of tweaks have been done in the past for MSS streams, for instance.
That code has been refactored to use VARIANT_MSS_FRAGMENTED now, instead of
its own dedicated boolean flag.

Co-authored by: Alicia Boya García <ntrrgc@gmail.com>

...who suggested to use "variant: mse-bytestream" in the caps to identify that
mode, as proposed in her unmerged patch:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/467

[1] https://github.com/rdkcentral/mvt

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3867>
2023-02-06 12:42:49 +00:00
Nirbheek Chauhan
77b8547586 meson: Allow sysdeps to be forced as fallback subprojects
The original code was too complicated; likely created before the
provide section existed for wraps:

https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section

Now you can do --force-fallback-for=pygobject and it'll actually work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3804>
2023-02-06 09:26:02 +00:00
Ma, Mingyang
99cdc3a965 msdkenc: Let runtime decide parameters
Some parameters can be determined by runtime instead of default values. So unset the default and let runtime choose the best parameters

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3660>
2023-02-06 02:24:54 +00:00
Nirbheek Chauhan
033a71e405 webrtc examples: Use webrtc.gstreamer.net
Actually just a CNAME to webrtc.nirbheek.in for now, but it allows
replacement / hosting without my involvement, so reduces the bus
factor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3802>
2023-02-04 13:37:02 +00:00
Sebastian Dröge
a0ccb6b558 svtav1enc: Use G_DECLARE_FINAL_TYPE and GST_ELEMENT_REGISTER_DEFINE 2023-02-03 22:14:18 +02:00
Sebastian Dröge
aca2bad25c svtav1enc: Fix compilation with SVT-AV1 1.1 and drop GStreamer 1.16 compatibility 2023-02-03 22:14:18 +02:00
Sebastian Dröge
5bc92375c9 svtav1enc: Fix indentation 2023-02-03 22:14:18 +02:00
Sebastian Dröge
7890a1f8c7 svtav1: Integrate into the build system properly 2023-02-03 22:14:18 +02:00
Sebastian Dröge
b15efacf84 svtav1: Merge SVT-AV1 encoder into gst-plugins-bad
This is based on d5e1e2a586020854733f6b0806064d0c900c88d2 from
https://gitlab.com/AOMediaCodec/SVT-AV1.
2023-02-03 22:13:30 +02:00
Sebastian Dröge
716aaa562b net: ptp: Use GSubprocess instead of lower-level GLib APIs that don't work on Windows
libgstnet depends on GIO already anyway so we can as well make use of it
instead of a half-baked Windows implementation that doesn't actually
work.

As a next step, the helper process also needs to be made usable on
Windows.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1259

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3887>
2023-02-03 18:51:17 +00:00
Tim-Philipp Müller
85476eab08 kms: drop use of GSlice allocator and remove unnecessary check
g_new0() will never return NULL but just abort if it can't
allocate memory (same for g_slice_new).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
35405de344 shm: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
3f94d7ec37 midiparse: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
d95d3e39af cc708overlay: bump pango requirement and drop no longer required locking
Gets rid of GSlice allocation that's never freed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
7679011d1d validate: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
cae6c6c73a gst-omx: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:10 +00:00
Tim-Philipp Müller
0d9bdf238c gst-docs: drop use of GSlice in example code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Tim-Philipp Müller
18a3c32323 ges: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Tim-Philipp Müller
f8817a8e8d ges: nle: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Tim-Philipp Müller
06e9d78ade gst-examples: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Tim-Philipp Müller
8a047a619e gst-libav: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Tim-Philipp Müller
f5977dae15 rtsp-server: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3784>
2023-02-03 17:48:09 +00:00
Edward Hervey
0639f117cb hlsdemux2: Remove enable-llhls property
This was only used for testing purposes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:24 +00:00
Edward Hervey
854683c871 hlsdemux2: Don't leak PDT datetime
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:24 +00:00
Edward Hervey
96613c45fb adaptivedemux2: Don't leak taglist
Clarify the ownership in the documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:24 +00:00
Edward Hervey
123030feac adaptivedemux2: Don't leak track tags
The tags are fully transfered to this function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
6f6c0cbbaf adaptivedemux2: Log request duration in debug output
When completing, log how long a HTTP request took into the debug output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
714628f1ec hlsdemux2: Improve live playlist update intervals
The live playlists should be updated at a defined interval. The problem is that
this interval was used *after* the playlist was finally received and processed,
which resulted in a gradual shift happening in playlist updates.

Instead store and use the time at which playlists were requested to determine
when the next one should be downloaded.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
6684aee14c hlsdemux2: Fix playlist reload interval when unchanged
When falling back to using the regular last segment, use that duration as the
identical-playlist reload interval (and not the playlist target duration which
could be much larger)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
5935c8049a hlsdemux2: Fix position searching
The scanning is done in a reverse order, the proper full checks to do are
therefore:
* If the position is beyond half a "segment duration", it's in the following
segment
* If the position is within the first half of a segment, it's in that one
* If the segment is the first one and the position is within half a duration
backwards, we consider the position as being within that first segment

Also handle the case where a "partial only" segment doesn't have a reliable
duration, and therefore use the playlist target duration instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
1c6364673d hlsdemux2: Handle all cases for starting segment calculation
The implementation wouldn't work with regular HLS streams (i.e. the final
fallback).

Now that the implementation uses time to search for the starting
segment (instead of just the n-th from the end), we can specify the correct
hold_back fallback value from the RFC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
3129970c8a hlsdemux2: Fix buffering threshold calculation and handling
* The checks for smaller values were wrong
* Properly initialize the stream default recommended buffering threshold so that
  a default (10s) value is used until the subclass can provide a proper value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
eb1eb64506 hlsdemux2: Make sure simple media playlist is properly primed
By setting/propagating stream time initially

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
3d0e8aa07e adaptivedemux2: Fix manifest access during seeking query
Avoid a deadlock if a downstream seeking query happens while the scheduler
thread is holding the manifest lock (for example during a seek back to live).

Instead, do a more elaborate fix where the external calls that need access to a
'manifest' access a copy that's updated during a manually triggered manifest
update callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
5334007a0b adaptivedemux2: Symbol hygiene cleanup
Rename track_dequeue_data_locked() to
gst_adaptive_demux_track_dequeue_data_locked(), since it's non-static.

Make find_stream_for_track_locked() static since it's only used in the main
gstadaptivedemux.c file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
6bb74ed2a0 adaptivedemux2: Fix download error handling more
gst_adaptive_demux2_stream_finish_download() will already schedule another
fragment download if it can so don't fall through to the retry code that will
also try and schedule a download (triggering an assert).

Fix the logic in general to retry advancing into the live seek range once.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
b1354058e1 hlsdemux2: Immediately request playlist after URI changes
When the stream switches to a new playlist / variant while the loader is waiting
on a timer to refresh the old playlist, cancel the timer and submit the request
for the new URI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
6d7d3d93e6 hlsdemux2: Re-add support for fallback variant URLs
fallback variant URLs get accumulated into a list in the variant now. If there's
one available, switch to it after a variant update failure (failure to load the
variant 3 times)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
d5b8929315 hlsdemux2: Demote log message
Don't complain loudly about replacing the current pending playlist, just log it
at debug level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
91c8f3f990 hlsdemux2: Wait for playlist load after a switch
Check in update_fragment_info() if the playlist we want has actually been loaded
yet, and return BUSY if not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
2b93dae59a hlsdemux2: Handle async playlist loading failures
Add failed variant playlists to a list and failover to other variants until
there is none left

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
454779f094 hlsdemux2: Wait for playlist switch during seek.
When switching to/from an iframe variant to do seeking, wait for the target
playlist to load before handling the seek.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
fe41db92db hlsdemux2/playlist-loader: Implement more features
Implement limited retries on download errors before reporting it, and remember
permanent redirects, with LL-HLS directives removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
9ae3978c72 hlsdemuxdemux2: Consider the hold-back when calculating seek range
When calculating the seek range for a live stream, use the same hold-back logic
as when choosing a starting segment, including low-latency segments if
enabled. Permits seeking closer to the live edge when re-synching or catching
up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
083538df9e hlsdemux2: Continue reworking code for async playlist updates
Everything is working again now except for corner cases:
  - Failing over to another playlist after a load failure
  - Remembering playlist redirects and using that URI
    directly next time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
93d92d5ddf adaptivedemux2: Handle more async stream cases
Handle BUSY flow returns when making calls from external threads, and inhibit
fragment downloads during stream prepare

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
7b3a1bac0a hlsdemux2: Add llhls-enabled property to streams
Tidying: Make the llhls-enabled setting configurable through a stream property
instead of set manually after construction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
d5edd48f13 hlsdemux2: Add gst_hls_demux_stream_set_playlist_uri
Add a method that configures the new playlist URI for a stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
2c822735ba hlsdemux2: Add HLS playlist loader
Add a helper that asynchronously loads and refreshes the playlist for HLS
streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
52d577eee1 adaptivedemux2: Fix for failed download handling
When playing at the live edge of a live playlist, and a download fails, we don't
expect there to be a next fragment. That case is handled lower down anyway, so
don't retry infinitely on spurious http errors at the live edge.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
ceda805abb adaptivedemux2: Drop segment lock on stream_seek error.
If stream_seek() fails, make sure to drop the segment lock before bailing out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
44d3751d68 adaptivedemux2: Add gst_adaptive_demux2_stream_wait_prepared()
Add a method that waits for a stream to signal the prepare_cond after it returns
a BUSY flow return.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
d3acafbb5a adaptivedemux2: Remove gst_adaptive_demux2_stream_has_selected_tracks
Use gst_adaptive_demux2_stream_is_selected_locked() instead, which is identical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
8d0c7d9d93 adaptivedemux2: Move GST_ADAPTIVE_DEMUX_FLOW_BUSY to adaptivedemux.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
0962908e62 adaptivedemux2: Add start/stop vfuncs
Remove the can_start() vfunc, in favour of vfuncs when the stream starts/stops,
allowing the sub-class to do custom logic before (or preventing) the stream from
starting and stopping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
fa0e9e2ec5 hlsdemux2: Remove unused function argument
Remove the demux argument from the
gst_hls_demux_stream_update_rendition_playlist() method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
67bc8d7cc0 adaptivedemux2: Add gst_adaptive_demux_get_loop()
Add an accessor function for retrieving the demuxer's scheduler thread loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
2082c8912d adaptivedemux2: Add gst_adaptive_demux_period_add_stream()
Make a function for adding a stream to a period, for better encapsulation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
82839fb82f adaptivedemux2: Add new flow return value for BUSY and PREPARE stream state
Neither are used yet, they're just placeholders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Edward Hervey
b03e68ea8c hlsdemux2: support old compilers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:23 +00:00
Jan Schmidt
1cede1d0cf hlsdemux2: Place HLS delivery directives in UTF-8 order.
Use new GstURI gst_uri_to_string_with_keys() API to produce the playlist URI
with query arguments in UTF-8 order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
21cb739830 hlsdemux2: Avoid assert in _has_next_fragment()
gst_hls_demux_stream_has_next_fragment() can be called with a NULL
current_segment if we're past the end of the current playlist. In that case,
just return FALSE instead of hitting a critical in the playlist code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
018a6192bd hlsdemux2: Include skipped segments in MSN calculation
When a playlist has skipped segments, increment the MSN to account for them so
the remaining segments end up with the right sequence numbers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
268a25b979 hlsdemux2: Use partial segment for playlist update interval
When playing LL-HLS playlists in LL-HLS mode, update the playlist more often (on
the partial segment interval) or else we end up downloading them in bursts and
playing further from the live edge than intended.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
55f6cd9243 hlsdemux2: Do a full playlist reload if delta fails
If we do a delta playlist request but then can't merge the result with the
existing playlist, retry with a full playlist request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
874b665710 hlsdemux2: Fill in skipped segments if possible
After reloading a playlist using a delta request, use the previous playlist to
fill in skipped segments if possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
703d29549a hlsdemux2: Add gst_hls_media_playlist_sync_skipped_segments()
Add a method that transfers over skipped segments from a reference playlist,
used to repopulate a delta playlist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
7496d2750e hlsdemux2: Parse EXT-X-SKIP tag
Parse the attributes from the EXT-X-SKIP tag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
8a0190b521 hlsdemux2: Use skip and blocking playlist delivery directives
Detect when we can use a blocking request and delta playlist update requests and
add the required delivery directives to the request URI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
c16366e5f3 hlsdemux2: Add gst_hls_media_playlist_get_next_msn_and_part()
Add a function that computes the media sequence number and/or part index that
are immediately after the end of the playlist, for use in blocking playlist
requests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
d41def562c hlsdemux2: Use stream llhls_enabled flag
Use the stream's copy of the llhls_enabled flag when deciding whether to do
preload requests - the value that was cached when the stream started

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
42b0dd8c41 hlsdemux2: Split the stream object out
Move the stream object to a separate file to split the demux level behaviour
from the stream behaviour better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
5baf5f4b1e hlsdemux2: Add a timestamp to the playlist
Store the timestamp for this playlist. If valid it represents the monotonic time
at which the data was retrieved, minus any proxy cache Age field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
a3770523c0 adaptivedemux2/downloadrequest: add a helper to retrieve the Age header
Add a method to look at HTTP response headers and parse and return any Age
header, provided by caching proxy servers if the data was provided from a cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
90bedcb2bc hlsdemux2: Fix missed segment match for partial-only segment
Fix a case where the matching code might not select the final partial-only
segment because it has too short a duration (while it's still being created)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
9edb2f6690 hlsdemux2: In live, match buffering to the hold back distance
When playing a live stream, make the recommended buffering threshold at most the
hold-back distance from live. If we start 3 seconds from the live edge, there's
no point trying to buffer more - we'll just hit the live edge and have to wait
for more data to be available anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
1e6550f623 hlsdemux2: Resync stream time on partial segment boundaries
When resyncing stream times in a playlist, support at any partial segment
position, not just at full segment boundaries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
bdec75f9dc hlsdemux2: Calculate / transfer timing info for preloads
When fulfilling data requests, transfer timing information so the stream can
calculate data bitrates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
5192181ef5 adaptivedemux2: Add most recent data time and offset helper
Add a field to the DownloadRequest that reports the most recent time at which
data arrived. Update it in the DownloadHelper.

Add a method to retrieve the GST_BUFFER_OFFSET() for the DownloadRequest's data
buffer (if any).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
40938c8853 adaptivedemux2: Handle another case in download_request_take_buffer_range
Handle the case where we want to get a range from the available data that
doesn't start at the first available byte (and discard the bytes before that
start offset).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
cbb9cfe987 hlsdemux2: Cancel preload before fetching something else
When submitting a request for fragment or header that doesn't match any preload,
make sure there's not an ongoing preload for that data type, to avoid parallel
downloads using up bandwidth.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
70bfeff35d hlsdemux2: Fix assertion on shutdown
After cancelling a DownloadRequest, the download helper may not do so
immediately, so we can't assert on the in_use flag. Also, since there's no
refcount on the preload hint struct in the download request callback data, make
sure no callbacks will be dispatched when we're going to free the preload hint
struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
44107d0c4b hlsdemux2: Implement the stream submit_request() vfunc
Implement the submit_request() vfunc for streams and fulfil requests from the
preload hint data if possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
a7e5236a39 hlsdemux2/preloader: Implement basic request handling
Implement fulfilment of HTTP requests from the active preload downloads by
finding any preload request that can provide the requested data and feeding
bytes from the internal DownloadRequest to the caller provided target
DownloadRequest.

Doesn't yet calculate timestamps to make the target request have a sensible
apparent bitrate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
940811d593 adaptivedemux2/downloadrequest: Add new methods
Add download_request_take_buffer_range() and
download_request_get_bytes_available() methods.

download_request_take_buffer_range() takes bytes from the front of the request
that satisfy the requested start/end byterange, and puts any remaining bytes
back into the DownloadRequest

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
76565e8979 adaptivdemux2: Improve a comment about unlocking download requests.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
a14f4f7054 adaptivedemux2: Make download mechanism overrideable
Make the mechanism by which DownloadRequests are fulfilled overrideable by the
subclass, in case it has an internal mechanism it can use (such as blocking
preloads in HLS)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
cb27c05ca7 hlsdemux2: Add preloader helper.
Add a helper that submits and handles blocking preload requests for future
PART/MAP data from live playlists. Add handling in the hlsdemux stream to submit
preload requests when hitting the end of the available segments in a live
playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
5ca336226e hlsdemux2: Add preload equality helper
Add a helper function that compares two preload hints for equality based on URI
and requested byte range.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
30bc72d6c7 adaptivedemux2: Define RFC8673_LAST_BYTE_POS
Define the recommended value from RFC8673 for the last byte of an open-ended
range request intended to invoke chunked blocking downloads of an incrementally
created resource.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
61516eadf6 hlsdemux2: Ignore partial segments when not live
Add some checks that LL-HLS support is enabled and that the current playlist is
live before proceeding to play any partial segments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
401ca3ef44 hlsdemux2: Print playlist age in debug output
Store the timestamp when playlists are updated, and add some debug output to the
update_fragment_info that estimates how far from the live edge the fragment
currently is

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
43e042c4b7 hlsdemux2: Implement LL-HLS flag and part-hold-back/hold-back in live.
Add a flag to hlsdemux to enable or disable LL-HLS handling.

When LL-HLS is enabled and an LL-HLS playlist is loaded, use the part-hold-back
threshold to choose a starting segment.

For live streams that aren't LL-HLS, use the provided hold-back attribute, or
fall back to landing 3 segments from the end.

Make the gst_hls_media_playlist_seek() method able to choose a partial segment
within 2 target durations of the end of the playlist when requested.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:22 +00:00
Jan Schmidt
9848c1a1a1 m3u8demux2: Fix off-by-one and leak.
Fix an off-by-one in gst_hls_media_playlist_sync_to_playlist() that would ignore
the first fragment in the reference playlist.  The error was harmless, since we
expect the reference playlist to be older than the playlist we're
synchronising (so the first/oldest segment in the reference playlist will likely
not exist in the new playlist), so this is just for correctness.

Also fix a segment leak in gst_hls_media_playlist_advance_fragment() when
ignoring the partial_only segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
676fffd23c hlsdemux2: Fix segment advance on partial segments.
Fix the duration passed to gst_adaptive_demux2_stream_advance_fragment() when
advancing from a partial segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
e318bc3df5 hlsdemux2: Improve some debug output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
3537614c2b hlsdemux2: Add and use gst_hls_media_playlist_find_position()
Add a function for synchronising current position with the contents of a
playlist that is specifically for that and can handle synchronising to a partial
segment.

gst_hls_media_playlist_seek() will be used only when performing external seek
requests, to find the best segment or partial segment at which to resume
playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
c25814bac0 hlsdemux2: Add debug in find_segment_in_playlist()
In m3u8 segment matching, print the PDT that was matched between playlists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
857541ae07 hlsdemux2: Fix some m3u8 segment leaks
Make sure unref m3u8 segments in some missed paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
7b9547a119 hlsdemux2: Allow starting at the partial_only segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
1b8af98208 hlsdemux2: Recalculate partial segments in anchor segment
When recalculating the partial segment stream times in
gst_hls_media_playlist_recalculate_stream_time(), don't miss the anchor segment
itself.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
e1a6ec22ee hlsdemux2: Dump init uri details for segments.
When dumping an m3u8 playlist to debug, include information about any
initialisation data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
2c82fdf276 hlsdemux2: Use gst_hls_media_playlist_recalculate_stream_time()
Instead of recalculating stream times manually in a playlist, let the playlist
do it, so that it fixes up partial segment stream times too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
d76aacfb82 hlsdemux2: LL-HLS improvements
Fixes for stream_time recalculation and handling in partial segments.

Disallow bitrate switching when in the middle of partial segments - only at a
full segment (or right before the first partial segment of a segment).

It's possible but more difficult to switch bitrates in the middle of a partial
segment group, since they are less likely to have aligned keyframes. In any
case, the seek code can't do that right now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
b6abe94890 hlsdemux2: Continue implementing LL-HLS support
Somewhat working support for proceeding into the partial segments appearing at
the live edge of the playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
92e849070f hlsdemux2: Mark locations where partial segments need handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
cfc62a69f7 hlsdemux2: Start adding partial_segment handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
9aa2497062 hlsdemux2: Note STABLE-RENDITION-ID is not handled
Add a comment that STABLE-RENDITION-ID is not yet parsed or used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
e2750d4ae3 hlsdemux2: Calculate stream times for partial segments
When calculating stream times for segments, fill in the stream time fields on
any attached partial segments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
43a8d45ac6 hlsdemux2: Add unit test for parsing LL-HLS playlist
Test parsing of partial segments (EXT-X-PART, EXT-X-PART-INF) and preload
hints (EXT-X-PRELOAD)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
3c50f54310 hlsdemux2: Implement preload hint parsing
Load EXT-X-PRELOAD-HINT into a preload_hints array in the media playlist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
3ed6a23a4d hlsdemux2: Implement EXT-X-SERVER-CONTROL parsing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
07f51396af hlsdemux2: Add parsing of partial segments
Add partial segments to each media segment, and potentially create a trailing
dummy segment if there are partial segments at the end of the playlist

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Jan Schmidt
fac7177354 hlsdemux2: make helper function for parsing times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Edward Hervey
4e946890b2 adaptivedemux2: Global output position is always positive
Change to non-signed GstClockTime for tracking

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
2023-02-03 16:52:21 +00:00
Seungha Yang
e1a22402d3 tools: Make sure UTF-8 encoded command line arguments on Windows
On Windows, arguments passed in main() are system codepage
encoded and might not be valid UTF-8 string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3828>
2023-02-03 16:05:19 +00:00
Seungha Yang
090d50e1a0 tests: Add CUDA memory allocator test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:43 +00:00
Seungha Yang
10ade466ef nvenc: Use CUDA stream of memory if exists
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:43 +00:00
Seungha Yang
7a8bb85523 cudaupload, cudadownload: Update for shared CUDA stream
Use CUDA stream of memory if exists

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:43 +00:00
Seungha Yang
aabcba16db nvdecoder: Skip synchronization if downstream buffer holds CUDA stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
ddc5f1d425 cudaconvertscale: Add support for shared CUDA stream
If CUDA stream is shared by upstream/downstream, don't sync at
convert element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
1cb47d549b cudaconverter: Don't sync per conversion
Caller should take care of synchronization

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
8d14194fdd nvencoder: Add support for shared CUDA stream
Sets CUDA stream on CUDA buffer pool so that CUDA stream object
can be shared

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
d409c35367 cudabufferpool: Add support for CUDA stream use in memory
* Use GstCudaPoolAllocator
* Pass configured GstCudaStream object to allocator

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
30d06e03c2 cudamemory: Make GstCudaStream-aware
This will be used for CUDA stream sharing.

* Adding GstCudaPoolAllocator object. The pool allocator will
  control synchronization of allocated memory objects.
* Modify gst_cuda_allocator_alloc() API so that caller can specify/set
  GstCudaStream object for the newly allocated memory.
* GST_CUDA_MEMORY_TRANSFER_NEED_SYNC flag is added in addition to
  existing GST_CUDA_MEMORY_TRANSFER_NEED_{UPLOAD,DOWNLOAD}.
  The flag indicates that any GPU command queued in the CUDA stream
  may not be finished yet, and caller should take care of the
  synchronization.
  The flag is controlled by GstCudaMemory object if the memory holds
  GstCudaStream. (Otherwise, GstCudaMemory will do synchronization
  as before this commit). Specifically, GstCudaMemory object will set
  the new flag automatically when memory is mapped with
  (GST_MAP_CUDA | GST_MAP_WRITE) flags. Caller will need to unset
  the flag via GST_MEMORY_FLAG_UNSET() if it's already synchronized
  by client code.
* gst_cuda_memory_sync() helper function is added to perform synchronization
* Why not use CUevent object to keep track of synchronization status?
  CUDA provides fence-like interface already via CUevent object,
  but cuEventRecord/cuEventQuery APIs are not zero-cost operations.
  Instead, in this version, the status is tracked by using map and
  object flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
9eaae61a44 cudamemory: Allow nullptr allocator object
The GstCudaAllocator object doesn't hold any device object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
0a81c8deb3 nvcodec: Port to GstCudaStream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
a7c54ebc06 cuda: Add GstCudaStream object
Wrap CUstream handle with GstCudaStream to make it ref-counted
object. This GstCudaStream object will be used later for
CUDA stream sharing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
661b5f60c6 cuda: Provide single header include entry point
Add "gstcuda.h" header file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3629>
2023-02-03 15:27:42 +00:00
Seungha Yang
c0a4f41525 pluginloader-win32: Prepend gstreamer-1.0-0.dll directory to PATH env for child process
Usually gst-plugin-scanner.exe will be located under libexec/gstreamer-1.0
or even somewhere user specified location via GST_PLUGIN_SCANNER
environment. So, in order for child process to be able to load
GStreamer DLLs, parent process will need to update PATH env

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3886>
2023-02-03 14:25:21 +00:00
Seungha Yang
bc0708eafb nvencoder: Fix min buffers parameter of allocation query in auto GPU mode
At the time when propose_allocation() get called, encoder session
would not be initialized yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3888>
2023-02-03 22:19:22 +09:00
Sebastian Dröge
8aa376d541 gstreamer: Decide rate-control-mode based on the bitrate/cqp/crf settings
And also keep the default encoder settings but simply override them with
our own values that we care about.

This mirrors the encoder configuration behaviour from ffmpeg.
2023-02-03 12:48:56 +02:00
Sebastian Dröge
70c83bc59c gstreamer: Use GLib types instead of stdint.h types consistently 2023-02-03 12:48:56 +02:00
Sebastian Dröge
dd1db338df gstreamer: Fix double unref
The ownership of the caps is passed to `gst_video_encoder_set_output_state()`.
2023-02-03 12:48:56 +02:00
Sebastian Dröge
df064c6cc2 gstreamer: Configure colorimetry and HDR metadata if present
This raises the minimum GStreamer requirement to 1.16 as used by the CI
and optionally makes use of 1.18 features, including HDR.
2023-02-03 12:48:25 +02:00
Sebastian Dröge
aeee6f5b6a gstreamer: Set correct maximum width/height limits 2023-02-03 12:35:24 +02:00
Sebastian Dröge
65eb56e7ad gstreamer: Use correct 10-bit format on big endian systems 2023-02-03 12:35:24 +02:00
Sebastian Dröge
90fd191392 gstreamer: Set force_key_frames=true in CQP/CRF mode
Other modes don't support that so keyframes can't be requested at
arbitrary times.
2023-02-03 12:35:24 +02:00
Sebastian Dröge
f24643b48f gstreamer: Add support for setting arbitrary parameters via parameters-string property 2023-02-03 12:35:18 +02:00
Sebastian Dröge
d746164ba0 gstreamer: Fix naming of function name that was taken over from the SVT-HEVC encoder 2023-02-03 12:34:38 +02:00
Sebastian Dröge
ddb9a037e1 gstreamer: Don't overwrite application configuration on initialization and initialize with the default configuration 2023-02-03 12:34:38 +02:00
Sebastian Dröge
7b1b33aff2 gstreamer: Clean up property handling
Use more correct types, defaults and clean up property names a bit.
This now matches the configuration provided by ffmpeg.
2023-02-03 12:34:38 +02:00
Sebastian Dröge
78ee7e82d9 gstreamer: Mark all internal functions as static 2023-02-03 12:34:38 +02:00
Sebastian Dröge
10769e7fe6 gstreamer: Fix encoder and buffer state life cycle
Allocate/deallocate the encoder in `open()`/`close()` and its buffers in
`start()` / `stop()`.

Also fail correctly if configuring the encoder fails.
2023-02-03 12:34:38 +02:00
Sebastian Dröge
24d6027d2e gstreamer: Remove unused frame_count and dts_offset 2023-02-03 12:34:38 +02:00
Sebastian Dröge
2d250439f1 gstreamer: Fix debug category description 2023-02-03 12:34:38 +02:00
Adrian Fiergolski
79d2af5626 avtp: rvf: add missing since markers
Add missing markers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335>
2023-02-02 19:15:46 +01:00
Adrian Fiergolski
9f880b37fc avtp: rvf: add AVTP RVF de-payload support
Add AVTP Raw Video Format de-payload support. The element supports only
GRAY16_LE output format, so:
- active pixels (no vertical blanking),
- progressive mode,
- 8 and 16-bit pixel depth,
- mono pixel format,
- grayscale colorspace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335>
2023-02-02 19:15:42 +01:00
Adrian Fiergolski
d8f449ccda avtp: cvf: extract AVTP VF depayload base class
Extract a part which could be common with the AVTP RVF depayload plugin to a separate class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335>
2023-02-02 19:15:38 +01:00
Adrian Fiergolski
4f2fde0163 avtp: rvf: add AVTP RVF payload support
Add AVTP Raw Video Format payload support. The element supports only GRAY16_LE
input format, so:
- active pixels (no vertical blanking),
- progressive mode,
- 8 and 16-bit pixel depth,
- mono pixel format,
- grayscale colorspace.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335>
2023-02-02 19:15:33 +01:00
Adrian Fiergolski
8702a1fa67 avtp: cvf: extract AVTP VF payload base class
Extract a part which could be common with the AVTP RVF payload plugin to a separate class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1335>
2023-02-02 19:15:29 +01:00
Jan Schmidt
edd5911249 gl/cocoa: Return a strong ref to the parent GstGLContext
If the GstGLCAOpenGLLayer was initialized via a parent
context, make sure to ref the context before returning it
from getGLContext as all callers will unref it.

Follow up to !3729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3881>
2023-02-02 13:53:07 +00:00
Jan Schmidt
138863b327 gsturi: Add API to order query strings
Add gst_uri_get_query_string_ordered() and gst_uri_to_string_with_keys() that
allow constructing the URI string with query arguments in a specific order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3803>
2023-02-02 11:02:47 +01:00
Piotr Brzeziński
ae200a4d62 vtenc: Disable HW acceleration for interlaced ProRes
Due to a bug in the VT API, attempting to encode interlaced content
with ProRes results in an error, halting the pipeline instead of
gracefully falling back to software encoding.
Should be removed in the future if Apple ever fixes this issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3222>
2023-02-02 06:18:02 +00:00
He Junyan
60731adea6 va: Avoid the array index overflow when filling 8x8 scaling list.
The VA API has not defined the scaling list entries for U/V planes
for the 4:4:4 stream. In fact, we do not meet the 4:4:4 format output
for H264 so far, and scaling list is not used frequently, so we just
print out some warning and ignore these scaling list values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3749>
2023-02-02 00:41:42 +00:00
Thibault Saunier
6b30a5d987 adaptivedemux2: Generate proper stream-id taking into account upstream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3160>
2023-02-01 22:26:34 +00:00
Thibault Saunier
3963396716 gstutils: Add a utility to create a stream-id without a pad
We already have functions to generate a stream-id from pads but in the
end those pads are not even used in most cases. This adds functions to
generate a stream-id even before creating the source pads for the
element that is going to use it. For example a demuxer that is properly
implements the GstStream/GstStreamCollection API will not have a Pad but
already needs to generate a stream-id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3160>
2023-02-01 22:26:33 +00:00
Colin Kinloch
25b4e84fe5 validate: Allow Ctrl-C to quit on fault
Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3868>
2023-02-01 21:40:01 +00:00
Seungha Yang
29bd8de052 nvvp9dec: Fix return value
It should return GstFlowReturn value, not boolean

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3870>
2023-02-02 05:07:44 +09:00
Sebastian Dröge
b12c66042b aom: Include stream-format and alignment in the AV1 caps
The decoder does not work with arbitrary alignment and annexb stream
format and the encoder can give the information that it outputs
obu-stream/tu to downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3862>
2023-02-01 19:04:32 +00:00
Seungha Yang
09d29cca5a pluginloader-win32: Watch child process handle on connection
... so that parent can avoid waiting if child process got terminated
unexpectedly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3863>
2023-02-01 17:00:11 +00:00
Seungha Yang
464a8be3a4 pluginloader-win32: Check pipe state in child process
Retry if server is not ready for the connection

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3863>
2023-02-01 17:00:11 +00:00
Seungha Yang
0df7cd852c pluginloader-win32: Enhance debug log
Change log level to ERROR if it's unexpected, and print error reasons

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3863>
2023-02-01 17:00:10 +00:00
Seungha Yang
f314884b7d pluginloader-win32: Zero initialize overlapped struct before use
Helper child process might be spawned multiple times for some reason
then overlapped struct can hold garbage data. Always clear the struct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3863>
2023-02-01 17:00:10 +00:00
Olivier Crête
16158df5b2 wayland: Export the _get_type() functions
Add the macro before the declaration so the types are properly exported,
this makes it possible to do dynamic casting and checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3858>
2023-02-01 15:29:26 +00:00
James Hilliard
fc5159c2d8 Fix gstreamer-validate-1.0 dependency name
The gst-devtools project generates gstreamer-validate-1.0.pc, this
must match the dependency in gst-editing-services for detection
to work properly.

Fixes:
Run-time dependency gst-validate-1.0 found: NO (tried pkgconfig and cmake)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3859>
2023-02-01 14:15:45 +00:00
Matthew Waters
659c45ee7e qml6: implement qml6gloverlay
Based on the Qt5 version of qmlgloverlay.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3845>
2023-02-01 13:23:52 +00:00
Tim-Philipp Müller
aeb0fa9993 subprojects: Update libsrtp2 wrap to v2.5.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3860>
2023-02-01 10:34:35 +00:00
Guillaume Desmottes
3d1390d31a rtpptdemux: set different stream-id on each src pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3855>
2023-02-01 09:17:33 +00:00
Guillaume Desmottes
cc2b8f6ae8 rtpssrcdemux: set different stream-id on each src pad
All the RTP src pads were sharing the same stream-id while each actually
carry a different stream.

This was causing problem for example when funneling the streams together
and then trying to split them using 'streamiddemux'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3855>
2023-02-01 09:17:33 +00:00
Sebastian Dröge
3ca85189fd rtspsrc: Also consider "Method Not Valid In This State" error in broken control URL handling workaround
Some servers send a 455 error instead of any reasonable error when using
a correctly constructed control URL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3854>
2023-02-01 07:55:24 +00:00
Thibault Saunier
35e2ecd48b clocksync: Add "QoS" support
When ClockSync synchronizes the data stream on the clock, it should also
push `QoS` events if the user wants to do it as, as stated in [the QoS
design doc] "Elements that synchronize buffers on the pipeline clock
will usually measure the current QoS".

The logic has been replicated from `GstBaseSink`.

[the QoS design doc]: https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/qos.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2225>
2023-02-01 07:02:19 +00:00
Jordan Petridis
dfc6545741 meson: Use gtk tarball for the subproject wrap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3852>
2023-02-01 06:29:11 +00:00
Mengkejiergeli Ba
dfe16a5cf2 msdkallocator: Use const ptr of videoinfo in func param
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3621>
2023-02-01 04:31:23 +00:00
Benjamin Gaignard
16ad80179b codec2json: Add av12json element
This element convert AV1 frame header into human readable
json data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3734>
2023-01-30 19:46:55 +00:00
Benjamin Gaignard
fd588a50e4 codec2json: Add vp82json element
This element convert vp8 frame header into human readable
json data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3734>
2023-01-30 19:46:55 +00:00
Matthew Waters
b134433e0b examples/webrtc-sendrecv: add some dot file dumps on async-done and error messages
Just as a helpful thing if debugging is needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3823>
2023-01-30 05:22:59 +00:00
Tim-Philipp Müller
9a300fc501 validate-scenario: fix g-i warning in annotation
gst-validate-scenario.c:2485: Warning: GstValidate: missing ":" at column 28:

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3841>
2023-01-28 20:03:05 +00:00
Mathieu Duponchelle
4d240c27b7 BaseSrc: fix transfer annotation for fixate virtual method
The fixate virtual method has the same semantics as gst_caps_fixate(),
so the caps parameter must be marked as (transfer full).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3830>
2023-01-28 03:48:21 +00:00
Matthew Waters
293ad62035 qt6: add qml6glsrc element
Same functionality as qmlglsrc (Qt5) but for Qt6.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3737>
2023-01-28 02:24:09 +00:00
Thibault Saunier
fa23e24f41 validate: Fix gst_validate_execute_action annotation
The action passed in is transfer full

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3829>
2023-01-28 01:31:14 +00:00
Alicia Boya García
8a6023a38a qtdemux: Use safer clearing functions in dispose()
In theory, `dispose()` functions should be idempotent and should be
prepared not to crash or cause a double-free if an unref done from
inside caused a recursive call to `dispose()` of the same object.

https://developer.gnome.org/gobject/stable/howto-gobject-destruction.html

This patch modifies the `dispose()` method to honor these constraints.

Since the double `dispose()` call won't actually occur in qtdemux (there
is no cycle detection mechanism that could invoke it to work that way),
this is more of a code cleanup than a user-facing problem fix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3822>
2023-01-28 00:32:57 +00:00
Tim-Philipp Müller
4051581ed8 codecparsers: vp9parser: use single allocation for parser structs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3790>
2023-01-27 23:50:19 +00:00
Thibault Saunier
d1e3941a89 uritranscodebin: Fix unref of NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3831>
2023-01-27 21:58:43 +00:00
Seungha Yang
c6a6c56cdf win32ipc: Add support for zero-copy rendering
* Extend protocol so that client can notify of releasing shared memory
* Server will hold shared memory object until it's released by client
* Add allocator/buffer pool to reuse shared memory objects and buffers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3765>
2023-01-27 18:55:13 +00:00
Seungha Yang
c32b898cbb mpegpsdemux: Ignore DTS if PTS < DTS
It's possibly timestamp rollover case. But PTS < DTS is already
invalid case anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3657>
2023-01-27 17:48:32 +00:00
Georges Basile Stavracas Neto
a8a7ee6d83 glvideomixer: Add xalign and yalign properties
With the addition of the 'keep-aspect-ratio' sizing policy, content
that doesn't fit the target size is downscaled according to its own
aspect ratio to fit that target size, and centered.

Centering might not always be the desired behaviour, however;
consumers of this API might want to align the resulting picture to
the left or to the right.

To account for any of these cases, add two new properties to the
glvideomixer pad: xalign, and yalign. They operate on normalized
coordinates (0.0 for start, 1.0 for end), and default to 0.5 which
centers content.

<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3762>
2023-01-27 16:21:28 +00:00
Sebastian Dröge
c5d211d45a gldisplay: Mark gst_gl_display_create_context() other_context parameter as nullable
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/438

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3825>
2023-01-27 16:22:06 +02:00
Mathieu Duponchelle
c8298a2787 BaseSrc, PushSrc: add nullable annotations to virtual methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3806>
2023-01-26 22:35:31 +00:00
Daniel Knobe
5e9a32ed8c imagefreeze: add bayer support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3807>
2023-01-26 21:30:51 +00:00
Tim-Philipp Müller
beb4f4bff1 sdpdemux: add "media" property to allow audio-only or video-only streaming
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3531>
2023-01-26 16:17:21 +00:00
Tim-Philipp Müller
7f2a9d738a sdpdemux: add "rtcp-mode" property to disable RTCP
If we know there's only one stream we care about and we
don't have to synchronise audio and video, or send RRs,
we might just as well not hook up all the RTCP bits and
use fewer threads and sockets and simplify the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3531>
2023-01-26 16:17:21 +00:00
Seungha Yang
983d78daa5 wasapi2src: Fix loopback capture on Windows 10 Anniversary Update
... or older. Work around an OS bug that loopback capture
device doesn't notify event.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1738
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3782>
2023-01-26 13:31:20 +00:00
Víctor Manuel Jáquez Leal
6b04c8ee56 vulkan: imagebufferpool: Remove video meta handling.
Remove video meta handling since it's not used at all, also removed its usage in
vkvideofilter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3722>
2023-01-26 11:49:00 +00:00
Jan Alexander Steffens (heftig)
e3fa65abab aggregator: Warn about the right segment's format
We were checking the head segment here, not the current segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/611>
2023-01-26 10:39:08 +01:00
Jan Alexander Steffens (heftig)
08d4b0051a aggregator: Always lock aggpad around update_time_level
`aggpad->segment` is protected by the `aggpad`'s object lock. We need to
take the lock before calling `update_time_level`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/611>
2023-01-26 10:39:08 +01:00
Bart Van Severen
024ef7659d rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect 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.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3568>
2023-01-26 07:46:59 +00:00
Bart Van Severen
a62b07f3b4 sdp: gstmikey: gst_mikey_message_to_caps: extract salt and append to srtp-key
A KEMAC can hold both key and salt, so if salt is present, we should extract it
and append it to the srtp-key cap because libsrtp expects the srtp-key to hold
the concantenated srtp master key and salt.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3568>
2023-01-26 07:46:59 +00:00
Bart Van Severen
5678151799 sdp: gstmikey: gst_mikey_message_to_caps: extract ROC from first crypto session
We need the ROC to decrypt a SRTP stream as the ROC is part of the AES IV.
So look for first crypto session, from which we can get the ROC and find corresponding
crypto policy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3568>
2023-01-26 07:46:59 +00:00
Daniel Ulery
befab7af72 filesink: Adds rb+ file mode
Adds rb+ file mode to filesink so that files can be pre-allocated. This
can be use to keep reduce fragmentation over time with splitmuxsink.

Fixes  #955

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1532>
2023-01-26 07:05:21 +00:00
Víctor Manuel Jáquez Leal
d8cb9d2ce3 vulkan: physicaldevice: Dump 1.3 features and properties.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3721>
2023-01-26 03:19:58 +00:00
Víctor Manuel Jáquez Leal
e54d334526 vulkan: memory: Flush non coherent memory after write.
Spec 7.1.3:

If a memory object does not have the VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
property, then vkFlushMappedMemoryRanges must be called in order to guarantee
that writes to the memory object from the host are made available to the host
domain, where they can be further made available to the device domain via a
domain operation. Similarly, vkInvalidateMappedMemoryRanges must be called to
guarantee that writes which are available to the host domain are made visible to
host operations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3723>
2023-01-26 02:31:09 +00:00
Sebastian Dröge
aba0b0e90a gstreamer: Use stream-format=obu-stream alignment=tu in the caps
There is no byte-stream/au format for AV1 but only for H264, and the
encoder actually outputs obu-stream/tu instead of the annexb
stream-format that is similar to H264 byte-stream format.

Without this the encoder can't be used with elements that require a
specific AV1 stream-format, e.g. the MP4 or Matroska/WebM muxer.
2023-01-26 01:46:46 +00:00
Seungha Yang
621feb32e9 gst-plugin-scanner: Add support for Windows
Adding Win32 specific plugin loader implementation.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3512>
2023-01-25 18:24:28 +00:00
U. Artie Eoff
d071ea714d vp9parser: remove checks for g_new0 result
The g_new0 aborts the process if it fails.  Thus,
there is no need to check if the g_new0 call succeeded.

This should silence a resource leak warning by static
scan.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3788>
2023-01-25 17:36:54 +00:00
Nirbheek Chauhan
32e8ff4e2a webrtc_sendrecv.py: Fix PEP8 warnings in CI lint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3742>
2023-01-25 16:53:17 +00:00
Nirbheek Chauhan
6a83602601 webrtc_sendrecv.py: Handle LATENCY messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3742>
2023-01-25 16:53:17 +00:00
Nirbheek Chauhan
5500c228f6 webrtc_sendrecv.py: Add bus message handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3742>
2023-01-25 16:53:17 +00:00
Nirbheek Chauhan
9b2404e76d webrtc_sendrecv.py: Add support for using H264 encoding
Currently only works when we are creating the offer or the offer only
contains H264.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3742>
2023-01-25 16:53:17 +00:00
Nirbheek Chauhan
6f99faa080 webrtc_sendrecv.py: Use sine wave for audio instead of red-noise
Makes it easier to notice when there's packet loss or other audio
distortion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3742>
2023-01-25 16:53:17 +00:00
Pawel Stawicki
492d2b6498 v4l2h264dec: Fix Raspberry Pi4 will not play video in application
Ensure object v4l2object->pool will be released by
correctly releasing the temporary thread-safety lock

Fixes issue #1729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3786>
2023-01-25 16:07:50 +00:00
Georges Basile Stavracas Neto
56513a18cb glvideomixer: Add 'sizing-policy' pad property
The sizing policy allows selecting between the current behavior,
which deforms the texture to fill the width and height of the
pad; and a new 'keep-aspect-ratio' sizing policy, which fits the
texture within the rectangle respecting its original aspect ratio.

The reason for this is that this allows avoiding extra elements
in the pipeline, and reduces the number of buffer passing through
the pipeline.

Most of this code is a direct port of the sizing policy handling
of the compositor element, except it is adapted to operate on GL
texture coordinates through the projection matrix.

<https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3760>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3760>
2023-01-25 15:16:31 +00:00
Sebastian Dröge
bfaa02ab56 gst: Fix gst_type_find_peek() return value annotation
It's not possible to annotate a in-parameter for a return value array as
the array length. Both are assumed to have the same direction and the
current annotation causes the size parameter to be considered an out
parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3787>
2023-01-25 13:16:44 +00:00
Sebastian Dröge
0378bd3fed sdp: Fix gst_mikey_payload_key_data_set_interval() array length annotation
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1744

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3787>
2023-01-25 13:16:44 +00:00
Nirbheek Chauhan
f1570b26a6 Add a wrap for the latest gtk4
This is the oldest tag that contains meson fixes needed to be able to
build gtk as a subproject on macOS and Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
2023-01-25 11:38:52 +00:00
Nirbheek Chauhan
947c464830 libxml2.wrap: update to latest version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
2023-01-25 11:38:52 +00:00
Nirbheek Chauhan
cc3078d819 meson: Add a wrap file for libsrt2p
And allow fallback to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
2023-01-25 11:38:52 +00:00
Nirbheek Chauhan
8e8d8206f1 meson: Add build_rpath for qt5 plugin on macOS
Without this, the plugin cannot be loaded in a devenv because the
RPATH is not added to the plugin dylib. This RPATH will be stripped on
install, which is what we want.

When deploying apps, people are supposed to use `macdeployqt` to
create an AppBundle that bundles Qt for you and sets the RPATHs
correctly to point to that bundled Qt.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3708>
2023-01-25 11:38:52 +00:00
Nirbheek Chauhan
eff9455ada nvcodec: Log readable errors when initializing CUDA
It is really difficult for people to figure out why nvcodec has
0 features. Even the debug log is cryptic. Also make sure the errors
go to the ERROR log level, which is more likely to be enabled by
default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3776>
2023-01-25 10:08:10 +00:00
Nirbheek Chauhan
43ae6b421b nvcodec: Fix reporting of CuDeviceGetCount error
cuda_ret is was always going to be CUDA_SUCCESS in the error log.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3776>
2023-01-25 10:08:10 +00:00
Mathieu Duponchelle
2048a0a4d9 redenc: fix setting of extension ID for twcc
1 was previously hardcoded in, and the bug went under the radar because
webrtcsink hardcodes the number too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3785>
2023-01-24 22:52:48 +00:00
Tim-Philipp Müller
1c7003f95f gstreamer-vaapi: drop use of GSlice allocator
Some code incorrectly relied on GstVideoDecoder/Encoder base
class implementation details.

Follow-up to !3695.

Fixes #1742.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3783>
2023-01-24 22:30:10 +00:00
Sebastian Dröge
20d394cb21 appsrc: Don't chain up BaseSrc::negotiate()
If we have caps then we can only set exactly those caps, if we have no
caps yet then negotiating anything is not very meaningful because the
caps are defined by the application and not downstream.

Avoids, among other things, an unnecessary allocation query and spurious
useless caps being set before the first buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3757>
2023-01-24 21:44:51 +00:00
Seungha Yang
2e574a80d9 d3d11: Don't use g_alloca()
_alloca CRT function is deprecated. Moreover, stack allocation
for string is not a good idea. We can use _malloca inline
function instead, but all use of _alloca in d3d11 library/plugin
are not performance critical path at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3652>
2023-01-24 20:27:43 +00:00
Edward Hervey
21cad29bcd multiqueue: Handle use-interleave latency live pipelines
Due to the dynamic nature of multiqueue, when `use-interleave` is used we can't
report a maximum tolerated latency (when queried) since it is calculated
dynamically.

When in such live pipelines, we need to make sure multiqueue can handle the
lowest global latency (provided by this event). Failure to do that would
result in not providing enough buffering for a realtime pipeline.

Fixes #1732

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3772>
2023-01-24 19:42:49 +00:00
Sebastian Dröge
e9fa844b27 gst-plugins-rs: Track main branch again
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3781>
2023-01-24 19:08:50 +00:00
Thibault Saunier
77b6f58074 encodebin: Add timestamper elements when available
Timestamper elements are made to ensure stream timestamp are clean and
ready to be used by muxers, we should make use of them to cleanup
streams before muxing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3779>
2023-01-24 16:31:40 +00:00
Thibault Saunier
30c73f09e3 timestamper: Classify as Timestamper and make them RANK_MARGINAL
This way those elements can be autoplugged when needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3779>
2023-01-24 16:31:40 +00:00
Thibault Saunier
095a5ba425 factory: Add "Timestamper" as new factory type
This will be used by elements that correct timestamps (like the
h264timestamper for example)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3779>
2023-01-24 16:31:40 +00:00
Tim-Philipp Müller
4c4245d6a8 jpegformat: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
b424fa6a6e rist: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
80e882d266 netsim: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
20e6735d20 mpegpsmux: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
2b4b23d2a2 mpegtsdemux: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
85eb323b08 mpegtsmux: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
3bd495f093 jp2kdecimator: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
3d9f3bfd66 rtmp2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
71890cc2f1 mxf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
8f252b1e99 dvbsuboverlay: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
82cd540d08 svthevcenc: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
93fc68c5ba x265: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
bfc2fab9ea wpe: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
664d83de99 ttml: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
c095a1d620 srtp: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
4994c730c8 resindvd: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
d1fe992f1f kate: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
c1759353c1 openjpeg: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
e214be79de libs: va: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
32384c0c69 libs: codecparsers: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
e6da8deb8e libs: insertbin: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
92f0f48472 libs: mpegts: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
756a8986d0 good: tests: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
f6950b4537 v4l2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:07 +00:00
Tim-Philipp Müller
74e103e53f xingmux: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
fc82621e09 multiudpsink: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
8222b97331 rtpmanager: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
e66f8cff26 rtp: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
56d3beed0b multifile: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
e256472ca6 matroska: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
172c6ca1dc flv: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
9f4c514c52 dtmf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
2a3513ef6c vpx: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
9ab2541266 gdkpixbuf: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
1df462ec5b pulseaudio: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
9a235838c8 adaptivedemux2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
dfad48704c mpeg2dec: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
cb64cdae95 x264enc: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
13f3feed04 libs: gl: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
d56648ccdb libs: video: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
df83590008 tag: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
58722ba48e libs: sdp: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
8bf59703a1 libs: pbutils: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
506c65aa27 libs: audio: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
11b47c4e29 fdmemory: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
7657b8cb51 tests: rtp: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
fd43b3d604 ximage, xvimage: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
8d7eb2eb4f typefindfunctions: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
0feb2770e6 encodebin: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
165fdac5c6 playback: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
a9c5a52b25 oggdemux: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
45aac1e938 base: bitwriter: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
3dd12cb640 inputselector: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
78a941e873 multiqueue: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
fa55d8302b queue2: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
ed78e55bc7 tracers: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
78149326c9 libs: base: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
1919030363 baseparse: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
ba6d952cd5 gstcheck: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
bda6287075 controller: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
c1baa37f74 tracerutils: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
3261daa623 taskpool: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
eeced74fce segment: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
19a6468a53 sample: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
f343d01f10 query: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Tim-Philipp Müller
e190ff16cc iterator: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
6a0be7ea56 event: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
dcc8830bb2 info: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
2f88c68659 devicemonitor: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
15c1b9ad45 datetime: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
384c4f1bef clockentry: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
1c8bb3f8db context: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
267adee5b7 uri: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
755f214a52 meta: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
9dd70085f1 message: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
976861a07a gstvalue: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
76c8a619f9 caps, capsfeatures: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
7d58554f4c bus, poll: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
5a2d643f9b bin: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
aef5456140 taglist, tagsetter: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
7d1675e42e toc, tocsetter: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
25f7fa1efc allocator, buffer, bufferlist: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
9e71898337 registrychunks: get rid of internal GST_REGISTRY_CHUNK_FLAG_MALLOC
Not actually needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
ade83c8355 registry: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
e675519a2c gstparse: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
28dc56dc6c core: examples: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
d5d25c0f7a core: tests: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Tim-Philipp Müller
6bdef53683 tools: gst-stats: drop use of GSlice allocator
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/291

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:05 +00:00
Alicia Boya García
2c2767b94a Use automatic pad activation in elements that can take advantage of it
Pads are activated automatically when they are added if the element
state is >=PAUSED, so it's not necessary to activate them manually
anymore.

This patch removes manual pad activation from gstaggregator, gstconcat,
gstfunnel, and gstinputselector.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3636>
2023-01-24 14:42:35 +00:00
Sebastian Dröge
13fc49770e avvidenc: Don't take ffmpeg timestamps verbatim but only use them to calculate DTS
The ffmpeg timestamps are inaccurate and only in framerate granularity.
To avoid generating inaccurate output timestamps, especially with
variable framerate streams, only use the ffmpeg timestamps for
calculating the DTS.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1544
again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3780>
2023-01-24 13:50:11 +00:00
Sebastian Dröge
5372b77987 Revert "avvidenc: Set timebase in the ffmpeg context to nanoseconds and set framerate"
This reverts commit 50db59449e.

This broke the MPEG-1 video encoder as it requires the framerate to be
used for the timebase.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3780>
2023-01-24 13:50:11 +00:00
Jan Alexander Steffens (heftig)
12bc5b7a62 vaapi: Skip plugin pc file for shared plugins
Following similar logic in the other subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3778>
2023-01-24 13:17:45 +00:00
David Svensson Fors
d0edc1ad6a udpsrc: GstSocketTimestampMessage only for SCM_TIMESTAMPNS
Deserialize socket control messages as GstSocketTimestampMessage only
if (level, type) is (SOL_SOCKET, SCM_TIMESTAMPNS).

Without this patch, messages with types SCM_RIGHTS or SCM_CREDENTIALS
could be deserialized as GstSocketTimestampMessage instead of
GUnixFDMessage or GUnixCredentialsMessage from gio.

Fixes #1736

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3777>
2023-01-24 10:49:01 +01:00
Hiero32
145d362129 taginject: Add scope property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3697>
2023-01-24 00:20:53 +00:00
Tim-Philipp Müller
41c69372b5 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3775>
2023-01-23 23:04:53 +00:00
Tim-Philipp Müller
f13c65d977 Release 1.22.0 2023-01-23 19:41:07 +00:00
Tim-Philipp Müller
6671a24e36 gst-plugins-ugly: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Tim-Philipp Müller
2fe212bdbe gst-plugins-bad: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Tim-Philipp Müller
060712f68f gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Tim-Philipp Müller
8227b04429 gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Tim-Philipp Müller
478c6159eb gstreamer: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3773>
2023-01-23 16:31:20 +00:00
Seungha Yang
467a2408a1 d3d11compositor: Workaround blending artifacts on Intel platform
Disable vendor implemented converter in d3d11compositor to workaround
artifacts

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3770>
2023-01-23 23:34:04 +09:00
Ruben Gonzalez
2cdfccc3b5 glvideomixer: Fixing error with mouse navigation events when no pixel-aspect-ratio
Handling mouse navigation events in glvideomixer element, if no
pixel-aspect-ratio info in the caps, an assertion error is produced
inside gst_util_fraction_multiply because default denominator is zero.

Error fixed:
```
(gst-launch-1.0:102654): GStreamer-CRITICAL **: 00:47:51.598: gst_util_fraction_multiply: assertion 'b_d != 0' failed
```

Simple pipeline to reproduce the issue:
```
gst-launch-1.0 -v glvideomixer name=mix ! glimagesinkelement  gltestsrc  ! mix.sink_0
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3766>
2023-01-22 00:52:56 +01:00
Edward Hervey
4c1d01ff57 playback: New playback elements are no longer experimental
The API is not expected to change and it has been used extensively since 1.18.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3761>
2023-01-21 12:28:21 +00:00
Sebastian Dröge
4e86c77270 examples: webrtc: rust: Update dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
f45136827b examples: webrtc: multiparty-sendrecv: rust: Remove unnecessary macro recursion limit annotation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
bf4a3c89cd examples: webrtc: sendrecv: rust: Implement OFFER_REQUEST handling
Allow requesting an offer from the peer if we're joining a call with a
peer, and allow the peer to request an offer from us if waiting for an
incoming call.

This implements all 4 variants the protocol allows for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
638465908e examples: webrtc: sendrecv: rust: Allow providing our ID via the commandline
Otherwise it continues to use a random ID as before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
541c637910 examples: webrtc: sendrecv: rust: Implement TWCC support in both directions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
6541dccaea examples: webrtc: rust: Set keyframe-max-dist=2000 and picture-id-mode=15-bit for VP8 and perfect-timestamps=true for audio
This makes it in sync with the C sendrecv and generally behaves better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Sebastian Dröge
083b9f2a6e examples: webrtc: sendrecv: rust: Use the correct payload types if the remote is the offerer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3758>
2023-01-20 11:36:57 +00:00
Jonas Danielsson
8eeaeab6af wpe: Add 'run-javascript' action signal
Introduce way of running a script in the context of the internal
webView.

Fixes #1722

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3753>
2023-01-20 10:58:31 +00:00
Edward Hervey
e2773304a2 decodebin3: Remove failing stream from selection
If no decoder is present for a given stream, remove it from the requested
selection.

Fixes #1581 and #1662

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3754>
2023-01-20 08:54:00 +00:00
Edward Hervey
34ea792881 decodebin3: Don't intercept queries if no parsebin present
If we don't use a parsebin, we forward the queries as-is from upstream. There is
no reconfiguration possible within identity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3754>
2023-01-20 08:54:00 +00:00
Edward Hervey
1a30ed8113 decodebin3: Don't insert parsebin if input is already parsed
This is a temporary workaround until we find a generic solution to indicate that
a stream has already been "parsed".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3754>
2023-01-20 08:54:00 +00:00
Seungha Yang
f983ec50b5 win32ipcvideosrc: Fix leak in fallback copy path
Clear shared memory after use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3751>
2023-01-19 17:40:59 +00:00
Edward Hervey
b01ed725be va: Fix path leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3755>
2023-01-19 16:41:44 +01:00
Sebastian Dröge
6a210b53e3 gst: Mark caps parameters in ALLOCATION query API as nullable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3752>
2023-01-19 16:01:21 +02:00
Guillaume Desmottes
2930fed373 gst-play: add --no-position
It can be useful to reduce or remove the clutter in logs due to those
queries when debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3698>
2023-01-19 11:41:20 +00:00
Sebastian Dröge
067b5d92b4 matroska: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in Matroska/WebM.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740>
2023-01-19 12:10:40 +02:00
Sebastian Dröge
4c8141a0c3 isomp4: Add stream-format = (string) obu-stream to AV1 caps
Anything else is not allowed in MP4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740>
2023-01-19 12:10:40 +02:00
Sebastian Dröge
ac1d10f80c gst-examples: Update Rust dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3750>
2023-01-19 10:40:32 +02:00
Nicolas Dufresne
8a6d9748b6 gleglimage: Fix GL_OES_EGL_image_external name in debug trace
There is a debug log when this extension is missing, but it was
reporting the wrong extension name, which was confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3748>
2023-01-18 22:47:42 +00:00
Jan Alexander Steffens (heftig)
b0e55caf0d input-selector: Take the object lock while iterating sinkpads
Otherwise we can race with pad removal and crash from use-after-free.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1717
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3745>
2023-01-18 16:21:12 +00:00
Michiel Konstapel
81b726344e glvideomixer: don't clear pad->geometry_change when setting an identical value
Closes #1715

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3733>
2023-01-18 14:05:37 +00:00
Tim-Philipp Müller
59f4ebe321 gst-docs: include dmabuf and gapless playback design docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3744>
2023-01-18 13:48:14 +00:00
Tim-Philipp Müller
64c4bfdf7e uridecodebin3: clear subitem if suburi is set to NULL
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1649

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3730>
2023-01-18 11:43:31 +00:00
Jan Alexander Steffens (heftig)
211191564e qtdemux: Add basic support for AVC-Intra video
AVC-Intra is a range of H.264-compliant intra-only codecs from
Panasonic. The codes and descriptions have been taken from VLC.

The (encumbered) sample I have here produces byte-stream H.264,
including SPS and PPS and no `avcC` box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3739>
2023-01-18 10:01:30 +00:00
Nirbheek Chauhan
ed1bdf9b1a gl: Fix crash in cocoa due to race in gst_gl_context_activate()
We create a new context in `gst_gl_context_create_thread()` and then
activate it on the current thread. Thereafter we assume that the
current thread continues to be the active thread for that context and
call `gst_gl_context_fill_info()` which asserts that the current
thread is the active thread.

However, if at the same time a different thread calls
`send_message_async()`, it will call into
`gst_gl_window_cocoa_send_message_async()` which will schedule the
message to be invoked using GCD. That anonymous function will also
call `gst_gl_context_activate()`, which creates a race, which can lead
to:

```
gst_gl_context_fill_info: assertion 'context->priv->active_thread == g_thread_self ()' failed
```

Fix it by using `gst_gl_context_thread_add()` to invoke `fill_info()`
on the context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3732>
2023-01-17 21:56:41 +00:00
Thibault Saunier
18f313d317 ges: smart-mixer: Avoid video freeze on NLE stack changes
Since we support "nested compositors"[0] we were not finalizing the pads_infos
and thus not releasing the mixer pad on stack change, meaning that
the following stacks were never prerolling.

[0] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2094

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>
2023-01-17 20:10:19 +00:00
Thibault Saunier
3065608730 ges: Fix issues avoiding to use operator when unavailable on mixer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>
2023-01-17 20:10:19 +00:00
Sebastian Dröge
086c8da446 gl/cocoa: Store a weak reference to the GstGLWindow instead of the GstGLContext
We can't rely on the `GstGLContext` to stay alive and need to keep track
of it. For that we keep track of the `GstGLWindow` in a weak reference
to avoid a reference cycle, and get the corresponding `GstGLContext`
whenever needed.

With contributions from Nirbheek Chauhan.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3729>
2023-01-17 22:35:29 +05:30
Tim-Philipp Müller
a9ec35b1ca Release 1.21.90 2023-01-13 19:08:48 +00:00
Sebastian Dröge
79e8d2c03e avvidenc: Offset PTS to zero to fix bitrate control
Otherwise ffmpeg's rate control algorithm will not work correctly as
it is based on the absolute PTS values.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-libav/-/issues/91

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3718>
2023-01-13 17:18:38 +00:00
Edward Hervey
13ad8c8e4e urisourcebin: Cleanup on failure
This ensures there is a source present/valid *ONLY* in PAUSED and above.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3720>
2023-01-13 16:41:53 +01:00
Edward Hervey
1546ab0d0f urisourcebin: Unset locked state
Some elements still had it in failure cases

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3720>
2023-01-13 16:41:53 +01:00
Edward Hervey
f444e62672 uridecodebin3: Handle state synchronization failures
Properly reset and remove the failing urisourcebin if we failed bringing them up
to the same state as ourselves.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3720>
2023-01-13 16:41:53 +01:00
Olivier Crête
c593930055 rtopuspay: Use GstStaticCaps to cache parsed caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête
46a6f72f03 rtopuspay: Ignore the stereo parameter in multiopus caps
Also add unit tests for the various variants

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête
f1cf457811 rtpopuspay: Leave original caps as-is
This should make it work if someone specifies stereo with MULTIOPUS
somehow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête
c52c66b575 rtpopuspay: Return upstream channel filter based on OPUS vs MULTICAPS
Only allow 1 or 2 channels if the caps are OPUS, or 3+ if they are
MULTIOPUS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Olivier Crête
c51ae6112d rtpopus: Put MULTIOPUS in all caps
The RTP payload encoding-name are always in caps in GStreamer.
In SDP, they are not case-sensitive, but since caps are, we need to pick
a caps, and we picked upper-case along time ago.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
2023-01-12 18:48:35 -05:00
Sebastian Dröge
085e6c036a android: Update minimum SDK version to Android 21
Otherwise we can't bump the minimum version of the cerbero build without
it breaking linking of the applications.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3717>
2023-01-12 20:11:14 +00:00
Sebastian Dröge
80e364876b gstreamer: Fix code style by running clang-format 2023-01-12 21:38:51 +02:00
Sebastian Dröge
7652026f0d gstreamer: Don't leak all video frames 2023-01-12 21:38:51 +02:00
Seungha Yang
434337c3e1 d3d11memory: Fix potential crash in GstD3D11PoolAllocator
Allocator object can be the final refcount holder, when a GstD3D11Memory
is being released. Do unref allocator once there's no more
remaining operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3715>
2023-01-12 19:26:41 +00:00
Seungha Yang
fdc3ee97ae d3d11memory: Remove GstD3D11PoolAllocator::dispose
Clear GstD3D11Device object in finalize method as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3715>
2023-01-12 19:26:41 +00:00
Thibault Saunier
d8ba721d82 glbasefilter: Copy metas when they only contain they "video" tag
Same logic as in `GstVideoFilter`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3716>
2023-01-12 14:41:24 -03:00
Sebastian Dröge
ff911c76c0 gstreamer: Don't explicitly drop frames on stop()
This is already handled by the base class.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
f56e8b2fad gstreamer: Remove unused variable 2023-01-12 01:06:38 +00:00
Sebastian Dröge
040c92d8b0 gstreamer: Stop outputting frames if pushing one has caused an error 2023-01-12 01:06:38 +00:00
Sebastian Dröge
5f03d9c4d1 gstreamer: Don't set bogus LIVE flag on output buffers 2023-01-12 01:06:38 +00:00
Sebastian Dröge
85b9c8e103 gstreamer: Allocate output buffers via the encoder
This makes sure the correct allocator and configuration is used.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
30e0c1e4fd gstreamer: Negotiate the encoder immediately after setting the format 2023-01-12 01:06:38 +00:00
Sebastian Dröge
d9efa54783 gstreamer: Fix output state reference leak 2023-01-12 01:06:38 +00:00
Sebastian Dröge
b498bdb765 gstreamer: Add missing property setter/getter for lookahead property 2023-01-12 01:06:38 +00:00
Sebastian Dröge
13fa6d387d gstreamer: Fix reference leak of the input state if the caps are changing
Also remove misleading comment: reconfiguration was already handled by
the following code.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
9128978042 gstreamer: The encoder has no maximum latency
It will buffer as much as it needs to.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
785ba05bca gstreamer: Announce support for video meta on the input side
This allows handling input buffers with non-default strides, which was
already handled fine by the element code.

Without this, potentially expensive conversion was needed.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
c5b166491c gstreamer: Don't override various virtual methods unnecessarily
There was no custom behaviour in there.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
158c1f6602 gstreamer: Don't unnecessarily override decide_allocation()
This avoids more optimal output buffer allocation.
2023-01-12 01:06:38 +00:00
Sebastian Dröge
3b3e862580 gstreamer: Don't set a DTS and remove non-working DTS hack
The previous hack would create bogus DTS that confused other elements.

Fixes https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/1915
2023-01-12 01:06:38 +00:00
Sebastian Dröge
a8c6eb0606 gstreamer: Don't use private data but simply always get the oldest frame
The private data is not copied over for SVT AV1 encoder so this code
path would've never worked.

Instead of relying on the PTS, which is not required to be unique or
existing at all, we always take the oldest frame as AV1 has no frame
reordering / B frames.
2023-01-12 01:06:38 +00:00
Edward Hervey
1fe99ebae1 decodebin3: Fix global group-id handling
The goal of the "global" group-id is to fix new inputs that do not come from the
same "source" as others. In order to ensure all "current" streams have the same
group-id we distribute the first valid group-id to all streams.

This commit fixes two issues with that:

* When inputs are unlinked they weren't always properly resetted (it would only
  work if parsebin is used, which is no longer the default in
  uridecodebin3/playbin3).

* When computing the global group-id, take into account unset
  group-id (i.e. GST_GROUP_ID_INVALID).

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3712>
2023-01-11 23:29:05 +00:00
Tim-Philipp Müller
4f0abc32e7 gst-plugins-ugly: update translations
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1575

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3711>
2023-01-11 19:20:17 +00:00
Tim-Philipp Müller
a55bda139a gst-plugins-bad: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3711>
2023-01-11 19:20:17 +00:00
Tim-Philipp Müller
146575fa61 gst-plugins-good: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3711>
2023-01-11 19:20:17 +00:00