platform/upstream/gstreamer.git
2 years agoMove files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir
Thibault Saunier [Fri, 24 Sep 2021 19:13:50 +0000 (16:13 -0300)]
Move files from gst-plugins-good into  the "subprojects/gst-plugins-good/" subdir

2 years agoMerging gst-plugins-good
Thibault Saunier [Fri, 24 Sep 2021 19:13:37 +0000 (16:13 -0300)]
Merging gst-plugins-good

2 years agoMove files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir
Thibault Saunier [Fri, 24 Sep 2021 19:13:26 +0000 (16:13 -0300)]
Move files from gst-plugins-base into  the "subprojects/gst-plugins-base/" subdir

2 years agoMerging gst-plugins-base
Thibault Saunier [Fri, 24 Sep 2021 19:13:17 +0000 (16:13 -0300)]
Merging gst-plugins-base

2 years agoMove files from gstreamer into the "subprojects/gstreamer/" subdir
Thibault Saunier [Fri, 24 Sep 2021 19:13:07 +0000 (16:13 -0300)]
Move files from gstreamer into  the "subprojects/gstreamer/" subdir

2 years agoRelease 1.19.2
Tim-Philipp Müller [Thu, 23 Sep 2021 00:33:39 +0000 (01:33 +0100)]
Release 1.19.2

2 years agoRelease 1.19.2
Tim-Philipp Müller [Thu, 23 Sep 2021 00:33:08 +0000 (01:33 +0100)]
Release 1.19.2

2 years agoRelease 1.19.2
Tim-Philipp Müller [Thu, 23 Sep 2021 00:32:32 +0000 (01:32 +0100)]
Release 1.19.2

2 years agortph263pdepay: flag keyframes on output buffers
Tim-Philipp Müller [Wed, 22 Sep 2021 13:03:57 +0000 (14:03 +0100)]
rtph263pdepay: flag keyframes on output buffers

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

2 years agoclocksync: Add some debug output to the clock waiting code
Sebastian Dröge [Wed, 23 Jun 2021 13:41:20 +0000 (16:41 +0300)]
clocksync: Add some debug output to the clock waiting code

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

2 years agopbutils: codec-utils: fix g-ir-scanner warning
Tim-Philipp Müller [Tue, 21 Sep 2021 21:39:46 +0000 (22:39 +0100)]
pbutils: codec-utils: fix g-ir-scanner warning

Warning: GstPbutils: gst_codec_utils_h264_get_profile_flags_level:
unknown parameter 'codec_data' in documentation comment, should be 'codecs_data

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

2 years agoalsasink: Allow stop() function to happen during failing writes
Nicolas Dufresne [Tue, 24 Aug 2021 19:27:32 +0000 (15:27 -0400)]
alsasink: Allow stop() function to happen during failing writes

In ALSA, there is possible temporary failures that may require a retry,
though in certain situation, this may leak to the write() function
holding on a lock forever preventing the pipeline from going to pause
or stop. Fix this by shortly dropping the lock between retries.

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

2 years agoalsasink: Improve logging in write() function
Nicolas Dufresne [Tue, 24 Aug 2021 19:26:12 +0000 (15:26 -0400)]
alsasink: Improve logging in write() function

This moves the "written X frames" lower so that we don't trace
confusing negative values on errors and add the error code in the
"Write error" log.

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

2 years agogst: Initialize optional event/message fields when parsing
Sebastian Dröge [Mon, 20 Sep 2021 10:12:12 +0000 (13:12 +0300)]
gst: Initialize optional event/message fields when parsing

These might not exist inside the structure and then we would potentially
keep around uninitialized memory from the caller in the out parameter.

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

2 years agovideodecoder: Add properties to automatically request sync points and vfunc to allow...
Sebastian Dröge [Fri, 10 Sep 2021 12:10:46 +0000 (15:10 +0300)]
videodecoder: Add properties to automatically request sync points and vfunc to allow subclasses to handle packet loss / missing data

Subclasses could use the new vfunc to activate packet loss concealment,
for example.

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

2 years agotest: bitwriter: Add a test for reset_and_get_data when not byte unaligned.
He Junyan [Sun, 19 Sep 2021 13:01:21 +0000 (21:01 +0800)]
test: bitwriter: Add a test for reset_and_get_data when not byte unaligned.

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

2 years agobitwriter: Fix a memory leak in reset_and_get_buffer.
He Junyan [Sun, 19 Sep 2021 14:39:09 +0000 (22:39 +0800)]
bitwriter: Fix a memory leak in reset_and_get_buffer.

We should record the ownership of the data before we reset the bitwriter.
Or we will always dup the buffer data and leak the memory.

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

2 years agobitwriter: Fix the trailing bits lost when getting its data.
He Junyan [Sat, 18 Sep 2021 16:19:43 +0000 (00:19 +0800)]
bitwriter: Fix the trailing bits lost when getting its data.

In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.

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

2 years agovideodecoder: Fix min-force-key-unit-interval logic and logging
Havard Graff [Fri, 10 Sep 2021 14:12:51 +0000 (16:12 +0200)]
videodecoder: Fix min-force-key-unit-interval logic and logging

The new keyframe is needed when the deadline of the buffer has exeeded
the waiting time, not while it is within it.

Also, since we look at the deadline of the frame, log that instead of PTS.

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

2 years agortphdrhext-twcc: Return failure on map failure
Olivier Crête [Wed, 18 Aug 2021 23:47:40 +0000 (19:47 -0400)]
rtphdrhext-twcc: Return failure on map failure

This feels like exactly like a case that should fail.

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

2 years agortphdrext: Update write() API to return a signed value
Olivier Crête [Wed, 18 Aug 2021 23:46:25 +0000 (19:46 -0400)]
rtphdrext: Update write() API to return a signed value

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

2 years agortphdrext: Make write function return a signed value
Olivier Crête [Wed, 18 Aug 2021 23:40:55 +0000 (19:40 -0400)]
rtphdrext: Make write function return a signed value

Since the return value is documented to possibly be smaller than 0,
then it needs to be signed.

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

2 years agovideorate: Add unit test for closing a segment and opening a separate one
Olivier Crête [Wed, 16 Jun 2021 19:07:13 +0000 (15:07 -0400)]
videorate: Add unit test for closing a segment and opening a separate one

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

2 years agovideorate: Drop incoming buffers that are outside of the segment
Olivier Crête [Wed, 16 Jun 2021 19:06:57 +0000 (15:06 -0400)]
videorate: Drop incoming buffers that are outside of the segment

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

2 years agovideorate: Only "close" the segment if it is discontinous
Olivier Crête [Fri, 24 Jul 2020 21:41:57 +0000 (17:41 -0400)]
videorate: Only "close" the segment if it is discontinous

Otherwise, it will drop valid buffers on a simple segment update

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

2 years agovideorate: Add test for segment update
Olivier Crête [Fri, 24 Jul 2020 21:38:58 +0000 (17:38 -0400)]
videorate: Add test for segment update

Continue as-is on segment update.

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

2 years agovideorate: Update the base time on segment updates
Olivier Crête [Fri, 24 Jul 2020 20:35:04 +0000 (16:35 -0400)]
videorate: Update the base time on segment updates

Dropping it to 0 makes videorate push buffers from timestamp 0 again.

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

2 years agoqtdemux: Try to build AAC codec-data whenever it's possible
Seungha Yang [Tue, 14 Sep 2021 08:26:27 +0000 (17:26 +0900)]
qtdemux: Try to build AAC codec-data whenever it's possible

AAC codec_data is a just collection of AAC profile, samplerate, and
channels. We can know samplerate and channels from parsed
SampleEntry data. Although the AAC profile is unknown there,
let's assume it as AAC-LC like we've been doing for the version 1
atom.

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

2 years agomultiqueue: fix obsolete comment re initial flow status
Mathieu Duponchelle [Thu, 9 Sep 2021 23:43:18 +0000 (01:43 +0200)]
multiqueue: fix obsolete comment re initial flow status

The initial single queue srcresult is OK, it hasn't been
NOT_LINKED since 2007.

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

2 years agomultiqueue: never consider a queue that is not waiting
Mathieu Duponchelle [Thu, 9 Sep 2021 18:25:25 +0000 (20:25 +0200)]
multiqueue: never consider a queue that is not waiting

.. when computing the high id.

After a flush for instance, sq->srcresult is reset to OK,
yet it doesn't make sense to pick a non-existing position
id as the high id when a queue doesn't contain any items
in that situation either.

It is in any case completely OK to let the not-linked stream
get consumed without throttling at this stage, as any
first packet arriving on other single queues will get assigned
a higher position id.

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

2 years agoflv: fix seqnum handling for seeks
Vivienne Watermeier [Tue, 7 Sep 2021 20:23:01 +0000 (22:23 +0200)]
flv: fix seqnum handling for seeks

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

2 years agoisomp4: also allow muxing different h264/5 profiles/levels/etc
Matthew Waters [Mon, 18 Jan 2021 05:06:27 +0000 (16:06 +1100)]
isomp4: also allow muxing different h264/5 profiles/levels/etc

All of that is advertised through the codec_data itself so can change
just fine within isomp4.

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

2 years agomatroska: Add support for muxing/demuxing ffv1
Sebastian Dröge [Sat, 11 Sep 2021 06:24:35 +0000 (09:24 +0300)]
matroska: Add support for muxing/demuxing ffv1

Previously only demuxing when stored via the RIFF/AVI mapping was
supported.

See https://github.com/FFmpeg/FFV1/blob/master/ffv1.md#matroska-file-format

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

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

2 years agodocs: Update cache
Philippe Normand [Sun, 12 Sep 2021 11:18:32 +0000 (12:18 +0100)]
docs: Update cache

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

2 years agodiscoverer: Prevent stream tags from leaking in global tags
Philippe Normand [Sun, 12 Sep 2021 09:07:49 +0000 (10:07 +0100)]
discoverer: Prevent stream tags from leaking in global tags

The PrivateStream should keep track of stream tags only. Likewise, the
GstDiscovererInfo should keep track of global tags only.

This patch fixes the issue where the discoverer would report duplicated tag
titles, especially for Matroska media files. The Matroska demuxer emits
correctly-scoped tags, but downstream was making no distinction of them.

Fixes #598, #836, https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/827

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

2 years agogl/buffer_storage: re-enable GL_ARB_buffer_storage
Matthew Waters [Thu, 9 Sep 2021 05:44:55 +0000 (15:44 +1000)]
gl/buffer_storage: re-enable GL_ARB_buffer_storage

The extension version doesn't have the ARB suffix.

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

2 years agortspconnection: Only reset timeout when socket is unused
Tobias Ronge [Tue, 7 Sep 2021 11:55:08 +0000 (13:55 +0200)]
rtspconnection: Only reset timeout when socket is unused

After sending or retrieving data, gstrtspconnection resets the socket's
timeout to 0 (infinite). This could cause problems if sending and
receiving at the same time. For example, if RTCP data is sent from the
streaming thread while gstrtspsrc is already retrieving data.

With this patch, timeout is only reset to 0 if there is no other
thread using the socket.

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

2 years agoadd missing space
Andika Triwidada [Thu, 9 Sep 2021 04:08:22 +0000 (04:08 +0000)]
add missing space

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

2 years agopbutils: Add mjpg to MIME codecs
Ludvig Rappe [Thu, 2 Sep 2021 09:55:09 +0000 (11:55 +0200)]
pbutils: Add mjpg to MIME codecs

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

2 years agojpegdec: Fix crash when interlaced field height is not DCT block size aligned
Seungha Yang [Tue, 3 Aug 2021 10:12:11 +0000 (19:12 +0900)]
jpegdec: Fix crash when interlaced field height is not DCT block size aligned

In case of interlaced JPEG file, we are doubling stride.
The scratch scan line should take account of it as well.

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

2 years agomultiqueue: Use running time of gap events for wakeups.
Jan Schmidt [Sun, 5 Sep 2021 15:43:57 +0000 (01:43 +1000)]
multiqueue: Use running time of gap events for wakeups.

Use gap events to update the next_time of a queue the same
as buffers or segment events. Fixes problems where a group
consisting only of sparse streams primarily driven by
gap events would stall with a full multiqueue because
unlinked streams in the group were not being woken to
push data.

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

2 years agodecodebin3: fix unblocking on input gap events
Mathieu Duponchelle [Sun, 1 Aug 2021 16:20:06 +0000 (18:20 +0200)]
decodebin3: fix unblocking on input gap events

Initial gap events should not be discarded on the input streams,
but instead cause unblocking just as buffers do.

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

2 years agoparsebin: Guess subtitle/ caps as text streams
Philippe Normand [Thu, 24 Jun 2021 15:00:03 +0000 (16:00 +0100)]
parsebin: Guess subtitle/ caps as text streams

The subtitles in ogg/kate are identified using subtitle/ caps names.

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

2 years agoavidemux: Also detect 0x000001 as H264 byte-stream start code in codec_data
Sebastian Dröge [Thu, 2 Sep 2021 05:38:54 +0000 (08:38 +0300)]
avidemux: Also detect 0x000001 as H264 byte-stream start code in codec_data

This works around some AVI files storing byte-stream data in the
codec_data. The previous workaround was only checking for
0x00000001 (4 bytes) instead of 0x000001 (3 bytes).

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

2 years agoqt: Fix build for Qt 5.9
Philippe Normand [Tue, 31 Aug 2021 10:05:16 +0000 (11:05 +0100)]
qt: Fix build for Qt 5.9

The QQuickItem::size() method was introduced in 5.10, so use direct width() and
height() access instead.

Fixes #908

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

2 years agortp: add some additional rtcp sdes values
Matthew Waters [Tue, 31 Aug 2021 05:31:23 +0000 (15:31 +1000)]
rtp: add some additional rtcp sdes values

Matches the current list at
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-5
as of 2021-September.

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

2 years agortphdrext-rfc6464: Add test for inserting in payloader using the API
Olivier Crête [Thu, 19 Aug 2021 14:32:27 +0000 (10:32 -0400)]
rtphdrext-rfc6464: Add test for inserting in payloader using the API

This makes it clearer how to use the plugin in an API driven application.

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

2 years agortphdrext-rfc6464: Put max level if the audio is beyond it
Olivier Crête [Wed, 18 Aug 2021 23:36:07 +0000 (19:36 -0400)]
rtphdrext-rfc6464: Put max level if the audio is beyond it

Otherwise, it just fails to add the extension, which makes no
sense. And our level element produces levels higher than 127 in some
cases.

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

2 years agortphdrext-rfc6464: Add example pipeline
Olivier Crête [Wed, 18 Aug 2021 23:35:36 +0000 (19:35 -0400)]
rtphdrext-rfc6464: Add example pipeline

This makes it a bit easier to understand how to use it in an application.

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

2 years agortphdrext-rfc6464: Add test for inserting it based on caps
Olivier Crête [Wed, 18 Aug 2021 23:07:18 +0000 (19:07 -0400)]
rtphdrext-rfc6464: Add test for inserting it based on caps

Tests adding the extension based on the caps.

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

2 years agopbutils: Add function to convert caps to MIME codec
Ludvig Rappe [Wed, 25 Aug 2021 15:03:49 +0000 (17:03 +0200)]
pbutils: Add function to convert caps to MIME codec

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

2 years agopbutils: Add function for parsing H.264 extradata
Ludvig Rappe [Wed, 25 Aug 2021 15:01:19 +0000 (17:01 +0200)]
pbutils: Add function for parsing H.264 extradata

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

2 years agoqtdemux: Force stream-start push when re-using EOS'd streams
Edward Hervey [Fri, 27 Aug 2021 12:32:45 +0000 (14:32 +0200)]
qtdemux: Force stream-start push when re-using EOS'd streams

When re-using streams, we *do* need to push a `stream-start` event downstream if
we previously were EOS'd. Failure to do that would never remove the EOS status
on all downstream elements and cause weird issues.

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

2 years agodeinterlace: Use proper ASM output format for *BSD OS
Brad Smith [Fri, 27 Aug 2021 06:05:45 +0000 (02:05 -0400)]
deinterlace: Use proper ASM output format for *BSD OS

FreeBSD/NetBSD/OpenBSD amd64 use the ELF binary format.

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

2 years agoelement: NULL the lists of contexts in dispose()
Matthew Waters [Fri, 27 Aug 2021 03:51:07 +0000 (13:51 +1000)]
element: NULL the lists of contexts in dispose()

If dispose() is called more than once, we may double unref the list of
GstContext's.

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

2 years agoqmlgl: don't critical on input events before input format has been set
Matthew Waters [Fri, 27 Aug 2021 03:30:57 +0000 (13:30 +1000)]
qmlgl: don't critical on input events before input format has been set

Accessing the unset GstVideoInfo would result in criticals

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

2 years agodocs: Add `Since` marker to "twcc-feedback-interval" property
Sebastian Dröge [Wed, 25 Aug 2021 08:53:58 +0000 (11:53 +0300)]
docs: Add `Since` marker to "twcc-feedback-interval" property

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

2 years agodocs: update with "twcc-feedback-interval"
Havard Graff [Wed, 25 Aug 2021 08:33:24 +0000 (10:33 +0200)]
docs: update with "twcc-feedback-interval"

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

2 years agortptwcc: changes to use rtp buffer arrival time and current time.
Tulio Beloqui [Tue, 13 Apr 2021 14:19:22 +0000 (16:19 +0200)]
rtptwcc: changes to use rtp buffer arrival time and current time.

For TWCC we are more interested to track the arrival time (receive side)
and the current time (sender side) of the buffers rather than the
running time.

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

2 years agortptwcc: add payloadtype to RTPTWCCPacket
Knut Inge Hvidsten [Fri, 26 Mar 2021 10:57:42 +0000 (11:57 +0100)]
rtptwcc: add payloadtype to RTPTWCCPacket

The consumer of the stats can then separate between different media-types,
and do individual stats for each of them.

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

2 years agortptwcc: make enabling TWCC sticky
Havard Graff [Fri, 19 Mar 2021 17:19:43 +0000 (18:19 +0100)]
rtptwcc: make enabling TWCC sticky

Meaning that if a caps comes along that does NOT have TWCC in it,
this does not turn of TWCC for the rest, as this is in fact
completely allowed. (To have some payload-types not containing TWCC
seqnums).

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

2 years agortptwcc: move TWCC-logic over to the TWCC-manager
Havard Graff [Tue, 23 Feb 2021 08:44:05 +0000 (09:44 +0100)]
rtptwcc: move TWCC-logic over to the TWCC-manager

Prevent cluttering up the rtpsession, and keeping things localized.

Also write TWCC-seqnums for *all* streams in the session if configured by
caps.

A while back WebRTC was not doing TWCC for audio, basically breaking the
whole idea of a "transport-wide seqnuencenumber" applying for all bundled
streams. However, they have since fixed this, and now it no longers
makes sense to be able to single out certain payloadtypes for
use with TWCC, rather just including them all.

This also makes using RTX, RED, FEC etc much simpler, as it will apply
to them all as they enter the rtpsession.

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

2 years agortptwcc: fix warning
Havard Graff [Tue, 23 Feb 2021 08:50:04 +0000 (09:50 +0100)]
rtptwcc: fix warning

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

2 years agortptwcc: fixes and optimizations around run-length chunks
Tulio Beloqui [Thu, 11 Feb 2021 14:17:16 +0000 (15:17 +0100)]
rtptwcc: fixes and optimizations around run-length chunks

Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>

2 years agortptwcc: fix seqnum-wrap
Havard Graff [Fri, 18 Dec 2020 13:01:23 +0000 (14:01 +0100)]
rtptwcc: fix seqnum-wrap

Using the proper API to do this is obviously an improvement, and
adding a test for the case of a packet-loss when the seqnum wrap
is also a good idea.

Co-authored-by: Tulio Beloqui <tulio.beloqui@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>

2 years agortptwcc: fixed feedback packet count overflow that allowed late
Tulio Beloqui [Fri, 18 Dec 2020 12:06:35 +0000 (13:06 +0100)]
rtptwcc: fixed feedback packet count overflow that allowed late
packets to be processed

Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>

2 years agortptwcc: fixed parsing of old sequence number
Tulio Beloqui [Wed, 16 Dec 2020 15:31:18 +0000 (16:31 +0100)]
rtptwcc: fixed parsing of old sequence number

Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>

2 years agortptwcc: fixed guint8 overflow of feedback packet count
Tulio Beloqui [Wed, 16 Dec 2020 15:16:09 +0000 (16:16 +0100)]
rtptwcc: fixed guint8 overflow of feedback packet count

Co-authored-by: Havard Graff <havard.graff@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/927>

2 years agortptwcc: add feedback-interval
Havard Graff [Thu, 19 Nov 2020 22:50:23 +0000 (23:50 +0100)]
rtptwcc: add feedback-interval

To allow RTCP TWCC reports to be scheduled on a timer instead of per
marker-bit.

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

2 years agortptwcc: remove _set_send_packet_ts
Havard Graff [Fri, 20 Aug 2021 09:54:01 +0000 (11:54 +0200)]
rtptwcc: remove _set_send_packet_ts

Not in use.

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

2 years agortptwcc: make twcc-tests more deterministic
Havard Graff [Mon, 16 Nov 2020 23:45:02 +0000 (00:45 +0100)]
rtptwcc: make twcc-tests more deterministic

They were a bit racy.

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

2 years agoeglimage: fix redefinition of EGLuint64KHR
Olivier Blin [Tue, 24 Aug 2021 16:14:22 +0000 (18:14 +0200)]
eglimage: fix redefinition of EGLuint64KHR

It is already defined in gst/gl/egl/gstegl.h

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

2 years agopad: Keep IDLE probe hook alive during immediate callback
Jan Alexander Steffens (heftig) [Tue, 24 Aug 2021 12:53:30 +0000 (14:53 +0200)]
pad: Keep IDLE probe hook alive during immediate callback

When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently
from the streaming thread while we're in the callback here, the hook has
already been destroyed by the time we've reacquired the object lock.
Consequently, cleanup_hook gets passed an invalid pointer.

Keep another reference to the hook alive to avoid this situation.

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

2 years agoqtdemux: add depth for ProRes 4:4:4:4 variants if available
Tim-Philipp Müller [Tue, 24 Aug 2021 12:28:22 +0000 (13:28 +0100)]
qtdemux: add depth for ProRes 4:4:4:4 variants if available

Might be 24bpp in case an alpha channel is coded but
the image is always opaque.

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

2 years agoqtmux: for Apple ProRes, allow overriding pixel bit depth for 4:4:4:4 variants
Ruslan Khamidullin [Sun, 22 Aug 2021 23:16:26 +0000 (23:16 +0000)]
qtmux: for Apple ProRes, allow overriding pixel bit depth for 4:4:4:4 variants

e.g. when exporting an opaque image, yet with alpha channel.

Apple ProRes certification requires that, when a ProRes-writing
application *knows* that the entire frame is opaque, the application
writes only RGB without alpha even when the clip is RGBA. For that,
this tiny change allows the app to override pixel depth when writing ProRes.

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

2 years agovideo-converter: Add support for A420 to RGB fast path
Seungha Yang [Thu, 5 Aug 2021 10:59:38 +0000 (19:59 +0900)]
video-converter: Add support for A420 to RGB fast path

Add fast path for A420 -> RGB format conversion

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

2 years agovpxdec: Fix direct rendering, avoid holding write access
Havard Graff [Wed, 22 May 2019 09:16:56 +0000 (11:16 +0200)]
vpxdec: Fix direct rendering, avoid holding write access

When a buffer is pushed downstream, we should try not to hold the
buffer mapped with write access. Doing so would often lead to
an unneccesary memcpy later.

For instance, gst_buffer_make_writable() in
gst_video_decoder_finish_frame() will cause a memcpy because of
_memory_get_exclusive_reference().

We know that we can perform a two-step remap when using system
memory, as this will not cause the location of the memory to
change.

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

2 years agoisomp4/mux: add a function for seeking to a specific output byte position
Matthew Waters [Thu, 19 Aug 2021 06:26:17 +0000 (16:26 +1000)]
isomp4/mux: add a function for seeking to a specific output byte position

We do it enough times that this makes sense.  Also add a debug log line
for the seek position requested.

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

2 years agoisomp4/mux: don't overwrite with a bigger moov when fragmenting
Matthew Waters [Thu, 19 Aug 2021 06:02:47 +0000 (16:02 +1000)]
isomp4/mux: don't overwrite with a bigger moov when fragmenting

When outputting fragmented mp4, with a seekable downstream, we rewrite
the moov to maybe add a duration to the mvex.  If we start by not
writing the initial moov->mvex->mhed duration and then overwrite with a
moov containing mhed atom, the moov's will have different sizes and
could overwrite subsequent data and result in an unplayable file.

e.g. The initial moov would be of size 842 and the final moov would have
a size of 862.

Fix by always pushing out the mhed duration in the moov when
fragmenting.

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

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

2 years agoisomp4: actually make streamable fallback work
Matthew Waters [Fri, 15 Jan 2021 09:53:27 +0000 (20:53 +1100)]
isomp4: actually make streamable fallback work

We weren't setting the fragment_mode field anymore now that the
implementation doesn't change based on the value of the streamable
property.  This lead to invalid files.

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

2 years agoisomp4: fix trun data offset handling
Matthew Waters [Fri, 15 Jan 2021 09:54:56 +0000 (20:54 +1100)]
isomp4: fix trun data offset handling

The trun offset was missing a calculation for one of the box type
headers.

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

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

2 years agoisomp4/mux: fixes for fragmented mp4 output
Matthew Waters [Wed, 14 Oct 2020 13:28:36 +0000 (00:28 +1100)]
isomp4/mux: fixes for fragmented mp4 output

Various buffer offset calculations were not quite correct in all cases.

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

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

2 years agocompositor: Fix crash while drawing background and/or blending for subsampled YUV
Seungha Yang [Mon, 19 Jul 2021 13:11:41 +0000 (22:11 +0900)]
compositor: Fix crash while drawing background and/or blending for subsampled YUV

Fix crash caused by out-of-bounds memory accesses when drawing
background and/or blending. This fix is conceptually identical to the
approach as the commit of 8ff5079e5eef37b9bd5b212350f0cefbd9546b1b

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

2 years agoconcat: Properly propagate seqnum of segment events
Edward Hervey [Fri, 20 Aug 2021 14:34:16 +0000 (16:34 +0200)]
concat: Properly propagate seqnum of segment events

Was broken by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819

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

2 years agoencoding-profile: ignore more encoding private fields
Mathieu Duponchelle [Sat, 14 Aug 2021 23:27:39 +0000 (01:27 +0200)]
encoding-profile: ignore more encoding private fields

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

2 years agosmartencoder: Respect user `stream-format` when specified
Thibault Saunier [Tue, 10 Aug 2021 01:24:34 +0000 (21:24 -0400)]
smartencoder: Respect user `stream-format` when specified

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

2 years agosmartencoder: clean up and extend accepted formats
Mathieu Duponchelle [Tue, 10 Aug 2021 00:09:09 +0000 (02:09 +0200)]
smartencoder: clean up and extend accepted formats

* Add support for H265

* Don't overwrite original codec_data / streamheader in the output
  caps, but instead allow them to change and send them to the
  combiner at the right moment: encoder caps, reencoded GOP,
  original caps, original GOP(s), and potentially encoder caps
  and rencoded last GOP.

* For H264 / H265, force usage of a format with inband SPS / PPS
  (avc3 / hev1), this is cleaner than misadvertising avc1, hvc1 and
  some muxers like mp4mux will actually advertise both differently.

  Unfortunately, while mp4 supports updating the codec_data and using
  avc1 with no in-band SPS / PPS updates, it turns out some decoders
  (eg chrome / firefox) don't handle this particularly well and stop
  decoding after the reencoded GOP. We could expose a switch to
  force usage of avc1 / hvc1 nevertheless, but for now stick to
  requiring that the parser output SPS / PPS in-band with
  config-interval=-1 (that has not changed)

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

2 years agocompositor: Add "max-threads" property
Seungha Yang [Tue, 3 Aug 2021 15:51:24 +0000 (00:51 +0900)]
compositor: Add "max-threads" property

Adding new property for user to be able to set expected the maximum
number of blend task threads. This can be useful in case that user
wants to restrict the number of parallel task runners for system
resource management or debugging/development purpose.

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

2 years agotests: elementfactory: add element creation tests
Théo MAILLART [Sun, 10 Jan 2021 22:37:21 +0000 (23:37 +0100)]
tests: elementfactory: add element creation tests

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

2 years agoelementfactory: enable construct only property passing
Théo MAILLART [Fri, 29 Jan 2021 19:36:51 +0000 (20:36 +0100)]
elementfactory: enable construct only property passing

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

2 years agomatroska-mux: support H264 avc3 / H265 hev1
Mathieu Duponchelle [Mon, 9 Aug 2021 22:53:57 +0000 (00:53 +0200)]
matroska-mux: support H264 avc3 / H265 hev1

The matroska codec specs is unfortunately vague on the subject,
stating for H264:

AVC/H.264 stored as described in [@!ISO.14496-15]

and for H265:

HEVC/H.265 stored as described in [@!ISO.14496-15]

This spec however specifies multiple stream formats, our
implementation has opted for interpreting this as avc1 / hvc1,
both of which disallow in-band SPS.

Most decoders however will support in-band SPS / PPS, and
this commit gives the option to explicitly mux in avc3 / hev1,
which allows changing stream parameters on the fly, that is
useful for smart encoding for example.

When either of these stream formats are picked as the input,
changes in codec_data / tier / level / profile do not cause
renegotiation failure, a warning is logged however as it isn't
clear how compliant such a stream is.

The stream-format field is correctly ordered in the template
caps to avoid selecting potentially non-compliant options on
automatic negotiation.

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

2 years agoisomp4/qtmux: allow renegotiating when tier / level / profile change
Mathieu Duponchelle [Mon, 9 Aug 2021 22:51:36 +0000 (00:51 +0200)]
isomp4/qtmux: allow renegotiating when tier / level / profile change

Those are carried either in codec_data or in-band SPS (for avc3),
and it is OK for those to change, though decoders obviously need
to support it.

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

2 years agoisomp4/qtmux: accept video/x-h264, stream-format=avc3
Mathieu Duponchelle [Fri, 6 Aug 2021 21:36:48 +0000 (23:36 +0200)]
isomp4/qtmux: accept video/x-h264, stream-format=avc3

The main difference between avc1 and avc3 is that avc3 is allowed
to contain in-band SPS / PPS. In practice decoders will always use
in-band parameter sets anyway, but it is cleaner to explicitly
advertise it.

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

2 years agoisomp4/qtmux: make sure to switch to next chunk on new caps
Mathieu Duponchelle [Fri, 6 Aug 2021 20:59:23 +0000 (22:59 +0200)]
isomp4/qtmux: make sure to switch to next chunk on new caps

For example, with single video sink pad, and new codec_data is
received, current_chunk_offset must be reset to -1 for the
aggregate loop to open a new chunk.

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

2 years agoisomp4/atoms: fix multiple stsd entries
Mathieu Duponchelle [Fri, 6 Aug 2021 20:55:32 +0000 (22:55 +0200)]
isomp4/atoms: fix multiple stsd entries

stsd entries are serialized in reverse order (starting from
g_list_last()), and must be prepended to the entry list for their
index to be correct when referenced from stsc entries.

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

2 years agotracer: Add new tracer to list loaded elements and other features
Olivier Crête [Wed, 31 Mar 2021 22:36:00 +0000 (18:36 -0400)]
tracer: Add new tracer to list loaded elements and other features

This new tracer will list loaded elements and plugins. This should
make it easier to generate minimal builds of GStreamer.

This also traces other features such as typefind functions, device
providers and dynamic types.

The format of the output of gst-stats should match the parameters
expected by the meson based gst-build system.

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

2 years agotracers: Add tracepoint when a plugin feature it loaded
Olivier Crête [Fri, 23 Apr 2021 19:34:26 +0000 (15:34 -0400)]
tracers: Add tracepoint when a plugin feature it loaded

This makes it possible to trace which ones are loaded in a specific
program to make nice statistics.

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

2 years agomatroska-mux: Add a timestamp-offset property
Arun Raghavan [Thu, 12 Aug 2021 15:03:58 +0000 (11:03 -0400)]
matroska-mux: Add a timestamp-offset property

Adds a user-controllable timestamp offset to clusters and blocks. This
should be useful if we want to have timestamps that have significance
outside of the current file (for example, we might set the offset to the
wallclock when the file is being created, or some other common base, if
we want to correlate streams across multiple files).

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

2 years agopbutils: Expose functions for getting a file extension for caps and flags for describ...
Sebastian Dröge [Thu, 1 Jul 2021 09:41:11 +0000 (12:41 +0300)]
pbutils: Expose functions for getting a file extension for caps and flags for describing the format of the caps

This information was available internally already but not available from
the outside.

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

2 years agoplaybin/uridecodebin: Emit source-setup signal early before doing the scheduling...
Sebastian Dröge [Wed, 4 Aug 2021 07:06:02 +0000 (10:06 +0300)]
playbin/uridecodebin: Emit source-setup signal early before doing the scheduling query

Some elements will require the source to be set up properly before the
scheduling query returns useful results, e.g. appsrc and giostreamsrc.

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