platform/upstream/gstreamer.git
2 years agovalidate: Change IssueId type to guint32
Philippe Normand [Wed, 2 Mar 2022 12:52:37 +0000 (12:52 +0000)]
validate: Change IssueId type to guint32

Which is a bit more bindings-friendly.

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

2 years agovalidate: ssim: Respect requested dump recurrence parameter
Philippe Normand [Wed, 2 Mar 2022 10:54:17 +0000 (10:54 +0000)]
validate: ssim: Respect requested dump recurrence parameter

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

2 years agovalidate: Keep scenario alive enough when executing actions
Philippe Normand [Wed, 2 Mar 2022 10:27:10 +0000 (10:27 +0000)]
validate: Keep scenario alive enough when executing actions

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

2 years agovalidate: Introspection annotation cleanups
Philippe Normand [Wed, 2 Mar 2022 13:11:43 +0000 (13:11 +0000)]
validate: Introspection annotation cleanups

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

2 years agovalidate: Fix padding and constants
Philippe Normand [Mon, 28 Feb 2022 10:58:41 +0000 (10:58 +0000)]
validate: Fix padding and constants

Without this the Rust -sys validate crate tests don't pass.

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

2 years agovalidate: Expose all public headers in main header
Philippe Normand [Mon, 28 Feb 2022 10:57:55 +0000 (10:57 +0000)]
validate: Expose all public headers in main header

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

2 years agovalidate: Fix pkgconfig name
Philippe Normand [Mon, 28 Feb 2022 10:56:59 +0000 (10:56 +0000)]
validate: Fix pkgconfig name

Making it consistent with the reset of GStreamer. This also means that
anyone wanting to target -validate >= 1.22 needs to change the way they
link against it.

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

2 years agortpjitterbuffer: Fix invalid memory access in rtp_jitter_buffer_pop()
Sangchul Lee [Tue, 15 Mar 2022 06:44:17 +0000 (15:44 +0900)]
rtpjitterbuffer: Fix invalid memory access in rtp_jitter_buffer_pop()

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

2 years agodocumentation: improve misleading wording
Vivienne Watermeier [Wed, 23 Feb 2022 16:39:18 +0000 (17:39 +0100)]
documentation: improve misleading wording

The documentation for several gst_*_writable_structure functions stated
that they would never return NULL, without making clear that the passed
object is required to be writable. This changes the wording in those
cases to make that requirement more clear.

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

2 years agoccconverter: drop data with a warning if scratch buffers overflow
Matthew Waters [Thu, 17 Mar 2022 02:36:25 +0000 (13:36 +1100)]
ccconverter: drop data with a warning if scratch buffers overflow

Instead of asserting which could bring down the entire application.

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

2 years agov4l2videodec: set frame duration according to framerate
Hou Qi [Mon, 14 Mar 2022 08:19:33 +0000 (16:19 +0800)]
v4l2videodec: set frame duration according to framerate

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

2 years agouri: Build doubly-linked list by prepending items
Philippe Normand [Thu, 10 Mar 2022 18:22:49 +0000 (18:22 +0000)]
uri: Build doubly-linked list by prepending items

As outlined in the API documentation, g_list_append() iterates over the whole
list, which can quickly introduce performance issues when the list becomes very
big, such as for data URIs for instance.

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

2 years agotypefind: Skip parsing of data URIs
Philippe Normand [Tue, 8 Mar 2022 12:04:41 +0000 (12:04 +0000)]
typefind: Skip parsing of data URIs

Commit a46ab2ced20d757e0e770d4de1edc3a152cc4f2f introduced a regression,
breaking typefinding for media content muxed in mp4 container and serialized to
data URIs. For this case it doesn't make sense to look for a file extension, so
skip URI parsing.

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

2 years agobasesink: Fix annotations
Corentin Noël [Tue, 15 Mar 2022 13:00:06 +0000 (14:00 +0100)]
basesink: Fix annotations

We should annotate the Class and not the object itself.

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

2 years agogst-plugins-base: Fix several annotations
Corentin Noël [Tue, 15 Mar 2022 12:59:16 +0000 (13:59 +0100)]
gst-plugins-base: Fix several annotations

Add annotations for virtual methods when possible.

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

2 years agovalidate: Fix typo in get_reports
Corentin Noël [Tue, 15 Mar 2022 12:57:11 +0000 (13:57 +0100)]
validate: Fix typo in get_reports

Return without s isn't taken into account for the introspection.

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

2 years agortspsrc: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer
Tim-Philipp Müller [Tue, 15 Mar 2022 13:49:09 +0000 (13:49 +0000)]
rtspsrc: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer

When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

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

2 years agortpbin: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer
Tim-Philipp Müller [Tue, 15 Mar 2022 11:56:28 +0000 (11:56 +0000)]
rtpbin: proxy new "add-reference-timestamp-meta" property from rtpjitterbuffer

When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

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

2 years agortpjitterbuffer: add "add-reference-timestamp-meta" property
Tim-Philipp Müller [Tue, 15 Mar 2022 01:35:17 +0000 (01:35 +0000)]
rtpjitterbuffer: add "add-reference-timestamp-meta" property

When syncing to an RFC7273 clock this will add the original
reconstructed reference clock timestamp to buffers in form
of a GstReferenceTimestampMeta.

This is useful when we want to process or analyse data based
on the original timestamps untainted by any local adjustments,
for example reconstruct AES67 audio streams with sample accuracy.

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

2 years agowpe: Reintroduce persistent WebContext
Philippe Normand [Fri, 11 Mar 2022 17:02:55 +0000 (17:02 +0000)]
wpe: Reintroduce persistent WebContext

A WebContext leak was introduced in MR
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252.
If we wanted one WebContext per WebView we should also unref the
WebKitWebContext when destroying the WebView.

This patch reintroduces the persistent WebContext, initially part of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1484.

Fixes #1084

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

2 years agoopusenc: change default bitrate-type from cbr to constrained-vbr
Tim-Philipp Müller [Thu, 16 Dec 2021 18:41:38 +0000 (18:41 +0000)]
opusenc: change default bitrate-type from cbr to constrained-vbr

Which is the default in libopus itself as well, with a comment
that constrained-vbr is considered "safer for real-time use".

Unclear why CBR was the default in the first place.

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

2 years agowebrtcbin: fix deadlock when setting up FEC encoder
Mathieu Duponchelle [Tue, 15 Mar 2022 23:05:19 +0000 (00:05 +0100)]
webrtcbin: fix deadlock when setting up FEC encoder

We bind transceivers' fec_percentage property to the FEC encoder
percentage property, and with the binding bidirectional a deadlock
was introduced by the latest changes from !1762:

We take hold of the transceiver's object lock, then add the binding
and set the property to its initial value on the encoder, which causes
set_property to deadlock in the transceiver when the binding kicks in.

Changing the binding type to DEFAULT (source to target) is enough
to address the deadlock and still serves the original intent.

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

2 years agodoc: handy-elements: fix audiotestsrc description
MGlolenstine [Tue, 15 Mar 2022 15:01:39 +0000 (15:01 +0000)]
doc: handy-elements: fix audiotestsrc description

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

2 years agowebrtcbin: Check data channel transport for notifying 'ice-gathering-state'
Sangchul Lee [Thu, 10 Mar 2022 10:22:52 +0000 (19:22 +0900)]
webrtcbin: Check data channel transport for notifying 'ice-gathering-state'

Previously, it did not care about data channel's. It is fixed by adding
some conditions.

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

2 years agortpbuffer: The out args for rtp extension data are optional
Nirbheek Chauhan [Tue, 15 Mar 2022 07:27:49 +0000 (12:57 +0530)]
rtpbuffer: The out args for rtp extension data are optional

The code checks that these are != NULL before dereferencing them.

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

2 years agov4l2videodec: safely retrun from video_dec_loop with stream unlock
Hou Qi [Tue, 15 Mar 2022 01:49:59 +0000 (09:49 +0800)]
v4l2videodec: safely retrun from video_dec_loop with stream unlock

This is to avoid decoder hang when doing trick play between
different resolutions.

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

2 years agortpjitterbuffer: Improve accuracy of RFC7273 clock time calculations
Sebastian Dröge [Mon, 14 Mar 2022 11:59:37 +0000 (13:59 +0200)]
rtpjitterbuffer: Improve accuracy of RFC7273 clock time calculations

Previously the result of the calculations included inaccuracies caused
by the NTP clock estimation, which caused the timestamps to jitter
+/- 1/clockrate.

By reorganizing the calculations it is possible to get rid of this
inaccuracy and calculate deterministic and exact packet timestamps based
on the actual NTP clock as long as the estimation is not off by more
than 2**31 clockrate units.

The only remaining inaccuracy that is introduced now is caused by the
conversion from the NTP clock to the pipeline clock.

Also split up debug output, demote many messages to the trace debug
level and output more intermediate results.

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

2 years agotwcc: Add some logging to debug TWCC feedback
Nirbheek Chauhan [Mon, 14 Mar 2022 06:59:04 +0000 (12:29 +0530)]
twcc: Add some logging to debug TWCC feedback

This should allow people to debug when TWCC feedback is not enabled
because they haven't set the extmap in the caps.

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

2 years agotwcc: Note that packet-loss-pct can count reordering as loss
Nirbheek Chauhan [Mon, 14 Mar 2022 08:15:36 +0000 (13:45 +0530)]
twcc: Note that packet-loss-pct can count reordering as loss

This is difficult to encounter in ordinary networks, but is
encountered when using tc-netem to add random delays to packets, and
also when your UDP stream is bonded over multiple links with varying
characteristics.

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

2 years agonvcodec: Move CUDA <-> GL, D3D11, NVMM copy function to utils
Seungha Yang [Sun, 13 Mar 2022 16:19:53 +0000 (01:19 +0900)]
nvcodec: Move CUDA <-> GL, D3D11, NVMM copy function to utils

This method can be used in other elements as well.

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

2 years agonvh265sldec: Add support for delayed output
Seungha Yang [Fri, 11 Mar 2022 16:12:25 +0000 (01:12 +0900)]
nvh265sldec: Add support for delayed output

Delay 4 frames in case of non-live to improve throughput

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

2 years agoh265decoder: Add support for delayed output
Seungha Yang [Sat, 12 Mar 2022 12:54:45 +0000 (21:54 +0900)]
h265decoder: Add support for delayed output

Functionally identical to the other decoder baseclasses.
Delayed output can improve throughput depending on decoding APIs.

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

2 years agoh265decoder: Update documentation
Seungha Yang [Fri, 11 Mar 2022 15:53:04 +0000 (00:53 +0900)]
h265decoder: Update documentation

Sync up with other baseclasses

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

2 years agoh265decoder: Drain decoder on new_sequence()
Seungha Yang [Fri, 11 Mar 2022 19:45:22 +0000 (04:45 +0900)]
h265decoder: Drain decoder on new_sequence()

Holding previously decoded but not outputted pictures even after
new_sequence is not a safe approach in various aspect.
However, we cannot drain out DPB on new_sequence() unconditionally,
because there is a case where decoder should drop decoded pictures
if NoOutputOfPriorPicsFlag is set.

To detect NoOutputOfPriorPicsFlag before the new_sequence() call,
this patch splits decoding process into two path, one for nal unit parsing
in order to detect NoOutputOfPriorPicsFlag and then each nal unit
will be decoded.

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

2 years agoh265decoder: Remove unused pts variable
Seungha Yang [Fri, 11 Mar 2022 18:15:48 +0000 (03:15 +0900)]
h265decoder: Remove unused pts variable

We can know timestamp from associated GstVideoCodecFrame

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

2 years agoconvertframe: Add support for GL-memory backend GstFrame input
Bastien Nocera [Thu, 10 Mar 2022 09:25:53 +0000 (10:25 +0100)]
convertframe: Add support for GL-memory backend GstFrame input

Add "gldownload" early in the pipeline so that GL-memory backed raw
frames can be downloaded and processed on the CPU.

Closes: #1073
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1916>

2 years agortprtxsend: don't require clock-rate in caps
Havard Graff [Fri, 11 Aug 2017 14:33:23 +0000 (16:33 +0200)]
rtprtxsend: don't require clock-rate in caps

For multiplexing, the rtpstreams you are multiplexing might not use
the same clock-rate.

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

2 years agortprtxsend: don't start the task unless we are doing rtx
Havard Graff [Fri, 4 Nov 2016 10:47:20 +0000 (11:47 +0100)]
rtprtxsend: don't start the task unless we are doing rtx

The rtxsend element can do pass-through when not enabled (no pt-map set)
and in those cases there is no point in starting an additional task
that does absolutely nothing.

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

2 years agoBump Meson requirement to >=0.60.0
Xavier Claessens [Mon, 14 Mar 2022 12:56:16 +0000 (08:56 -0400)]
Bump Meson requirement to >=0.60.0

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

2 years agoMeson: Set install_tag on some files
Xavier Claessens [Fri, 11 Mar 2022 23:08:14 +0000 (18:08 -0500)]
Meson: Set install_tag on some files

Meson tries to guess the tag (runtime, devel, etc) for every installed
file, but it cannot guess them all. There is a list at the end of
meson-log.txt of files we need to tag manually.

See https://mesonbuild.com/Installing.html#installation-tags.

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

2 years agortprtxreceive: add ssrc-map property
Havard Graff [Mon, 27 Jun 2016 12:28:06 +0000 (14:28 +0200)]
rtprtxreceive: add ssrc-map property

Mirroring the rtxsend, this allows the application to "pre-map" the
retransmission-ssrcs to the "real" ssrc, if this information is known.

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

2 years agompg123: Add gapless playback support
Carlos Rafael Giani [Sun, 8 Sep 2019 13:54:08 +0000 (15:54 +0200)]
mpg123: Add gapless playback support

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>

2 years agoavaudenc: Add support for AV_PKT_DATA_SKIP_SAMPLES side data
Sebastian Dröge [Tue, 5 Oct 2021 10:43:50 +0000 (13:43 +0300)]
avaudenc: Add support for AV_PKT_DATA_SKIP_SAMPLES side data

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

2 years agoavauddec: Add clipping meta support for gapless playback
Carlos Rafael Giani [Tue, 10 Sep 2019 15:30:07 +0000 (17:30 +0200)]
avauddec: Add clipping meta support for gapless playback

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>

2 years agompegaudioparse: Support gapless playback
Carlos Rafael Giani [Sat, 7 Sep 2019 17:15:42 +0000 (19:15 +0200)]
mpegaudioparse: Support gapless playback

Gapless playback is handled by adjusting buffer timestamps & durations
and by adding GstAudioClippingMeta.

Support for "Frankenstein" streams (= poorly stitched together streams)
is also added, so that gapless playback support doesn't prevent those
from being properly played.

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1028>

2 years agodeinterlace: scalerbob: Reduce latency to 0
Jan Alexander Steffens (heftig) [Fri, 11 Mar 2022 09:32:42 +0000 (10:32 +0100)]
deinterlace: scalerbob: Reduce latency to 0

We only need the current field, just like `linear`.

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

2 years agoyadif: Fix CHECK macro for YUY2 format
Vivia Nikolaidou [Sat, 12 Mar 2022 15:13:48 +0000 (17:13 +0200)]
yadif: Fix CHECK macro for YUY2 format

Used to make comb artifacts for videotestsrc pattern=ball for YUY2
format only (not AYUV).

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

2 years agonvenc: Fix deadlock because of too strict buffer pool size
Seungha Yang [Sat, 12 Mar 2022 15:17:48 +0000 (00:17 +0900)]
nvenc: Fix deadlock because of too strict buffer pool size

The pool size might need to be larger than encoding surface pool size.
Also, because we always copy input frame into internal CUDA memory,
there's no reason to restrict max size of buffer pool.

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

2 years agova: Fix a regression because of "Invert video codec frame dependency".
He Junyan [Sat, 12 Mar 2022 02:31:13 +0000 (10:31 +0800)]
va: Fix a regression because of "Invert video codec frame dependency".

1. Always set the according GstVaH264EncFrame pointer when GstVideoCodecFrame
   pointer is assigned, which can make the logic safe.
2. Fix the forgotten change in _sort_by_frame_num. Its input pointer now is
   GstVideoCodecFrame type.

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

2 years agocodecs: Rename picture clear functions
Seungha Yang [Tue, 8 Mar 2022 18:45:18 +0000 (03:45 +0900)]
codecs: Rename picture clear functions

Our convention for clear method is gst_clear_foo_bar().

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

2 years agowindows: increase the timeout to create the windows docker image
Andoni Morales Alastruey [Fri, 11 Mar 2022 10:27:15 +0000 (11:27 +0100)]
windows: increase the timeout to create the windows docker image

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

2 years agoci: force a new windows image to update cerbero's bootstrap
Andoni Morales Alastruey [Wed, 9 Mar 2022 22:53:25 +0000 (23:53 +0100)]
ci: force a new windows image to update cerbero's bootstrap

See:https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/743#note_1270646

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

2 years agonvh265sldec: Always fill SPS/PPS related parameters
Seungha Yang [Fri, 11 Mar 2022 14:20:26 +0000 (23:20 +0900)]
nvh265sldec: Always fill SPS/PPS related parameters

Address compare was not a valid approach since it works
only if SPS/PPS id are changed. Otherwise it will always point to
the same address of member variables of h265parser.

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

2 years agodoc: New cropping parameters added to v4l2src
Damian Hobson-Garcia [Thu, 10 Mar 2022 08:03:45 +0000 (17:03 +0900)]
doc: New cropping parameters added to v4l2src

v4l2src add several new parameters to control cropping of
the captured video stream.  Update the doc cache to reflect
this.

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

2 years agoexamples: v4l2: Add v4l2src crop example
Damian Hobson-Garcia [Fri, 15 Oct 2021 09:33:50 +0000 (18:33 +0900)]
examples: v4l2: Add v4l2src crop example

Add a simple utility to illustrate how to set input cropping on v4l2src.

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

2 years agov4l2src: Add support for cropping at capture source input
Damian Hobson-Garcia [Thu, 14 Oct 2021 08:22:19 +0000 (17:22 +0900)]
v4l2src: Add support for cropping at capture source input

Add properties to control input cropping in the V4L2 device.
The input cropping is applied before composing the result to the
capture buffer.  By default the capture size will be set to the same
size as the crop region, but it can be scaled to a different output
frame size if supported by the V4L2 device.
If scaling is not supported, the cropped image will
be composed as is into the top-left corner of the capture buffer.

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

2 years agov4l2object: Add function to get crop regions from device
Damian Hobson-Garcia [Wed, 13 Oct 2021 08:33:12 +0000 (17:33 +0900)]
v4l2object: Add function to get crop regions from device

Get the current crop bounding region from the V4L2 device so
that it can be provided to applications and used to validate
crop settings. Also make the default crop region available so
that it can be used to reset the crop when appropriate.

Uses the selection API when available with fallback to the crop
API for older kernels.

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

2 years agov4l2object: rename crop function to reflect its usage
Damian Hobson-Garcia [Thu, 30 Sep 2021 08:56:56 +0000 (17:56 +0900)]
v4l2object: rename crop function to reflect its usage

The gst_v4l2_object_set_crop() is used for removing buffer
alignment padding. Give it a name that better reflects
that usage.  This helps to distinguish from cropping of the
input image (e.g. cropping at the image sensor on a captre
device), which can be  unrelated to the memory buffer padding,
especially if scaling is involved.

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

2 years agoplaybin3: Remove stale code
Jan Schmidt [Tue, 1 Mar 2022 16:45:48 +0000 (03:45 +1100)]
playbin3: Remove stale code

Remove now-unused get_stream_type_for_event() function.

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

2 years agodecodebin3: Reset parsebin when new caps arrive
Edward Hervey [Fri, 21 Jan 2022 15:23:38 +0000 (16:23 +0100)]
decodebin3: Reset parsebin when new caps arrive

Check if parsebin can handle the new caps, and if not reset it so that it can
reconfigure itself for the new stream format.

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

2 years agodecodebin3: Convert checks to assertions
Edward Hervey [Wed, 9 Mar 2022 09:15:08 +0000 (10:15 +0100)]
decodebin3: Convert checks to assertions

"decodebin.input" is never resetted and should always be present, therefore make
it an assertion check

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

2 years agoparsebin: Implement ACCEPT_CAPS handling
Edward Hervey [Fri, 21 Jan 2022 13:52:07 +0000 (14:52 +0100)]
parsebin: Implement ACCEPT_CAPS handling

The default query handler would go through typefind, which by default accepts
any CAPS. But once configured, parsebin can't reconfigure itself, it should
therefore pass through the ACCEPT_CAPS query to the first element after
typefind (if any).

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

2 years agoplaybin3: Hold playbin lock on pad-added
Jan Schmidt [Mon, 17 Jan 2022 18:48:08 +0000 (05:48 +1100)]
playbin3: Hold playbin lock on pad-added

Take the playbin lock when accessing the combiner
to add a new pad to link to. Fixes races against
streams-selected messages triggering reconfiguration.

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

2 years agoplaybin3: Reconfigure on streams-selected message.
Jan Schmidt [Mon, 17 Jan 2022 15:52:47 +0000 (02:52 +1100)]
playbin3: Reconfigure on streams-selected message.

Don't reconfigure outputs when the select-streams
event is sent from the app, as the selection may
not take effect for some time. Instead, wait
for the pipeline to confirm the new set of
selected streams when it sends the message.

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

2 years agoplaysink: Fix reconfiguration after removing text_sink
Jan Schmidt [Wed, 10 Nov 2021 16:20:23 +0000 (03:20 +1100)]
playsink: Fix reconfiguration after removing text_sink

If we previously had subtitles coming in, the video
may be chained through a text overlay block. Before,
the code would end up trying to link pads that were
already linked and video would not get reconnected
properly.

To fix that, make sure that the candidate
pads are actually unlinked first. If a textoverlay
is present and no longer needed, it will be cleaned
up later in the reconfiguration sequence.

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

2 years agoplaysink: Complete reconfiguration on pad release.
Jan Schmidt [Fri, 6 Aug 2021 09:27:02 +0000 (19:27 +1000)]
playsink: Complete reconfiguration on pad release.

Requesting a new pad can start a reconfiguration cycle, where
playsink will block all input pads and wait for data on them
before doing internal reconfiguration. If a pad is released,
that reconfiguration might never trigger because it's now waiting
for a pad that doesn't exist any more.

In that case, complete the reconfiguration on pad release.

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

2 years agoh264decoder: Fix invalid memory access
Seungha Yang [Fri, 11 Mar 2022 10:32:59 +0000 (19:32 +0900)]
h264decoder: Fix invalid memory access

gst_h264_dpb_needs_bump() can be called with null picture
in case of live

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

2 years agortponviftimestamp: add support for using reference timestamps
Branko Subasic [Thu, 10 Feb 2022 07:01:02 +0000 (08:01 +0100)]
rtponviftimestamp: add support for using reference timestamps

Make it posible to configure the element to obtain the timestamps from
reference timestamp meta data instead of using the ntp-offset property,
or estimating its own offset. Currently the only time format supported
is "timestamp/x-unix", i.e. UTC time expressed in the unix time epoch.

In addition the custom event GstNtpOffset has been renamed to
GstOnvifTimestamp, to reflect that it is not necessarily used to convey
the ntp-offset. As a consequence we had to modify a couple of files in
the rtsp-server as well.

Fixes #984

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

2 years agopbutils: Add function to parse RFC 6381 codecs field
Edward Hervey [Tue, 8 Mar 2022 08:46:33 +0000 (09:46 +0100)]
pbutils: Add function to parse RFC 6381 codecs field

This is the opposite of `gst_codec_utils_caps_get_mime_codec()`, which allows
elements to get the `GstCaps`

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

2 years agosdpdemux: add media attributes to caps to fix ptp clock handling
Tim-Philipp Müller [Thu, 10 Mar 2022 18:40:12 +0000 (18:40 +0000)]
sdpdemux: add media attributes to caps to fix ptp clock handling

Those are needed by rtpjitterbuffer to do the right thing, e.g.

a=ts-refclk:ptp=IEEE1588-2008:00-**-**-**-**-**-**-**:0
a=mediaclk:direct=1266592257

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

2 years agortpvp8depay: Fix crash when making 'GstRTPPacketLost' custom event
Sangchul Lee [Thu, 10 Mar 2022 09:43:45 +0000 (18:43 +0900)]
rtpvp8depay: Fix crash when making 'GstRTPPacketLost' custom event

This patch fixes a seg.fault in gst_structure_new() with warnings as below.

GLib-GObject-WARNING **:
 ../gobject/gtype.c:4330: type id '0' is invalid
GLib-GObject-WARNING **:
 can't peek value table for type '<invalid>' which is not currently referenced

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

2 years agocudamemorycopy: add D3D11 resource support
Corentin Damman [Tue, 8 Mar 2022 15:20:27 +0000 (16:20 +0100)]
cudamemorycopy: add D3D11 resource support

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

2 years agocudacontext: find associated DXGI Adapter LUID
Corentin Damman [Wed, 9 Mar 2022 08:35:16 +0000 (09:35 +0100)]
cudacontext: find associated DXGI Adapter LUID

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

2 years agocudautils: add support of D3D11 resource as Cuda graphics resource type
Corentin Damman [Mon, 28 Feb 2022 13:40:51 +0000 (14:40 +0100)]
cudautils: add support of D3D11 resource as Cuda graphics resource type

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

2 years agocudaloader: add D3D11 API
Corentin Damman [Mon, 28 Feb 2022 10:24:31 +0000 (11:24 +0100)]
cudaloader: add D3D11 API

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

2 years agompegts: Handle glib < 2.58
Edward Hervey [Thu, 10 Mar 2022 09:33:56 +0000 (10:33 +0100)]
mpegts: Handle glib < 2.58

By using a workaround to the lack of g_ptr_array_steal_index.

Fixes #1078

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

2 years agowebrtcbin: fix ulpfecenc passthrough pt
Matthew Waters [Thu, 10 Mar 2022 04:36:00 +0000 (15:36 +1100)]
webrtcbin: fix ulpfecenc passthrough pt

ulpfecenc uses a value of pt=255 for passthrough.

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

2 years agonvh264dec,nvh265dec: Fix broken key-unit trick and reverse playback
Seungha Yang [Wed, 9 Mar 2022 17:28:11 +0000 (02:28 +0900)]
nvh264dec,nvh265dec: Fix broken key-unit trick and reverse playback

On GstVideoDecoder::{drain,flush}, we send null packet with
CUVID_PKT_ENDOFSTREAM flag to drain out decoder. Which will
reset CUVID parser as well.
To continue decoding after the drain, the next input buffer
should include sequence headers otherwise CUVID parser will
not report any decodeable frame.

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

2 years agortpbasepayload: Remove dead twcc code
Nirbheek Chauhan [Wed, 9 Mar 2022 10:32:06 +0000 (16:02 +0530)]
rtpbasepayload: Remove dead twcc code

This feature was removed in 7a53fbad68d702ca4905f7da223f4d2884548edc,
but this code was left behind.

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

2 years agortpbin: allow FEC elements with Always pads
Tomasz Andrzejak [Fri, 4 Mar 2022 17:58:56 +0000 (18:58 +0100)]
rtpbin: allow FEC elements with Always pads

This patch enable picking up FEC decoder or enocder that have
static repair packets pad.

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

2 years agosoup: Load the runtime library, not the development library
Nirbheek Chauhan [Wed, 9 Mar 2022 06:47:11 +0000 (12:17 +0530)]
soup: Load the runtime library, not the development library

libsoup-2.4.so / libsoup-3.0.so are symlinks installed by development
packages, they are not available at runtime.

Also eliminate G_MODULE_SUFFIX since it's not useful for us, and is
actually incorrect on macOS anyway.

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

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

2 years agosubparse: Handle GAP events before buffers
Edward Hervey [Tue, 14 Dec 2021 15:14:56 +0000 (16:14 +0100)]
subparse: Handle GAP events before buffers

Make sure we did initial negotiation and segment pushing if we get GAP events
before buffers.

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

2 years agotagdemux: Properly propagate sequence numbers
Edward Hervey [Wed, 17 Nov 2021 14:30:38 +0000 (15:30 +0100)]
tagdemux: Properly propagate sequence numbers

If we received a time segment from upstream, we need to make sure we propagate
it downstream with the same sequence number.

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

2 years agotsbase: Handle more program updates
Edward Hervey [Tue, 2 Nov 2021 08:20:55 +0000 (09:20 +0100)]
tsbase: Handle more program updates

There could be a case where the new program has the same program number as the
previous one ... but is actually located on a PID previously used for elementary
stream. In that case the program is guaranteed to not be an update of the
previous program but a completely new one.

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

2 years agompegtsbase: Use an array to track programs
Edward Hervey [Tue, 2 Nov 2021 08:18:57 +0000 (09:18 +0100)]
mpegtsbase: Use an array to track programs

We need to be able to look for programs by their PID also. Using a hash table
was a bit sub-par (and overkill) for storing a range of programs.

This is needed because there could potentially be two programs with the same
program id but different PMT PID (while one is being deactivated the new one
would "exist").

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

2 years agomultiqueue: Fix interleave calculation for data before segment start
Edward Hervey [Wed, 2 Mar 2022 16:07:37 +0000 (17:07 +0100)]
multiqueue: Fix interleave calculation for data before segment start

This commit modifies the interleave calculation to allow growing when incoming
data is before the segment start.

The rationale is that there is no requirement whatsoever for data before the
segment start to be "coherent" on all streams.

For example, a demuxer could rightfully send data from the video stream from the
previous keyframe (potentially quite a bit before the segment start) and the
audio from just before the segment start.

This will activate the same logic as growing the interleave when some streams
haven't received buffers yet.

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

2 years agomultiqueue: Improve interleave calculation at startup and EOS
Edward Hervey [Fri, 6 Aug 2021 06:30:39 +0000 (08:30 +0200)]
multiqueue: Improve interleave calculation at startup and EOS

* When a stream receives EOS, it will no longer change, we shouldn't take that
  stream into account for interleave calculation.

* When streams (re)appear, we do not want to grow the initial interleave values
  to excessive values. Instead of setting it to a default of 5s, progressively
  grow it to that maximum.

* When the status of input streams change (i.e. going to/from "some haven't
received data yet" and "all have received data"), update the interleave
immediately instead of waiting for (potentially) 5s of data before updating
it.

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

2 years agogst-python: gstmodule.c: fix build with 3.11
Mathieu Duponchelle [Fri, 4 Feb 2022 14:53:45 +0000 (15:53 +0100)]
gst-python: gstmodule.c: fix build with 3.11

https://docs.python.org/fr/3.10/whatsnew/3.10.html

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

2 years agoqtdemux: Propagate stick events downstream when creating pads
Edward Hervey [Wed, 10 Jul 2019 15:21:01 +0000 (17:21 +0200)]
qtdemux: Propagate stick events downstream when creating pads

If upstream provided a stream collection event before any pads were created,
make sure it's propagated downstream when pads are created.

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

2 years agortprtxsend: if no rtx is present, don't expose a rtx-ssrc in caps
Havard Graff [Mon, 1 Feb 2021 15:07:08 +0000 (16:07 +0100)]
rtprtxsend: if no rtx is present, don't expose a rtx-ssrc in caps

The point here is that rtpsession will create a new rtpsource when
the field "rtx-ssrc" is present, and when not doing rtx, that means
a random ssrc will create a new rtpsource that will be included in RTCP
messages for the current session.

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

2 years agovah264enc: Invert video codec frame dependency.
Víctor Manuel Jáquez Leal [Fri, 4 Mar 2022 12:19:17 +0000 (13:19 +0100)]
vah264enc: Invert video codec frame dependency.

Instead of using GstMiniObject to hold H264 frame, now it uses a plain
structure. Besides, instead of holding a reference to
GstVideoCodecFrame, the H264 frame structure is set as a
GstVideoCodecFrame user data.

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

2 years agovaapih265dec: fixed st_rps_bits setting in h265 decoding.
GuYanjie [Tue, 8 Mar 2022 06:54:34 +0000 (14:54 +0800)]
vaapih265dec: fixed st_rps_bits setting in h265 decoding.

According to va_dec_hevc.h, pic_param->st_rps_bits should be set
for accelorater to skip parsing the *short_term_ref_pic_set
(num_short_term_ref_pic_sets) structure.
Also modified fill_picture to get parser info as a parameter,
in order to get slide_hdr->short_term_ref_pic_set_size.

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

2 years agortprtxsend: don't process or warn if no map is set
Havard Graff [Wed, 22 Jun 2016 12:48:59 +0000 (14:48 +0200)]
rtprtxsend: don't process or warn if no map is set

This makes it more gentle when doing "pass-through"

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

2 years agocudamemorycopy: Fix GL resource leak
Seungha Yang [Tue, 8 Mar 2022 17:14:50 +0000 (02:14 +0900)]
cudamemorycopy: Fix GL resource leak

Clear GL resources on stop()

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

2 years agoplaybin3: Add lock to protect buffering messages
Jan Schmidt [Tue, 1 Mar 2022 16:43:00 +0000 (03:43 +1100)]
playbin3: Add lock to protect buffering messages

Fix a small race where a group can receive stream-start
and post a pending buffering message just as another
thread posts a different buffering message, causing them
to be received by the application out of order. In the
worst case, this leads the application receiving a
stale 99% buffering message and going back to buffering
right after the 100% buffering message.

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

2 years agogstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly
Jakub Adam [Tue, 7 Jul 2020 13:21:24 +0000 (15:21 +0200)]
gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly

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

2 years agogstreamer-sharp: Fix App{Src,Sink} constructors
Jakub Adam [Mon, 6 Jul 2020 21:15:22 +0000 (23:15 +0200)]
gstreamer-sharp: Fix App{Src,Sink} constructors

Apparently GtkSharp expects each object has only one ToggleRef at any
time. Assigning element.Handle into Raw has a consequence that second
ToggleRef attempts to get created but fails on g_object_unref () that
breaks a GObject assertion:

  toggle_refs_notify: assertion failed: (tstack.n_toggle_refs == 1)

This is because toggle references should be removed with
g_object_remove_toggle_ref(), not a simple unref().

In order to avoid duplicate toggle references, introduce
ElementFactory.MakeRaw(), which creates a GstElement without its
accompanying C# object. The returned raw pointer can be assigned into
another GLib.Object without trouble.

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

2 years agompegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
Jan Alexander Steffens (heftig) [Mon, 7 Mar 2022 17:46:55 +0000 (18:46 +0100)]
mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE

And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

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

2 years agompegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset
Jan Alexander Steffens (heftig) [Mon, 7 Mar 2022 17:46:08 +0000 (18:46 +0100)]
mpegtsmux: Use GST_CLOCK_STIME_NONE for output_ts_offset

It's a GstClockTimeDiff, thus GST_CLOCK_TIME_NONE isn't appropriate.

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

2 years agodecklink: Update SDK version to 12.2.2
Seungha Yang [Mon, 7 Mar 2022 16:26:50 +0000 (01:26 +0900)]
decklink: Update SDK version to 12.2.2

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