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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Mikhail Fludkov [Tue, 23 Aug 2016 17:06:49 +0000 (19:06 +0200)]
rtprtxreceive: fix crash when RTX payload has zero length
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1875>
sergei.kovalev [Mon, 20 Dec 2021 16:31:17 +0000 (17:31 +0100)]
check: Fix valgrind suppression for debug function list
Fix suppression to support release and debug builds.
Here is the debug build call stack:
```
==10707== by 0x48B5520: g_malloc (gmem.c:106)
==10707== by 0x48D19DC: g_slice_alloc (gslice.c:1069)
==10707== by 0x48D3947: g_slist_copy_deep (gslist.c:619)
==10707== by 0x48D38B8: g_slist_copy (gslist.c:567)
==10707== by 0x4ADC90B: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```
In release build `g_slist_copy (gslist.c:567)` got inlined:
```
==15419== by 0x48963E0: g_malloc (gmem.c:106)
==15419== by 0x48AA382: g_slice_alloc (gslice.c:1069)
==15419== by 0x48AB732: g_slist_copy_deep (gslist.c:619)
==15419== by 0x4A39B8F: gst_debug_remove_with_compare_func (gstinfo.c:1504)
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1814>
Havard Graff [Sun, 26 Jun 2016 20:25:46 +0000 (22:25 +0200)]
rtprtxreceive: allow passthrough and non-rtp buffers
To avoid mapping rtp buffers when RTX is not in use, and to not
do a full error on receiving a non-rtp buffer, since you have no control
of what a rouge sender might send you.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1874>
Havard Graff [Mon, 8 Feb 2021 20:40:19 +0000 (21:40 +0100)]
rtprtx: don't access type-system per buffer
When doing only a single stream of audio/video this hardly matters,
but when doing many at the same time, the fact that you have to get
a hold of the glib global type-system lock every time you process a buffer,
means that there is a limit to how many streams you can process in
parallel.
Luckily the fix is very simple, by doing a cast rather than a full
type-check.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1873>
Havard Graff [Mon, 10 Feb 2020 13:37:30 +0000 (14:37 +0100)]
rtprtx: signed/unsigned and style fixes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1872>
Seungha Yang [Mon, 7 Mar 2022 18:45:01 +0000 (03:45 +0900)]
cudamemorycopy: Remove texture-target caps field
It's GL specific field, and we can remove it unconditionally
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
Seungha Yang [Fri, 4 Mar 2022 17:30:24 +0000 (02:30 +0900)]
cudaupload,cudadownload: Add support for dGPU NVMM
Implement NVMM <-> CUDA, GL, SYSTEM memory conversion. Jetson is
not supported yet. Note that NVMM <-> GL interop on Jetson platform
is supported by GstGL
Some example pipelines are:
- Convert NVMM to GstGL memory
nvv4l2decoder ! "video/x-raw(memory:NVMM)" ! cudadownload ! "video/x-raw(memory:GLMemory)" ! glimagesink
- Upload system memory to NVMM and encode
video/x-raw,format=NV12 ! cudaupload ! "video/x-raw(memory:NVMM)" ! nvv4l2h264enc
- Convert NVMM to GstCUDA memory and encode
nvvideoconvert ! "video/x-raw(memory:NVMM)" ! cudaupload ! "video/x-raw(memory:CUDAMemory)" ! nvh264enc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1865>
Xavier Claessens [Mon, 7 Mar 2022 13:49:43 +0000 (08:49 -0500)]
Update wrap files from latest wrapdb version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1877>
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 14:06:00 +0000 (15:06 +0100)]
va: encoder: Don't preallocate reconstruct buffers.
It's not required by VA to register the reconstruct buffers at context
creation, just as in decoders.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1857>
Hou Qi [Thu, 3 Mar 2022 05:47:05 +0000 (13:47 +0800)]
v4l2bufferpool: Fix race condition between qbuf and pool streamoff
There is a chance that pool->buffers[index] sets BUFFER_STATE_QUEUED, but
it has not been queued yet which makes pool->buffers[index] still NULL.
At this time, if pool_streamff release all buffers with BUFFER_STATE_QUEUED
state regardless of whether the buffer is NULL or not, it will cause segfault.
To fix this, also check buffer when streamoff release buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1842>