platform/upstream/gstreamer.git
3 years agoplayback: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:59:14 +0000 (12:59 +0100)]
playback: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoogg: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:56:53 +0000 (12:56 +0100)]
ogg: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoalsa: element_init returns void
Stéphane Cerveau [Tue, 16 Mar 2021 11:55:55 +0000 (12:55 +0100)]
alsa: element_init returns void

no need to return boolean as it will
be always TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovolume: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:15:10 +0000 (11:15 +0100)]
volume: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideotestsrc: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:14:31 +0000 (11:14 +0100)]
videotestsrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideoscale: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 10:11:25 +0000 (11:11 +0100)]
videoscale: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideorate: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:59:42 +0000 (10:59 +0100)]
videorate: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovideoconvert: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:55:25 +0000 (10:55 +0100)]
videoconvert: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agooverlaycomposition: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:49:48 +0000 (10:49 +0100)]
overlaycomposition: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoencoding: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 09:43:14 +0000 (10:43 +0100)]
encoding: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agocompositor: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:58:59 +0000 (09:58 +0100)]
compositor: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoadder: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:37:02 +0000 (09:37 +0100)]
adder: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agocdparanoiasrc: allow per feature registration
Stéphane Cerveau [Thu, 11 Feb 2021 08:34:13 +0000 (09:34 +0100)]
cdparanoiasrc: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudioconvert: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 16:54:31 +0000 (17:54 +0100)]
audioconvert: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agopango: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 17:47:41 +0000 (18:47 +0100)]
pango: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agotheora: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 17:46:20 +0000 (18:46 +0100)]
theora: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agovorbis: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 16:56:13 +0000 (17:56 +0100)]
vorbis: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoopus: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 15:59:50 +0000 (16:59 +0100)]
opus: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agogl: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:42:32 +0000 (15:42 +0100)]
gl: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agogio: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:12:29 +0000 (15:12 +0100)]
gio: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoapp: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 14:02:03 +0000 (15:02 +0100)]
app: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudiomixer: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 11:59:32 +0000 (12:59 +0100)]
audiomixer: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agotcp: allow per feature registration
Stéphane Cerveau [Fri, 11 Dec 2020 11:42:03 +0000 (12:42 +0100)]
tcp: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agorawparse: allow per feature registration
Stéphane Cerveau [Tue, 1 Dec 2020 14:14:00 +0000 (15:14 +0100)]
rawparse: allow per feature registration

Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>

3 years agoaudioaggregator: Consider converting for equal audio formats
Jan Alexander Steffens (heftig) [Mon, 15 Mar 2021 14:33:47 +0000 (15:33 +0100)]
audioaggregator: Consider converting for equal audio formats

The converter might have a non-passthrough mix-matrix. The converter
can determine whether it should pass through, so let it, then remove it
if it's indeed a passthrough.

FIXME: Not converting when we need to but the config is invalid (e.g.
because the mix-matrix is not the right size) produces garbage. An
invalid config should cause a GST_FLOW_NOT_NEGOTIATED.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1070>

3 years agoaudioaggregator: Clean up _convert_pad_update_converter
Jan Alexander Steffens (heftig) [Tue, 16 Mar 2021 11:27:31 +0000 (12:27 +0100)]
audioaggregator: Clean up _convert_pad_update_converter

No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1070>

3 years agortspconnection: Consistently translate GIOError to GstRTSPResult
Nirbheek Chauhan [Mon, 15 Mar 2021 13:35:44 +0000 (19:05 +0530)]
rtspconnection: Consistently translate GIOError to GstRTSPResult

The users of this API need to be able to differentiate between EINTR
and ERROR. For example, in rtspsrc, gst_rtsp_conninfo_connect()
behaves differently when gst_rtsp_connection_connect_with_response_usec()
returns an ERROR or EINTR. The former is an element error while the
latter is simple a GST_ERROR since it was a user cancellation of the
connection attempt.

Due to this, rtspsrc was incorrectly emitting element errors while
going to NULL, which would or would not reach the application in
a racy manner.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1069>

3 years agotag: id3v2: fix frame size check and potential invalid reads
Tim-Philipp Müller [Wed, 3 Mar 2021 01:08:25 +0000 (01:08 +0000)]
tag: id3v2: fix frame size check and potential invalid reads

Check the right variable when checking if there's
enough data left to read the frame size.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/876

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1065>

3 years agortpbasedepayload: handle caps change partway through buffer list
Jakub Adam [Tue, 9 Feb 2021 21:09:52 +0000 (22:09 +0100)]
rtpbasedepayload: handle caps change partway through buffer list

While preparing a blist for pushing, some RTP header extension may
request caps change for a specific buffer in the list. When this
happens, depayloader should immediately push those buffers from the list
that precede the currently processed buffer (for which the caps change
was requested) and only then apply the new caps to the src pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agortphdrext: allow updating depayloader src caps
Jakub Adam [Thu, 4 Feb 2021 16:08:04 +0000 (17:08 +0100)]
rtphdrext: allow updating depayloader src caps

Add overridable method that updates depayloader's src caps based on
the data from RTP header.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agortphdrext: allow the extension to inspect payloader's sink caps
Jakub Adam [Tue, 12 Jan 2021 21:11:46 +0000 (22:11 +0100)]
rtphdrext: allow the extension to inspect payloader's sink caps

Some header extensions may need to read information from the payloader's
sink caps. Introduce gst_rtp_header_extension_update_from_sinkcaps ()
that passes the caps to the extension, which can then use it to update
its internal state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>

3 years agoext: alsa: Set buffer time after period time
Devarsh Thakkar [Tue, 9 Feb 2021 13:16:34 +0000 (05:16 -0800)]
ext: alsa: Set buffer time after period time

This because underlying driver may have constraint on
buffer size to be dependent on period size, so period
time needs to be set first.

For e.g. Xilinx ASoC driver requires
buffer size to be multiple of period size for it's DMA
operation.

alsa-utils also set period time first as seen in below commit :
https://github.com/alsa-project/alsa-utils/commit/9b621eeac4d55c4e881f093be5b163ca07d01b63

Tested it on zcu106 board with HDMI based record and playback.
Also tested on Intel PC using Logitech C920 Webcam mic and ALC887-VD
Analog for playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1040>

3 years agoplayback: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:45:32 +0000 (10:45 +0100)]
playback: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoogg: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:44:53 +0000 (10:44 +0100)]
ogg: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoalsa: remove useless ret test
Stéphane Cerveau [Mon, 8 Mar 2021 09:44:42 +0000 (10:44 +0100)]
alsa: remove useless ret test

Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>

3 years agoaudioaggregator: fix input_buffer ownership
Guillaume Desmottes [Wed, 10 Mar 2021 13:26:22 +0000 (14:26 +0100)]
audioaggregator: fix input_buffer ownership

The way pad->priv->input_buffer reference was managed was pretty
spurious:
- it was overridden without unrefing it, which could potentially lead to
  leaks.
- we were unreffing it while keeping the pointer around, which could
  potentially lead to use-after-free or double-free.

As priv->input_buffer is actually no longer used outside of the
aggregate() method, remove it from pad->priv to simplify the code and
prevent the issues desribed above.

Fix a single buffer leak when shutting down the pipeline as the buffer
returned from gst_aggregator_pad_drop_buffer() was never unreffed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>

3 years agoaudioaggregator: fix input buffer when converting
Guillaume Desmottes [Wed, 10 Mar 2021 15:22:14 +0000 (16:22 +0100)]
audioaggregator: fix input buffer when converting

This code path is meant to convert the current buffer to the new format
on update. It was using priv->input_buffer as input which is either
priv->buffer or a converted version of it.
Use priv->buffer instead as priv->input_buffer may no longer be a valid
reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1061>

3 years agoSet _NET_WM_NAME property for xvimagesink and ximagesink
david [Fri, 22 Jan 2021 21:24:24 +0000 (22:24 +0100)]
Set _NET_WM_NAME property for xvimagesink and ximagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1017>

3 years agogl: download: Fix a caps memory leak in _try_export_dmabuf().
He Junyan [Tue, 2 Mar 2021 06:16:23 +0000 (14:16 +0800)]
gl: download: Fix a caps memory leak in _try_export_dmabuf().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl: download: Fix a caps memory leak in prepare_output_buffer().
He Junyan [Tue, 2 Mar 2021 05:07:04 +0000 (13:07 +0800)]
gl: download: Fix a caps memory leak in prepare_output_buffer().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl: download: Fix the wrong transformed result from src direction in transform_caps().
He Junyan [Mon, 1 Mar 2021 15:33:29 +0000 (23:33 +0800)]
gl: download: Fix the wrong transformed result from src direction in transform_caps().

The current manner in transform_caps() for src direction is not very correct. For example,
when the src caps is:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
this function returns:
  video/x-raw(memory:DMABuf); video/x-raw; video/x-raw(memory:GLMemory)
as the sink caps. This is not correct, because DMABuf feature is not even in the sink pad's
caps template. The correct answer should be:
  video/x-raw(memory:GLMemory); video/x-raw
only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1058>

3 years agogl/dispmanx: assign render_rect to window before window_resize
Alexander Vandenbulcke [Mon, 1 Mar 2021 11:23:25 +0000 (12:23 +0100)]
gl/dispmanx: assign render_rect to window before window_resize

If the `render_rect` for a dispmanx display is set after calling
`window_resize` the resize defaults to the dp_width and dp_height to
determine the location of the render rectangle instead of the correct
dimensions that should be set on the window_egl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1056>

3 years agocompositor: fix drawing of transparent background
Mathieu Duponchelle [Thu, 18 Feb 2021 15:16:33 +0000 (16:16 +0100)]
compositor: fix drawing of transparent background

When drawing the background multithreaded, y_start needs to be
scaled to obtain the correct byte offset from which to start
memsetting (yoffset).

Fixes #871

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1042>

3 years agogstrtspconnection: correct data_size when tunneled mode
Kristofer Björkström [Thu, 25 Feb 2021 10:03:31 +0000 (11:03 +0100)]
gstrtspconnection: correct data_size when tunneled mode

gst_rtsp_connection_send_messages_usec in tunneled mode does base64
encode messages. When calculating data_size 1 bytes is added, which
results in ending the base64 with a NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1051>

3 years agoaudio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP
Robert Rosengren [Wed, 24 Feb 2021 12:46:04 +0000 (13:46 +0100)]
audio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP

GST_BUFFER_PTS already used in audio code base (e.g. gstaudiodecoder),
so migrate completely from deprecated GST_BUFFER_TIMESTAMP for better
readability, as gstcompat.h defines GST_BUFFER_TIMESTAMP directly to PTS
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1048>

3 years agoaudioaggregator: Log if the sample rate of one sinkpad is not accepted
Sebastian Dröge [Wed, 24 Feb 2021 17:51:40 +0000 (19:51 +0200)]
audioaggregator: Log if the sample rate of one sinkpad is not accepted

Otherwise this can silently cause not-negotiated errors without any
direct hint about what went wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1049>

3 years agovideotestsrc.c: Correct left shift operator
Francisco Javier Velázquez-García [Tue, 23 Feb 2021 13:40:02 +0000 (14:40 +0100)]
videotestsrc.c: Correct left shift operator

Use the left shift operator '<<' instead of the mistakenly typed less
than operator '<'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1047>

3 years agovideo-converter: Don't upsample/downsample/dither invalid lines
Vivia Nikolaidou [Fri, 19 Feb 2021 14:44:35 +0000 (16:44 +0200)]
video-converter: Don't upsample/downsample/dither invalid lines

This is a fallout from the conversion to support multiple threads.
convert->upsample_p is never NULL now, it's always an allocated array of
n_threads potentially-null pointers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1043>

3 years agoaudioresample: Respect buffer layout when drain
Jeongki Kim [Mon, 22 Feb 2021 06:36:53 +0000 (15:36 +0900)]
audioresample: Respect buffer layout when drain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1045>

3 years agovideoconvert: Only prefer upstream chroma-site with same subsampling.
Jan Schmidt [Thu, 18 Feb 2021 15:27:07 +0000 (02:27 +1100)]
videoconvert: Only prefer upstream chroma-site with same subsampling.

If converting YUV formats with different chroma-subsampling, there's
probably no good reason to prefer the upstream chroma-siting so just use
the default for the output format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agovideoconvert: Implement more sophisticated colorimetry caps transfer
Jan Schmidt [Mon, 15 Feb 2021 14:24:15 +0000 (01:24 +1100)]
videoconvert: Implement more sophisticated colorimetry caps transfer

Implement a more sophisticated transfer of colorimetry and
chroma-site fields to output caps when fixating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agovideoconvert: Forward colorimetry and chroma-site from upstream.
Jan Schmidt [Mon, 15 Feb 2021 07:34:33 +0000 (18:34 +1100)]
videoconvert: Forward colorimetry and chroma-site from upstream.

If downstream has expressed no preference for particular colorimetry
and chroma-site configuration, transfer them from the input caps.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/614

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>

3 years agodecodebin3: change stream selection message owner
Stéphane Cerveau [Tue, 19 Jan 2021 14:56:18 +0000 (15:56 +0100)]
decodebin3: change stream selection message owner

In order to select the streams on GST_MESSAGE_STREAM_COLLECTION,
the app needs to send the select-streams event
to the decodebin and not to the parsebin.

The message should be always owned by the decodebin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1014>

3 years agolibs: audio: Handle meta changes in gst_audio_buffer_truncate
Vivia Nikolaidou [Wed, 17 Feb 2021 10:41:06 +0000 (12:41 +0200)]
libs: audio: Handle meta changes in gst_audio_buffer_truncate

Set timestamp and duration to GST_CLOCK_TIME_NONE unless trim==0,
because that function doesn't know the rate and therefore can't
calculate them. Set offset and offset_end to appropriate values. Make it
clear in the documentation that the caller is responsible for setting
the timestamp and duration.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1039>

3 years agouridecodebin3: make caps property work
Tim-Philipp Müller [Mon, 15 Feb 2021 16:05:30 +0000 (16:05 +0000)]
uridecodebin3: make caps property work

The caps set on uridecodebin3 via the "caps" property
were never passed to the internal decodebin3, so did
absolutely nothing.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/837

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1034>

3 years agovideodecoder: Fix racy critical when pool negotiation occurs during flush
Alicia Boya García [Fri, 12 Feb 2021 23:27:04 +0000 (00:27 +0100)]
videodecoder: Fix racy critical when pool negotiation occurs during flush

I found a rather reproducible race in a WebKit LayoutTest when a player
was intantiated and a VP8/9 video was loaded, then torn down after
getting the video dimensions from the caps.

The crash occurs during the handling of the first frame by gstvpxdec.
The following actions happen sequentially leading to a crash.

(MT=Main Thread, ST=Streaming Thread)

MT: Sets pipeline state to NULL, which deactivates vpxdec's srcpad,
    which in turn sets its FLUSHING flag.

ST: gst_vpx_dec_handle_frame() -- which is still running -- calls
    gst_video_decoder_allocate_output_frame(); this in turn calls
    gst_video_decoder_negotiate_unlocked() which fails because the
    srcpad is FLUSHING. As a direct consequence of the negotiation
    failure, a pool is NOT set.

    gst_video_decoder_negotiate_unlocked() still assumes there is a
    pool, crashing in a critical in gst_buffer_pool_acquire_buffer()
    a couple statements later.

This patch fixes the bug by returning != GST_FLOW_OK when the
negotiation fails. If the srcpad is FLUSHING, GST_FLOW_FLUSHING is
returned, otherwise GST_FLOW_ERROR is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1031>

3 years agolibs: audio: Fix gst_audio_buffer_truncate meta handling
Jan Alexander Steffens (heftig) [Mon, 15 Feb 2021 16:22:47 +0000 (17:22 +0100)]
libs: audio: Fix gst_audio_buffer_truncate meta handling

In the non-interleaved case, it made `buffer` writable but then changed
the meta of the non-writable buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1035>

3 years agoaudioencoder: Fix gst_audio_encoder_get_audio_info return ownership GTK-Doc
Alejandro González [Sat, 13 Feb 2021 21:25:18 +0000 (21:25 +0000)]
audioencoder: Fix gst_audio_encoder_get_audio_info return ownership GTK-Doc

GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free them when it is done. However, in the case of this function, the returned GstAudioInfo is owned by the decoder, so this default choice is incorrect. This creates double free problems when using GStreamer Rust bindings, because they are generated using the information contained in the docs.

Fix this by correctly specifying that the caller does not own the returned object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>

3 years agoaudiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc
Alejandro González [Sat, 13 Feb 2021 17:24:37 +0000 (17:24 +0000)]
audiodecoder: Fix gst_audio_decoder_get_audio_info return ownership GTK-Doc

GTK-Doc specifies that, by default, the caller owns returned objects, so that the caller should free it when it is done. However, in the case of this function, the returned GstAudioInfo is owned by the decoder, so this default choice is incorrect. This creates double free problems when using GStreamer Rust bindings, because they are generated using the information contained in the docs.

Fix this by correctly specifying that the caller does not own the returned object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1032>

3 years agoencoding-profile: Plug a leak of factory list
Thibault Saunier [Fri, 8 Jan 2021 11:39:32 +0000 (08:39 -0300)]
encoding-profile: Plug a leak of factory list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

3 years agoencodebin: Add APIs to set element properties on encoding profiles
Thibault Saunier [Fri, 20 Nov 2020 21:35:49 +0000 (18:35 -0300)]
encodebin: Add APIs to set element properties on encoding profiles

User often want to set encoder properties on encoding profiles,
this introduces a way to easily 'preset' properties when defining the
profile. This uses GstStructure to define those properties the same
way it is done in `splitmux` for example as it makes simple to handle.

This also defines a more complex structure type where we can map a set
of properties to set depending on the muxer/encoder factory that has
been picked by EncodeBin so it is quite flexible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

3 years agoencoding-profile: Cleanup profile serialization documentation
Thibault Saunier [Fri, 20 Nov 2020 21:35:49 +0000 (18:35 -0300)]
encoding-profile: Cleanup profile serialization documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>

3 years agogl/dispmanx: fix deadlock triggered by `set_render_rectangle`
Alexander Vandenbulcke [Fri, 8 Jan 2021 10:51:36 +0000 (11:51 +0100)]
gl/dispmanx: fix deadlock triggered by `set_render_rectangle`

When the gstglimagesink is started with the option `glimagesink
render-rectangle="<0,0,1920,1080>"`, the pipeline reaches a deadlock.
The reason the deadlock occurs is that the
`gst_gl_window_set_render_rectangle` takes locks on the window, in
addition it calls `window_class->set_render_rectangle(...)` which
executes the `_on_resize` function. Since the `_on_resize` function also
takes locks on the window the deadlock is achieved.

By scheduling the adjustment of the render rectangle through an async
message for `gst_gl_window_dispmanx_set_render_rectangle`, the actual
resize happens in another context and therefore doesn't suffers from the
lock taken in `gst_gl_window_set_render_rectangle`.

This solution follows the same approach as gl/wayland. The problem was
introduced by b887db1. For the full discussion check #849.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1030>

3 years agovideoconvert,videoscale: Add alternate-field negotiation tests
Vivia Nikolaidou [Thu, 4 Feb 2021 16:51:27 +0000 (18:51 +0200)]
videoconvert,videoscale: Add alternate-field negotiation tests

Make sure buffers with alternate-field interlacing mode can be
negotiated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>

3 years agovideoscale: Support for alternate-field interlacing
Vivia Nikolaidou [Thu, 4 Feb 2021 16:22:15 +0000 (18:22 +0200)]
videoscale: Support for alternate-field interlacing

Accept the negotiation, video-converter.c is aware of the half-height
already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>

3 years agovideoconvert: Support for alternate-field interlacing
Vivia Nikolaidou [Tue, 2 Feb 2021 18:33:27 +0000 (20:33 +0200)]
videoconvert: Support for alternate-field interlacing

Treat the data just like normal data with half the height. Also treat it
as progressive when converting from/to I420 because it requires
different handling for chroma subsampling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>

3 years agoaudio: add GstAudioLevelMeta
Havard Graff [Thu, 5 Apr 2018 09:59:52 +0000 (11:59 +0200)]
audio: add GstAudioLevelMeta

Will be used to implement RTP extension https://tools.ietf.org/html/rfc6464

Co-authored-by: Guillaume Desmottes <guillaume.desmottes@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/706>

3 years agortpbasedepayload: add auto-header-extension property
Guillaume Desmottes [Tue, 26 Jan 2021 08:37:44 +0000 (09:37 +0100)]
rtpbasedepayload: add auto-header-extension property

Same property as the one I just added on rtpbasepayload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1022>

3 years agortpbasepayload: add auto-header-extension property
Guillaume Desmottes [Tue, 26 Jan 2021 08:37:44 +0000 (09:37 +0100)]
rtpbasepayload: add auto-header-extension property

Using RTP header extensions is currently not convenient. Users have to
handle signals from the RTP payloader and instantiate the extension
element themselves, making it impossible to use with gst-launch.

Adding a property allowing the payloader to automatically try creating
extensions. This should help simple use cases and testing using
gst-launch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1022>

3 years agotypefindfunctions: Consider the number and types of atoms found in a row for suggesti...
Sebastian Dröge [Tue, 19 Jan 2021 08:23:12 +0000 (10:23 +0200)]
typefindfunctions: Consider the number and types of atoms found in a row for suggesting a probability

If there are 3 or more known atoms in a row, it's likely that this is
actually MOV/MP4 even if we don't find any other known atoms. If 5 or
more are found then this is most certainly MOV/MP4 and we can return.

Also if a moov and mdat atom is found, this is definitely a MOV/MP4 file
and can be used as such, independent of anything else following the
mdat.

Fixes typefinding of various MOV files that have no `ftyp` atom but
otherwise a valid file structure followed by some garbage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1013>

3 years agogstaudiostreamalign: Pass self as const pointer in getter functions
Marijn Suijten [Fri, 29 Jan 2021 20:40:33 +0000 (21:40 +0100)]
gstaudiostreamalign: Pass self as const pointer in getter functions

It was noticed in [1] that `GstAudioStreamAlign` is a simple boxed type
that is passed as const in the copy function, but not as such in the
getters. These functions turn out to be the only users of `const = true`
overrides in `gstreamer-rs`. Since there is no locking or other advanced
caching/sharing going on (as happens with miniobjects) these functions
can safely take self as const pointer.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/683#note_783129

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1025>

3 years agovideo-hdr: Add API to check content light level equality
Jakub Adam [Mon, 27 Apr 2020 18:52:34 +0000 (20:52 +0200)]
video-hdr: Add API to check content light level equality

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/969>

3 years agortpbasedepayload: set attributes on newly requested extensions
Guillaume Desmottes [Tue, 26 Jan 2021 09:39:34 +0000 (10:39 +0100)]
rtpbasedepayload: set attributes on newly requested extensions

Users were supposed to configure the extension themselves but it was
impossible to do so as they didn't have access to the caps.

Fix #864

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1021>

3 years agortpbasepayload: set attributes on newly requested extensions
Guillaume Desmottes [Tue, 26 Jan 2021 09:39:34 +0000 (10:39 +0100)]
rtpbasepayload: set attributes on newly requested extensions

Users were supposed to configure the extension themselves but it was
impossible to do so as they didn't have access to the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1021>

3 years agortpbasedepayload: fix clear-extensions signal definition
Guillaume Desmottes [Mon, 25 Jan 2021 13:25:45 +0000 (14:25 +0100)]
rtpbasedepayload: fix clear-extensions signal definition

Typo as we were using the wrong enum.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1021>

3 years agooverlay/example: added qt core dependency for qt overlay example
Knobe, Daniel [Tue, 26 Jan 2021 13:05:48 +0000 (14:05 +0100)]
overlay/example: added qt core dependency for qt overlay example

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1020>

3 years agortp: fix clear-extensions signal definition
Guillaume Desmottes [Mon, 25 Jan 2021 13:25:45 +0000 (14:25 +0100)]
rtp: fix clear-extensions signal definition

Typo as we were using the wrong enum.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1018>

3 years agortphdrext: fix typo in doc
Guillaume Desmottes [Fri, 22 Jan 2021 09:10:05 +0000 (10:10 +0100)]
rtphdrext: fix typo in doc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1018>

3 years agogl/examples: fix recordgraphic example
Matthew Waters [Fri, 22 Jan 2021 03:02:29 +0000 (14:02 +1100)]
gl/examples: fix recordgraphic example

Not ported to proper modern OpenGL though but that is the case for a lot
of the GL examples.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/859

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1016>

3 years agogl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
Marijn Suijten [Mon, 4 Jan 2021 22:25:10 +0000 (23:25 +0100)]
gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable

These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>

3 years agoaudio/audio-buffer: @buffer in audio_buffer_map is out caller-allocates
Marijn Suijten [Thu, 14 Jan 2021 09:09:40 +0000 (10:09 +0100)]
audio/audio-buffer: @buffer in audio_buffer_map is out caller-allocates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>

3 years agovideo/video-frame: @frame in video_frame_map is out caller-allocates
Marijn Suijten [Wed, 13 Jan 2021 10:07:47 +0000 (11:07 +0100)]
video/video-frame: @frame in video_frame_map is out caller-allocates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>

3 years agoaudio,video: Add `out caller-allocates` to init and from_caps
Marijn Suijten [Tue, 12 Jan 2021 09:34:41 +0000 (10:34 +0100)]
audio,video: Add `out caller-allocates` to init and from_caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>

3 years agovideosink: Add new GstVideoSink::set_info() virtual method
Sebastian Dröge [Mon, 11 Jan 2021 10:25:33 +0000 (12:25 +0200)]
videosink: Add new GstVideoSink::set_info() virtual method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>

3 years agovideosink: Implement more complete BaseSink::get_times() based on the framerate
Sebastian Dröge [Sat, 26 Dec 2020 12:16:34 +0000 (14:16 +0200)]
videosink: Implement more complete BaseSink::get_times() based on the framerate

This will only make use of the framerate if the subclass is chaining up
BaseSink::set_caps(). Otherwise it will have the same behaviour as the
basesink default.

Doing so is useful if video buffers don't contain a duration to
calculate a default duration, and various video sinks already implement
a custom version of this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>

3 years agovideo: Convert info_to_caps to take self as const ptr
Marijn Suijten [Tue, 12 Jan 2021 09:36:34 +0000 (10:36 +0100)]
video: Convert info_to_caps to take self as const ptr

This requires a slight modification to the function itself because it
was overwriting a member locally.

However, now this side-effect cannot be observed outside the function
anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1008>

3 years agogl: add get_type() implementations for all of our memory types
Matthew Waters [Wed, 6 Jan 2021 00:16:18 +0000 (11:16 +1100)]
gl: add get_type() implementations for all of our memory types

Otherwise, various bindings can't really know the type of an object as
required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/999>

3 years agortpbasepayload: fix header extension length calculation
Jakub Adam [Tue, 12 Jan 2021 21:08:14 +0000 (22:08 +0100)]
rtpbasepayload: fix header extension length calculation

Since ternary operator has the lowest precedence in the expressions at
hand, wordlen would always incorrectly yield 0 or 1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1009>

3 years agogiosrc: Ensure that an error is posted when underlying file is deleted
Thibault Saunier [Thu, 7 Jan 2021 19:27:25 +0000 (16:27 -0300)]
giosrc: Ensure that an error is posted when underlying file is deleted

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1001>

3 years agovideo-blend: fix blending 8-bit and 16-bit frames together
Jakub Adam [Tue, 14 Jul 2020 18:44:18 +0000 (20:44 +0200)]
video-blend: fix blending 8-bit and 16-bit frames together

Replace hardcoded 255s with the correct max value for the given color
depth. Use 64-bit integer in calculations where overflow may occur.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1000>

3 years agoencodebasebin: Ensure that parsers are compatible with selected encoders
Thibault Saunier [Mon, 7 Dec 2020 14:23:49 +0000 (11:23 -0300)]
encodebasebin: Ensure that parsers are compatible with selected encoders

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/845

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/963>

3 years agogl: document some GL caps specifics
Matthew Waters [Tue, 5 Jan 2021 09:18:24 +0000 (20:18 +1100)]
gl: document some GL caps specifics

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/854
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/996>

3 years agotagdemux: resize and trim buffer in place to fix interaction with oggdemux
Tim-Philipp Müller [Mon, 4 Jan 2021 13:40:20 +0000 (13:40 +0000)]
tagdemux: resize and trim buffer in place to fix interaction with oggdemux

Elements operating in pull mode may optionally pass a buffer to
pull_range that should be filled with the data. The only element
that does that at the moment is oggdemux operating in pull mode.

tagdemux currently creates a sub-buffer whenever a buffer pulled
from upstream (filesrc, usually) needs to be trimmed. This creates
a new buffer, however, so disregards any passed-in buffer from a
downstream oggdemux.

This would cause assertion failures and playback problems for
ogg files that contain ID3 tags at the end.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/848

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/994>

3 years agoappsrc: fix signal documentation
Mathieu Duponchelle [Thu, 31 Dec 2020 16:25:40 +0000 (17:25 +0100)]
appsrc: fix signal documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/992>

3 years agovideoaggregator: Pop out old buffers on timeout
Edward Hervey [Wed, 30 Dec 2020 13:56:54 +0000 (14:56 +0100)]
videoaggregator: Pop out old buffers on timeout

This situation happens in the situation where an input stream has a framerate
exceeding the timeout latency (Ex: 1fps with a latency of 500ms) and an input
stream greater than output framerate (ex: 60fps in, 30 fps out).

The problem that would happen is that we would timeout, but then buffers from
the fast input stream would only be popped out one by one.... until a buffer
reaches the low-framerate input stream at which point they would quickly be
popped out/used. The resulting output would be "slow ... fast ... slow ... fast"
of that input fast stream.

In order to avoid this situation, whenever we detect a late buffer, check if
there's a next one and re-check with that one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/990>

3 years agocompositor/blend.c: fix MT checker pattern
Mathieu Duponchelle [Tue, 29 Dec 2020 22:44:42 +0000 (23:44 +0100)]
compositor/blend.c: fix MT checker pattern

When filling the checker pattern from multiple threads, y_start
needs to be taken into account to determine the shade of the
current pixel.

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=I420 ! videoconvert ! \
  xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>

3 years agocompositor/blend.c: fix MT fill_checker for YUY2
Mathieu Duponchelle [Tue, 29 Dec 2020 22:42:08 +0000 (23:42 +0100)]
compositor/blend.c: fix MT fill_checker for YUY2

The initial byte offset should be calculated from the stride,
not from the dest_add variable

Example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=YUY2 ! \
  queue ! compositor sink_0::xpos=200 ! video/x-raw, format=YUY2 ! xvimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>

3 years agocompositor/blend: fix blending of subsampled components
Mathieu Duponchelle [Tue, 29 Dec 2020 19:24:51 +0000 (20:24 +0100)]
compositor/blend: fix blending of subsampled components

The correct way to determine the byte offset at a certain yoffset
in a subsampled component is to shift the yoffset by the component's
hsub

This fixes out-of-bounds memory accesses and visible artefacts,
example pipeline with the samples from #802:

gst-launch-1.0 compositor name=vmixer sink_1::xpos=1910 sink_1::ypos=1080 ! \
    videoconvert ! videorate ! xvimagesink \
  filesrc location=VID_20200723_203606.mp4 ! decodebin name=demux1 ! \
    queue ! videoflip method=vertical-flip ! vmixer. \
  filesrc location=bridgeoverstubbledwater.mp4 ! decodebin name=demux2 ! \
    queue ! vmixer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>

3 years agodecodebin3: When reconfiguring a slot make sure that the ghostpad is unlinked
Sebastian Dröge [Thu, 24 Dec 2020 09:44:27 +0000 (11:44 +0200)]
decodebin3: When reconfiguring a slot make sure that the ghostpad is unlinked

This was only taken care of previously if there was a decoder before.
However if previously a decoder was not needed then the ghostpad
would've been linked directly to the slot's srcpad.

Reconfiguring the slot requires this to be undone so that linking can
happen normally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/985>

3 years agoexamples: overlay: Add an example for Win32 window handle with playbin
Seungha Yang [Sun, 20 Dec 2020 13:35:45 +0000 (22:35 +0900)]
examples: overlay: Add an example for Win32 window handle with playbin

Demonstrate video overlay handling on Windows when playbin is in use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/983>