platform/upstream/gstreamer.git
18 months agoUpdate ChangeLogs for 1.21.2
Tim-Philipp Müller [Mon, 7 Nov 2022 23:53:57 +0000 (23:53 +0000)]
Update ChangeLogs for 1.21.2

18 months agohotdoc: gst-hotdoc-plugins-scanner is not needed for libraries
Xavier Claessens [Mon, 7 Nov 2022 14:27:09 +0000 (09:27 -0500)]
hotdoc: gst-hotdoc-plugins-scanner is not needed for libraries

Meson >= 0.64.0 does not allow any more to add executables into
hotdoc.generate_doc(..., dependencies: ...) and it should not be needed
any way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3352>

18 months agosrt: Add a property to disable automatic reconnect
Jan Alexander Steffens (heftig) [Tue, 8 Dec 2020 15:55:26 +0000 (16:55 +0100)]
srt: Add a property to disable automatic reconnect

This adds a new boolean property `auto-reconnect`, defaulting to `true`.

Setting it to `false` makes the elements (in caller mode) immediately
report an error to the application instead of trying to reconnect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3326>

18 months agodiscoverer: Annotate `DiscovererInfo::get_audio_streams()` and others with the concre...
Sebastian Dröge [Mon, 7 Nov 2022 18:31:25 +0000 (20:31 +0200)]
discoverer: Annotate `DiscovererInfo::get_audio_streams()` and others with the concrete stream info type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3353>

18 months agovabasetransform: Fail if cannot import the input buffer.
Víctor Manuel Jáquez Leal [Wed, 26 Oct 2022 16:04:17 +0000 (18:04 +0200)]
vabasetransform: Fail if cannot import the input buffer.

Otherwise got a buffer double free.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3348>

18 months agomfvideosrc: Add support for DirectShow capture filter
Seungha Yang [Sat, 5 Nov 2022 16:53:46 +0000 (01:53 +0900)]
mfvideosrc: Add support for DirectShow capture filter

Adding DirecShow video capture filter mode, in addition
to existing MediaFoundation and WinRT(UWP) mode, to support
DirectShow only filters (not KS driver compatible)
such as custom virtual camera filters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3350>

18 months agotests: gstinfo: Test set_threshold_from_string's new reset behavior
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 14:01:08 +0000 (16:01 +0200)]
tests: gstinfo: Test set_threshold_from_string's new reset behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

18 months agotests: gstinfo: Make logging tests pass when GST_DEBUG is set
Jan Alexander Steffens (heftig) [Sat, 22 Aug 2020 21:42:40 +0000 (23:42 +0200)]
tests: gstinfo: Make logging tests pass when GST_DEBUG is set

Use gst_debug_set_threshold_from_string's new reset behavior to undo
GST_DEBUG and ensure the logging tests have a known configuration.

`gst_debug_set_threshold_from_string ("LOG", TRUE)` has the same effect
as `gst_debug_set_threshold_from_string ("", TRUE)` followed by
`gst_debug_set_default_threshold (GST_LEVEL_LOG)`.

Don't bother remembering the default log level set when the test
started. It will get reset by the next test, anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

18 months agoinfo: Reset patterns with set_threshold_from_string
Jan Alexander Steffens (heftig) [Sat, 22 Aug 2020 20:41:15 +0000 (22:41 +0200)]
info: Reset patterns with set_threshold_from_string

TLDR: Make `gst_set_threshold_from_string ("", TRUE)` reset *all*
threshold settings, including those set by previous invocations of
`gst_debug_set_threshold_from_string`.

The docs say:

    @reset: %TRUE to clear all previously-set debug levels before setting
        new thresholds

What actually happens is it sets the default threshold to `ERROR`,
leaves the patterns in place and calls
`gst_debug_category_reset_threshold` on each category.

In effect, any category that is matched by a pattern gets reset to that
threshold if the app changed it by directly invoking
`gst_debug_category_set_threshold`. All other categories are reset to
`ERROR`.

In my opinion this parameter currently has little value, as the same
effect can be achieved by including `ERROR` (without a pattern) in the
string, as in `"foo*:WARNING,*bar:INFO,ERROR"`.

What I actually expect it to do is reset *all* threshold settings,
including those set by previous invocations of
`gst_debug_set_threshold_from_string`, starting off with a clean slate
for the patterns provided with the call.

Otherwise there is no API to do this, besides:

  - Painfully removing patterns one-by-one via
    `gst_debug_unset_threshold_for_name` *if* you know what the patterns
    are.
  - Adding a `*:FOO` pattern to affect all categories, which makes the
    default threshold useless and practically leaks all the old
    patterns.

In my opinion this also makes it fit better into the layers of threshold
config, which is:

1. Temporary:
  - `gst_debug_category_set_threshold`
  - `gst_debug_category_reset_threshold`
2. Patterns:
  - `gst_debug_set_threshold_for_name`
  - `gst_debug_unset_threshold_for_name`
  - `gst_debug_set_threshold_from_string`
  - `GST_DEBUG`
3. Default:
  - `gst_debug_set_default_threshold`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

18 months agortmp2: Improve error messages
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:23:41 +0000 (16:23 +0100)]
rtmp2: Improve error messages

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/connection: Pass triggering GError in 'error' signal
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:04:24 +0000 (16:04 +0100)]
rtmp2/connection: Pass triggering GError in 'error' signal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/connection: Pass triggering GError to _emit_error
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:02:53 +0000 (16:02 +0100)]
rtmp2/connection: Pass triggering GError to _emit_error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/connection: Discern reasons for cancelling all commands
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:01:10 +0000 (16:01 +0100)]
rtmp2/connection: Discern reasons for cancelling all commands

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/connection: Handle EOF like error
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:53:13 +0000 (15:53 +0100)]
rtmp2/connection: Handle EOF like error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/client: Make sure 'salt' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:49:22 +0000 (15:49 +0100)]
rtmp2/client: Make sure 'salt' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/client: Make sure 'reason' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:46:42 +0000 (15:46 +0100)]
rtmp2/client: Make sure 'reason' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/client: Make sure 'desc' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:13:42 +0000 (16:13 +0100)]
rtmp2/client: Make sure 'desc' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agortmp2/client: Make sure 'code' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:11:31 +0000 (16:11 +0100)]
rtmp2/client: Make sure 'code' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

18 months agowebrtcbin: Don't duplicate enum string values
Edward Hervey [Mon, 7 Nov 2022 06:45:53 +0000 (07:45 +0100)]
webrtcbin: Don't duplicate enum string values

Some were leaked when debugging was enabled. Instead just directly use the
static strings as-is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3347>

18 months agogstpad: Avoid race in (un)setting EOS flag on sinkpads
Edward Hervey [Wed, 21 Sep 2022 08:05:05 +0000 (10:05 +0200)]
gstpad: Avoid race in (un)setting EOS flag on sinkpads

The scenario is the following:

* Thread 1 is pushing an EOS event on a sinkpad
* Thread 2 is pushing a STREAM_START event on the same sinkpad before Thread 1
returns. Note : It starts pushing the event after Thread 1 took the object lock.

There is a potential race between:

* The moment Thread 1 sets the EOS flag once it has finished sending the
event (via store_sticky_event). When it does that it has both the STREAM and
OBJECT lock

* The moment Thread 2 sends the STREAM_START event (Which should release that
EOS status), but removing the EOS flag is only done while holding the OBJECT
lock and not the STREAM_LOCK, which means it could be re-set by Thread 1 before
it then checks again the EOS flag (without the STREAM lock taken).

The EOS flag unsetting by STREAM_START should be done with the STREAM lock
taken, otherwise it will be racy.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3320>

18 months agovideocodectestsink: Add YUV422 support
Nicolas Dufresne [Fri, 4 Nov 2022 18:24:58 +0000 (14:24 -0400)]
videocodectestsink: Add YUV422 support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>

18 months agogst-inspect: print doc urls for Rust plugins
Tim-Philipp Müller [Sun, 6 Nov 2022 18:10:44 +0000 (18:10 +0000)]
gst-inspect: print doc urls for Rust plugins

We have documentation for them now after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3346>

18 months agoqtdemux: use unsigned int types to store result of QT_UINT32
Justin Chadwell [Wed, 2 Sep 2020 09:49:40 +0000 (10:49 +0100)]
qtdemux: use unsigned int types to store result of QT_UINT32

In a few cases throughout qtdemux, the results of QT_UINT32 were being
stored in a signed integer, which could cause subtle bugs in the case of
an integer overflow, even allowing the the result to equal a negative
number!

This patch prevents this by simply storing the results of this function
call properly in an unsigned integer type. Additionally, we fix up the
length checking with stsd parsing to prevent cases of child atoms
exceeding their parent atom sizes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3344>

18 months agod3d11videosink: Always clear back buffer on resize
Seungha Yang [Sat, 5 Nov 2022 12:35:08 +0000 (21:35 +0900)]
d3d11videosink: Always clear back buffer on resize

Swapchain may not need to be resized if the size of backbuffer
is equal to the previous size. Then previously rendered frame will be stay
on the screen. Do clear back buffer whenever resize() is called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3341>

18 months agosubparse: Fix non-closed tag handling.
Edward Hervey [Sat, 5 Nov 2022 06:34:27 +0000 (07:34 +0100)]
subparse: Fix non-closed tag handling.

Unclear what the goal was, but we could end up reading way past the next_tag.

Instead just move everything from after the end tag ('>') to the next_tag.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53040

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3340>

18 months agoavutils: Add missing space in doc
Nicolas Dufresne [Fri, 4 Nov 2022 18:17:39 +0000 (14:17 -0400)]
avutils: Add missing space in doc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>

18 months agoavviddec: Initialize std_compliance to default
Nicolas Dufresne [Fri, 4 Nov 2022 18:15:34 +0000 (14:15 -0400)]
avviddec: Initialize std_compliance to default

This was missed in the initial patch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>

18 months agoqsv: Fix encoding error when input memory belongs to other GPU
Seungha Yang [Fri, 4 Nov 2022 15:00:43 +0000 (00:00 +0900)]
qsv: Fix encoding error when input memory belongs to other GPU

Copy frame if VA display of input buffer is different from that
of encoder, like we've been doing on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3335>

18 months agoidentity: fix "handoff" signal docs
Tim-Philipp Müller [Sat, 5 Nov 2022 00:06:25 +0000 (00:06 +0000)]
identity: fix "handoff" signal docs

The docs list an extra pad argument, which doesn't
match the actual signal function signature. Probably
a copy'n'paste mistake when copying things from fakesink.

Fixes #1546

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3337>

18 months agova: baseenc: Do not import the VA surface from other display.
He Junyan [Fri, 4 Nov 2022 13:52:39 +0000 (21:52 +0800)]
va: baseenc: Do not import the VA surface from other display.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agova: compositor: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 13:26:23 +0000 (21:26 +0800)]
va: compositor: Do not use allocator and pool from other display.

Just like the va decoder, the compositor should not use allocator
and pool from other display. Also, when importing the input buffer,
if it is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agova: basetransform: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 09:12:22 +0000 (17:12 +0800)]
va: basetransform: Do not use allocator and pool from other display.

Just like the va decoder, the vpp and deinterlace should not use allocator
and pool from other display. Also, when importing the input buffer, if it
is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agova: basedec: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 09:08:12 +0000 (17:08 +0800)]
va: basedec: Do not use allocator and pool from other display.

The command line such as:
  gst-launch-1.0 -vf filesrc location=1.264 ! h264parse !
  vah264dec ! varenderD129postproc ! fakesink
The decoder here gets the allocation proposal from the vpp which is
on another GPU device. The allocator and pool belong to other display
and should not be used in the decoder.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agolibs: va: Add API to peek the va buffer's display.
He Junyan [Fri, 4 Nov 2022 12:28:34 +0000 (20:28 +0800)]
libs: va: Add API to peek the va buffer's display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agolibs: va: Add API to peek the va memory's display.
He Junyan [Fri, 4 Nov 2022 12:28:34 +0000 (20:28 +0800)]
libs: va: Add API to peek the va memory's display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agolibs: va: Add API to peek the allocator's display.
He Junyan [Fri, 4 Nov 2022 09:06:37 +0000 (17:06 +0800)]
libs: va: Add API to peek the allocator's display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agolibs: va: Fix code style in gstvaallocator.h
He Junyan [Fri, 4 Nov 2022 09:03:35 +0000 (17:03 +0800)]
libs: va: Fix code style in gstvaallocator.h

Replace all tabs with spaces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

18 months agod3dvideosink: Update plugin description
Seungha Yang [Fri, 4 Nov 2022 20:32:52 +0000 (05:32 +0900)]
d3dvideosink: Update plugin description

Direct3D is too generic (there are various version numbers).
Clarify that this element is using the Direct3D9 API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3333>

18 months agoqt: initialize GError properly in gst_qt_get_gl_wrapcontext()
Tim-Philipp Müller [Fri, 4 Nov 2022 17:48:01 +0000 (17:48 +0000)]
qt: initialize GError properly in gst_qt_get_gl_wrapcontext()

Spotted by Claus Stovgaard.

Fixes #1545

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3327>

18 months agogst-env: import exit from sys
Stéphane Cerveau [Fri, 4 Nov 2022 10:14:55 +0000 (11:14 +0100)]
gst-env: import exit from sys

On windows the Cmd Prompt for VS 2019 complains
that exit is not defined.

  File "C:/data/gstreamer/gst-env.py", line 622, in <module>
    exit(subprocess.call(args, close_fds=False, env=env))

NameError: name 'exit' is not defined
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3324>

18 months agoqtmux: Add durations to raw audio buffers from the raw audio adapter in prefill mode
Sebastian Dröge [Fri, 4 Nov 2022 09:10:52 +0000 (11:10 +0200)]
qtmux: Add durations to raw audio buffers from the raw audio adapter in prefill mode

This ensures that a duration can also be calculated and stored for the
last buffer at EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3321>

18 months agoqtmux: Release object lock before posting an error message
Sebastian Dröge [Fri, 4 Nov 2022 08:49:31 +0000 (10:49 +0200)]
qtmux: Release object lock before posting an error message

GST_ELEMENT_ERROR() also takes the object lock and this would then
deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3321>

18 months agogst-validate-1.0: Don't leak arguments and context
Edward Hervey [Fri, 4 Nov 2022 10:23:12 +0000 (11:23 +0100)]
gst-validate-1.0: Don't leak arguments and context

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agovalidate-scenario: Don't leak temporary path value
Edward Hervey [Fri, 4 Nov 2022 10:02:49 +0000 (11:02 +0100)]
validate-scenario: Don't leak temporary path value

It's only use in the structure iterator

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agovalidate-scenario: Don't leak temporary local variables structures
Edward Hervey [Fri, 4 Nov 2022 10:02:27 +0000 (11:02 +0100)]
validate-scenario: Don't leak temporary local variables structures

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agolv2: Don't leak plugin information on registration
Edward Hervey [Fri, 4 Nov 2022 07:41:10 +0000 (08:41 +0100)]
lv2: Don't leak plugin information on registration

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agoladspa: Don't leak plugin information on registration
Edward Hervey [Fri, 4 Nov 2022 07:40:24 +0000 (08:40 +0100)]
ladspa: Don't leak plugin information on registration

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agofdkaacenc: Properly terminate GEnumValue table
Edward Hervey [Fri, 4 Nov 2022 07:09:52 +0000 (08:09 +0100)]
fdkaacenc: Properly terminate GEnumValue table

It should be terminated with a NULL entry, otherwise we just stray into the
realms of cryptographic libraries^W^W random memory usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agolibav: avcfg: Avoid brittle comparision
Edward Hervey [Fri, 4 Nov 2022 07:00:03 +0000 (08:00 +0100)]
libav: avcfg: Avoid brittle comparision

Subtracting a gint from another (or a guint from another) has no guarantees that
it will result in a gint.

Therefore do the actual comparision instead.

Also use the *actual* type for comparing flags (the field value types are different)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agolibav: avcfg: Don't leak duplicate enumvalue entries
Edward Hervey [Fri, 4 Nov 2022 06:59:10 +0000 (07:59 +0100)]
libav: avcfg: Don't leak duplicate enumvalue entries

If we discard the duplicates, we also need to free the allocated strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agoimagesequencesrc; Fix leaks
Edward Hervey [Thu, 3 Nov 2022 13:08:57 +0000 (14:08 +0100)]
imagesequencesrc; Fix leaks

* The path was leaked
* The custom buffer was never freed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agoqtdemux: Fix cenc-related leaks
Edward Hervey [Thu, 3 Nov 2022 13:08:02 +0000 (14:08 +0100)]
qtdemux: Fix cenc-related leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agodeinterlace: Don't leak metas
Edward Hervey [Thu, 3 Nov 2022 13:06:58 +0000 (14:06 +0100)]
deinterlace: Don't leak metas

There is no correlation between the frame being NULL and the metas not being
present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agovalidate: plug some leaks
Edward Hervey [Thu, 3 Nov 2022 13:05:59 +0000 (14:05 +0100)]
validate: plug some leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agoadaptivedemux2: Fix collection leaks
Edward Hervey [Mon, 31 Oct 2022 15:08:23 +0000 (16:08 +0100)]
adaptivedemux2: Fix collection leaks

* The collection on the period was never unreffed
* The collection in the message handler was never unreffed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agoparsebin: Fix leak
Edward Hervey [Mon, 31 Oct 2022 15:06:45 +0000 (16:06 +0100)]
parsebin: Fix leak

Release the reference on the collection which was given to us when extracting it
from the event/message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>

18 months agomssdemux2: Update for adaptivedemux2 refactoring
Jan Schmidt [Fri, 4 Nov 2022 16:23:43 +0000 (03:23 +1100)]
mssdemux2: Update for adaptivedemux2 refactoring

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2: Move stream_seek() to the Stream class
Jan Schmidt [Wed, 2 Nov 2022 14:48:08 +0000 (01:48 +1100)]
adaptivedemux2: Move stream_seek() to the Stream class

Move the last stream specific vfunc from the demux
class to the stream class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2: Refactor stream methods into the stream
Jan Schmidt [Sat, 20 Aug 2022 18:31:53 +0000 (04:31 +1000)]
adaptivedemux2: Refactor stream methods into the stream

Unlike the legacy elements, GstAdaptiveDemuxStream is a GObject now,
so a bunch of things that were actually stream methods on the
parent demux object can directly become stream methods now.

Move the stream class out to a header of its own.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agohlsdemux2/m3u8: Implement EXT-X-GAP parsing
Jan Schmidt [Tue, 7 Jun 2022 04:36:24 +0000 (14:36 +1000)]
hlsdemux2/m3u8: Implement EXT-X-GAP parsing

Read the EXT-X-GAP tag and set is_gap on the segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agohlsdemux2/m3u8: Refactor parsing for readability
Jan Schmidt [Tue, 7 Jun 2022 04:13:39 +0000 (14:13 +1000)]
hlsdemux2/m3u8: Refactor parsing for readability

Small readability improvements in the parsing code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2/downloadhelper: Remove return val for download_request_add_buffer()
Jan Schmidt [Thu, 13 Oct 2022 19:21:41 +0000 (06:21 +1100)]
adaptivedemux2/downloadhelper: Remove return val for download_request_add_buffer()

The function can't actually fail, and the only caller
was ignoring the result anyway, so remove the return value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2/downloadhelper: Add debug output of response headers
Jan Schmidt [Thu, 13 Oct 2022 19:20:06 +0000 (06:20 +1100)]
adaptivedemux2/downloadhelper: Add debug output of response headers

Dump the HTTP response headers at TRACE level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2/downloadhelper: Don't mark transfer as complete/error if cancelled.
Jan Schmidt [Thu, 13 Oct 2022 19:19:11 +0000 (06:19 +1100)]
adaptivedemux2/downloadhelper: Don't mark transfer as complete/error if cancelled.

If the state of the download request was reset to UNSENT,
it was cancelled. Don't update the state to COMPLETE or ERRORED
in on_read_ready().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2/downloadhelper: Ignore spurious read failure
Jan Schmidt [Thu, 13 Oct 2022 19:17:00 +0000 (06:17 +1100)]
adaptivedemux2/downloadhelper: Ignore spurious read failure

Sometimes g_input_stream_read_all_finish() can return
0 bytes, but still succeed (return TRUE) and have more
data available later. Only finish the transfer
if it returns 0 bytes *and* FALSE with no error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2/downloadhelper: Fix function name
Jan Schmidt [Thu, 13 Oct 2022 19:15:45 +0000 (06:15 +1100)]
adaptivedemux2/downloadhelper: Fix function name

Fix a typo in the name of function download_request_despatch_progress()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2: Remove scheduler_lock mutex
Jan Schmidt [Tue, 11 Oct 2022 15:14:32 +0000 (02:14 +1100)]
adaptivedemux2: Remove scheduler_lock mutex

Remove the old unused scheduler_lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2: Hold tracks lock accessing input_period
Jan Schmidt [Mon, 10 Oct 2022 16:20:11 +0000 (03:20 +1100)]
adaptivedemux2: Hold tracks lock accessing input_period

The input_period is protected by the TRACKS_LOCK,
so make sure to hold that when accessing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agoadaptivedemux2: Add state checks and clean up obsolete variables
Jan Schmidt [Tue, 16 Aug 2022 13:01:46 +0000 (23:01 +1000)]
adaptivedemux2: Add state checks and clean up obsolete variables

The cancelled flag was only set in the stream finalize()
method, after all activity on the stream has stopped anyway.
Replace uses of cancelled with checks on the stream state.

Remove the replaced flag, which was checked but never set
to TRUE anywhere any more.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

18 months agogstpad: Fix non-serialized sticky event push
Edward Hervey [Mon, 24 Oct 2022 10:13:14 +0000 (12:13 +0200)]
gstpad: Fix non-serialized sticky event push

With non-serialized sticky events, such as GST_EVENT_INSTANT_RATE, we both want
to store the event (for later re-linking) *AND* push the event in a non-blocking
way.

We therefore must *not* propagate pending sticky events if the event is "sticky
or serialized" but only if it's "serialized"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3254>

18 months agosrt: Remove callers for which srt_bstats fails
Jan Alexander Steffens (heftig) [Wed, 27 Jul 2022 13:59:35 +0000 (15:59 +0200)]
srt: Remove callers for which srt_bstats fails

This keeps them from accumulating in the element and in the stats while
the sink is not being fed, as long as we at least periodically grab
stats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agosrt: Use simpler list operations for callers
Jan Alexander Steffens (heftig) [Fri, 29 Jul 2022 09:53:18 +0000 (11:53 +0200)]
srt: Use simpler list operations for callers

Avoid `g_list_append` and `g_list_remove` (which have to scan the list)
and replace them with `g_list_prepend` and `g_list_delete_link`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agosrt: Clean up poll/sock lifecycle
Jan Alexander Steffens (heftig) [Tue, 10 Nov 2020 09:06:37 +0000 (10:06 +0100)]
srt: Clean up poll/sock lifecycle

Make sure `srtobject->poll_id` is never invalid as long as `srtobject`
exists. Only remove our caller socket from it when the socket becomes
invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agosrt: Clean up error handling
Jan Alexander Steffens (heftig) [Wed, 8 Jun 2022 14:35:54 +0000 (16:35 +0200)]
srt: Clean up error handling

- Make the srt_epoll_wait loops more uniform.

- Error only via GError when possible; let the element send the error
  message. Avoids a second error message.

- Return 0 when cancelled. Avoids an error message from the element.

- Don't send an error message from send_headers when we're a server
  sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agosrt: Simplify socket stats
Jan Alexander Steffens (heftig) [Tue, 11 Oct 2022 09:14:59 +0000 (11:14 +0200)]
srt: Simplify socket stats

Don't hide stats depending on whether we're a sending or receiving
socket. While we're here, add some more debug logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agosrt: Replace stats accumulation with naive byte counting
Jan Alexander Steffens (heftig) [Mon, 5 Oct 2020 17:50:13 +0000 (19:50 +0200)]
srt: Replace stats accumulation with naive byte counting

srt_bstats cannot be used to get the stats of closed connections, so the
best we can do is keep the running count ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

18 months agodirectshow: Validate enumerated AM_MEDIA_TYPE struct
Seungha Yang [Fri, 4 Nov 2022 09:32:05 +0000 (18:32 +0900)]
directshow: Validate enumerated AM_MEDIA_TYPE struct

The video info struct can be null if format is undefined

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3323>

18 months agovpx: Complete high bitdepth vp9 en/decoding support
Seungha Yang [Sun, 30 Oct 2022 11:28:25 +0000 (20:28 +0900)]
vpx: Complete high bitdepth vp9 en/decoding support

Adding 12bits variant formats to en/decoder, and high bitdepth
4:4:4 (except for GBR) encoding support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3298>

18 months agovpx: Define formats for compatibility
Seungha Yang [Sun, 30 Oct 2022 11:03:10 +0000 (20:03 +0900)]
vpx: Define formats for compatibility

ifdef for enum values never work. Instead, define new enum type
and use it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3298>

18 months agoexamples: d3d11: Fix GCC build error/warning
Seungha Yang [Thu, 3 Nov 2022 14:40:00 +0000 (23:40 +0900)]
examples: d3d11: Fix GCC build error/warning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3318>

18 months agoqsvjpegenc: Add support for YUY2 format
Seungha Yang [Wed, 2 Nov 2022 20:18:03 +0000 (05:18 +0900)]
qsvjpegenc: Add support for YUY2 format

Now GstD3D11 defines YUY2 format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

18 months agoqsv: Add JPEG decoder
Seungha Yang [Wed, 2 Nov 2022 20:12:31 +0000 (05:12 +0900)]
qsv: Add JPEG decoder

Because DXVA does not define JPEG decoding, we need this
vendor specific API for Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

18 months agod3d11: Add support for YUY2 format
Seungha Yang [Wed, 2 Nov 2022 18:38:33 +0000 (03:38 +0900)]
d3d11: Add support for YUY2 format

YUY2 is a primary YUV 4:2:2 format for DXVA.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

18 months agodoc: avviddec: Update plugin cache
Nicolas Dufresne [Wed, 2 Nov 2022 15:09:17 +0000 (11:09 -0400)]
doc: avviddec: Update plugin cache

This is to add std-compliance property and GstFFMpegVidDec base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

18 months agoavviddec: Introduce a class for shared properties
Nicolas Dufresne [Tue, 1 Nov 2022 15:13:23 +0000 (11:13 -0400)]
avviddec: Introduce a class for shared properties

Without a parent class,the documentation would need to be duplicated for
every CODECs. This patch adds an abstract class in between GstVideoDecoder
and the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

18 months agoavviddec: Expose std-compliance option
Seungha Yang [Tue, 1 Nov 2022 13:35:11 +0000 (09:35 -0400)]
avviddec: Expose std-compliance option

Default compliance mode (i.e., FF_COMPLIANCE_NORMAL) might not
strictly follow specification. This property will allow user
to specifiy expected compliance mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

18 months agoparse: do delayed set only if the target child was not found and fail otherwise
Michael Gruner [Thu, 18 Aug 2022 04:34:35 +0000 (22:34 -0600)]
parse: do delayed set only if the target child was not found and fail otherwise

When using the child proxy notation (child::property=value) it may
happen that the target child does not exist at the time of parsing
(i.e: decodebin creates the encoder according to the contents of the
stream). On this cases, we want to delay the setting of the property
to later, when new elements are added. Previous logic performed a
delayed set even if the target child was found but the property
was not found in it. This should be treated as a failure because,
unlike missing elements, properties should not appear dynamically.
By not failing, typos in property names may go unnoticed to the end
user.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>

18 months agochildproxy: Implement a new ::get_child_by_name_recurse() API
Michael Gruner [Tue, 18 Oct 2022 16:15:12 +0000 (18:15 +0200)]
childproxy: Implement a new ::get_child_by_name_recurse() API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>

18 months agomsdkcontext: use gst_object_unref instead of g_object_unref
Tong Wu [Tue, 1 Nov 2022 01:47:38 +0000 (09:47 +0800)]
msdkcontext: use gst_object_unref instead of g_object_unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

18 months agomsdkcontext: use gst_object_ref for GstVaDisplay
Tong Wu [Mon, 31 Oct 2022 08:59:18 +0000 (16:59 +0800)]
msdkcontext: use gst_object_ref for GstVaDisplay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

18 months agomsdkcontext: g_object_new() must not return nullptr
Tong Wu [Mon, 31 Oct 2022 08:56:32 +0000 (16:56 +0800)]
msdkcontext: g_object_new() must not return nullptr

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

18 months agomsdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature
Tong Wu [Mon, 31 Oct 2022 08:52:23 +0000 (16:52 +0800)]
msdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature

Add macros to protect sinkpad_is_va(), since it is not defined on
Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

18 months agowpe: fix wpevideosrc gst-play example
Guillaume Desmottes [Tue, 1 Nov 2022 11:03:24 +0000 (12:03 +0100)]
wpe: fix wpevideosrc gst-play example

wpe:// no longer works since 1.20, see wpesrc examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3306>

18 months agovah264enc: Added option to insert CEA-708 closed captions
Eric Knapp [Thu, 27 Oct 2022 14:03:34 +0000 (10:03 -0400)]
vah264enc: Added option to insert CEA-708 closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2910>

18 months agoqsv: Check 16K resolution support
Seungha Yang [Tue, 1 Nov 2022 13:19:18 +0000 (22:19 +0900)]
qsv: Check 16K resolution support

... and remove duplicated code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3310>

18 months agovulkan: Mark gst_vulkan_image_view_new create_info as constant pointer
Marijn Suijten [Fri, 14 May 2021 08:24:05 +0000 (10:24 +0200)]
vulkan: Mark gst_vulkan_image_view_new create_info as constant pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

18 months agovulkan: Remove unnecessary null checks
Marijn Suijten [Tue, 5 Jan 2021 21:33:12 +0000 (22:33 +0100)]
vulkan: Remove unnecessary null checks

These null checkes are slightly misleading when double-checking
mutability for external language interop.  None of the functions in
these files allow the variable at hand to become `NULL` under normal
operation, because they are checked at initialization and never (allowed
to be) reassigned to `NULL`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

18 months agovulkan: Add missing `(nullable)` annotation to `Returns`
Marijn Suijten [Mon, 4 Jan 2021 00:07:04 +0000 (01:07 +0100)]
vulkan: Add missing `(nullable)` annotation to `Returns`

Most of these functions already state they might return `%NULL`, but
this is not picked up by G-IR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

18 months agovulkan: Add missing `array length` and `(out)` annotation to parameters
Marijn Suijten [Sun, 3 Jan 2021 23:40:24 +0000 (00:40 +0100)]
vulkan: Add missing `array length` and `(out)` annotation to parameters

Add `array length` annotation for `layouts` such that `n_layouts` is
properly marked as its length, and add `(out)` where a function returns
in that parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

18 months agohlsdemux2: m3u8: Use PDT to offset stream time when aligning playlist
Jan Schmidt [Thu, 27 Oct 2022 12:57:58 +0000 (23:57 +1100)]
hlsdemux2: m3u8: Use PDT to offset stream time when aligning playlist

When matching segments across playlists with Program-Date-Times,
use the difference in segment PDTs to adjust the stream time
that's being transferred. This can fix cases where the
segment boundaries don't align across different streams
and the first download gets thrown away once the PTS
is seen and found not to match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3309>