Incorrect parsing of these bits meant that we were incorrectly parsing
the VP9 uncompressed bitstream header for some profiles, as the header
is of variable length and format depending on the profile. Amongst
various unintended effects, this caused the width and height from the SS
to be incorrectly parsed and set in the caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8275>
This can then be used by the pre-commit hook to avoid rebuilding
complete plugin caches to check a change, thus minimizing the potential
diff and making analysis of completely-unrelated cache diffs much less
likely.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8231>
Intead of passing around the output of the config generator program,
which consists of paths joined by a separator we can have the generator
simply produce an extra file containing those paths.
This commit only implements the new approach for the core plugins, as
this was needed to avoid spurious meson rebuilds when the pre-commit
hook regenerates the core plugins_cache.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8231>
A JSON configuration file is generated for core plugins, which maps
plugin names with sources to parse for docstrings.
The file is then opened by the configuration generator script, which
will now favor explicitly listed files to (usually wildcarded) paths
passed on its command line.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8231>
appsink was queuing the caps event both in its GstBaseSinkClass.set_caps()
and its GstBaseSinkClass.sink_event() implementation, but only signaling
new_event from `sink_event`.
This caused `new_event` callbacks to start lagging by one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7749>
On macOS, you always get your own 'timeline' for the AudioUnit session, so timestamps start from 0.
On iOS however, AudioUnit seems to give you a 'shared' timeline so timestamps start at a later, non-0 point in time.
Simply offsetting seems to do the trick.
This was causing osxaudiosrc to not output any sound on iOS.
Regressed in 2df9283d3f
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7856>
At some point in iOS 17, this call started waiting for the first render callback (io_proc) to finish.
In our case, that callback also takes the ringbuf object lock by calling gst_audio_ring_buffer_set_timestamp(),
which results in a deadlock.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7856>
A correctly configured AVAudioSession is needed on iOS to:
- allow the application to capture microphone audio (in some cases)
- avoid playback being silenced in silent mode
Without this, initializing AudioUnit for capture can fail on iOS >=17 (from my testing).
Since AVAudioSession has a lot of settings, in most cases its setup should be handled by the user/app.
However, just to have a basic default scenario covered, let's configure the bare minimum ourselves,
and allow anyone to disable that behaviour by setting configure-session=false on src/sink.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7856>
For some frames with decode-only flag, the v4l2 decoder will not
put them in output list. The corresponding decode-only frames will
be still kept in input list, which may cause potential performance
issue when the input list is full. So release the decode-only frames
according to the decode-only flag after they are processed by decoder
driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8153>
Fix-up after commit e56b78417. Unclear how that could
ever have worked. Code only built because basically
everything was disabled due to the missing config.h
include.
- Include config.h so that HAVE_* defines are available.
- Fix missing variable declarations that somehow disappeared
when moving the stats gathering code block into a separate
function in a new file.
- Fix structure variable modified to match name in new function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8211>
The matrix multiplication makes some assumption about the element
values to simplify the math with fixpoint values. If this is allowed
for the given matrices is now checked first.
Then the debug output for matrix and a comment have been fixed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8127>
Adds a new signal to webrtcbin, to allow for placement
of an object after rtp, before sendbin. This is usable for
objects such as congestion control elements, that don't want
to be burdened by the synchronization requirements of rtpsession.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7940>
.. and other framerate values with a 1.001 denominator.
The coded framerate denominator value is a code that maps to
either 1 (for 1) or 1.001 (for 2) not a direct value.
Before, 29.97fps would be announced as 15fps because it
would calculate 30/2 instead of 30/1.001.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8226>
As part of this
- Add accessors for the stream ID and selection API based on the
stream ID
- Deprecate the old index-based APIs
- Remove playbin support
- Implement the track enable API based on stream selection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7648>
The gst_srtp_dec_decode_buffer() function modifies the input buffer after making
it writable, so the pointer might change as well, depending on the refcount of
the buffer.
This issue was detected using a netsim element upstream of the decoder in a
WebRTC pipeline.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8198>
We can use gst_uri_from_string_with_base () to join base url
and the fragment url path.
The previous method of forming base url in update_base_url(),
by looking for the string 'manifest' or 'Manifest' is insufficient.
A query may include these string in their paths and thus an invalid
base url string will be kept.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8193>
The main difference with the WIP av1-in-mpegts mapping is that the payload data
is not startcode-escaped. Most of the rest is sensible usage of it:
* Custom AV1G (AV1 Gstreamer) registration descriptor instead of AV01
* AV1CodecConfigurationRecord is stored in the same 0x80 custom descriptor and
conforms fully to the isobmff spec (i.e. does not the HDR fields from the
provisional mpegts specification which conflict with that one).
* Data is stored as OBU
* Access Unit is the frame level (same as provisional mpegts mapping)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4442>
The reason why the STATE lock was taken was to avoid issues where we would be
adding (and activating) elements at the same time as urisourcebin would be
brought down to READY. That would cause those new elements to potentially return
ERRORS because of not-negotiated/flushing-pads
But that creates a really bad deadlock (state lock is taken to deactivate the
streaming thread which .. is currently grabbing the state lock).
Instead, we can just ignore the warning/error messages that might occur when
shutting down.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4075
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8162>
When a TD is being processed, it is not always pushed immediatly. Resetting
the time information lead to lost of timestamp in TU to Frame conversion. The
TU would be formed by buffer of [TD][Frame], and the timestamp taken from
the TU buffer was lost then the TD was handled.
The handling of TS should be entirely done by the 3 functions:
- gst_av1_parse_handle_obu_to_obu() (direct input to output)
- gst_av1_parse_handle_to_big_align() Reset DTS on detected TU or TD
- gst_av1_parse_handle_to_small_and_equal_align() PTS on show frame, flat DTS
Fixes: 79312357a6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8026>
V4L2 and DRM choose different, incompatible ways to represent
tiled/compressed etc. formats. While the later uses combinations of
format fourccs and opaque, vendor/hardware specific modifiers, for the
later every such combination is a distinct new format.
Traditionally Gst implemented each of the V4L2 formats if needed.
Given the large number of tiling and compression modes, this is
quite work intensive - and often actually not needed.
In many situations Gst just needs to pass buffers from V4L2 to DRM in
the form of EGL, VK, Wayland or KMS.
Thus implement a direct translation for some V4L2 formats to DRM ones,
limited to the DMA_DRM API, allowing much quicker enablement of formats
while requiring peers to use external implementations (usually Mesa or
KMS) for tiling etc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7355>
Use GST_VIDEO_DECODER_ERROR instead of just erroring out
unconditionally, so that the error handling behaviour is
determined by the "max-errors" property and we'll just
continue after decoding errors now instead of erroring out.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8163>
Allows reducing the initial stack size of GPU threads. Cuda should
automatically increase this value if a kernel requires a larger stack.
Can save roughly 40MB of GPU memory for a single nvh264enc instance.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8158>
The goal is equivalent to adding DMA_DRM caps to the existing raw
uploader, but creating a new dedicated uploader allows separating the
logic more easily.
Test:
- use an AMD system
- modprobe visl
- gst-launch-1.0 filesrc location=some-1080p-content.mkv ! parsebin ! v4l2slh265dec ! glimagesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8126>
Extended is identical to main but allows for FMO/ASO features to be
used, and prevent using CABAC. Using similar logic to "baseline",
assume that if we support main, we can also do extended.
This fixes the following fluster vectors, which otherwise would fail
when trying to link the parsebin pad.
- BA3_SVA_C
- MR6_BT_B
- MR7_BT_B
- MR8_BT_B
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8164>
Contains the following updates:
* New properties on avfvideosrc: screen-crop-*
* H265 and H265 Alpha support in vtdec and vtenc (VideoToolbox)
* ProRes support in vtenc
* New properties on vtenc elements: rate-control, data-rate-limits,
max-frame-delay
* New plugin atenc (AudioToolbox) with support for encoding AAC
* Plugin move: atdec moved from -bad to -good
* New property on osxaudio elements: unique-id
* OS X -> macOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8120>
1. Add some comments explaining what headers and libs are expected on
what systems
2. Only look in default incdirs if no incdir is specified
3. Require libnvbufsurface.so on Jetson when cuda-nvmm=enabled
4. Require libatomic on Jetson when cuda-nvmm=enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8021>
Previously the code tried to be thread-safe by only locking when modifying the
list and leaking the old list, but this was not sufficient. When removing a log
function, its user_data would be freed but this log function and its user_data
might afterwards still be used during logging which then could lead to memory
corruption.
To avoid that, use an RW lock: get a write lock whenever modifying the list and
get a read lock whenever only using the list of log functions for logging.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3660
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7151>
Leaky appsrc feature was implemented similar to queue. Dropping item
is a normal case because it is configured so. Warning messages
is too severe for this event.
Level changed to DEBUG just like in queue.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8147>
This is used for optimize frame drop issue. Some video streams such as av1
contains decode-only frames. These frames are handled by decoder but not show
by display, which will cause input frame count unmatch the output frame count.
After collecting more decoder only frame, it will cause error report "so many
frame droped". So attach the flag GST_BUFFER_FLAG_DECODE_ONLY with the input
buffer, the v4l2videodecoder can further handle the decode-only buffer in
output list.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8142>
Parsing the whole caps as SDP media only to retrieve the fmtp field afterwards
seems a bit superfluous. By looking up the a-fmtp attribute directly the number
of allocations in this function gets down a bit.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8125>
People might have GST_TRACERS=leaks set in their environment
by default, which will now trigger criticals during the build
when calling g-ir-scanner, because we unset GST_PLUGIN_SYSTEM_PATH
so that the scanner doesn't load any plugins.
Fixes#4093
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8121>
This commit enables the usage of inline queries, if and only if, the
provided
pNext structure, in gst_vulkan_opeation_enable_query(), chains a
VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR typed structure.
Also it guards "gstvkvideo-private.h" include
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8112>
We avoid resetting the internal FFmpeg decoder on framerate changes,
but in turn this means we were not updating the framerate on the srcpad,
which was clearly incorrect. This change keeps the optimization but ensures
that we renegotiate downstream when framerate changes occur.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8118>
Instead of having each tracer implement its own parameter parsing,
centralize the handling in the tracer subsystem using GstStructure.
This simplifies tracer implementations and provides a consistent way
to handle properties.
It also allows for much better documentation by forcing tracer object
to expose properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8086>
There is no reason why we should mandate people to "at least" use the static
sink pad. This caused issues, like mandating that it should always have valid
content linked to it (problematic in case of upstream stream changes).
Instead we only use it if it's actually linked to, in which case it gets added
to the list of inputs.
This actually simplifies the code too.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7949>
When checking whether a no-longer used output could be re-used for another slot,
we only want to do that for streams which are not still used.
Otherwise we end up potentially re-assigning a demuxer stream to a completely
different one
Furthermore, if we *are* re-using an output slot, indicate what the replacement
GstStream will be so slot matching can work properly (which can happen in the
case of demuxers which add/remove all pads even if only a single one changed)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7949>
This relation type define relations between each components of two groups.
First component of first group relate to first component of second group,
Second component of second group relate to second component of second group,
and so on. It's a denser way to express relations in this context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8087>
There was different behaviour if the proxy was configured through
properties or environment. For properties libcurl would be configured
with any auth, but for environment libcurl would default to using basic.
Now any auth is set for both configuration methods.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7935>
The Content-Length header would unconditionally be included when the
proxy property was set. This would result in requests with both
Content-Length and Transfer-Encoding header. Now we rely on the
use-content-length property in the proxy case aswell. This also makes
sure that Content-Type is set correctly, since before that would be
skipped if proxy was used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7935>
If a new fragment is added with a valid duration but no offset then the start
offset is set later based on the end offset of the previous fragment. At that
point the end offset of this fragment can also be calculated and not doing so
would give the next fragment the same start offset.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8069>
Allow sample rate, number of channels and bps to change and in that case update
the caps accordingly.
Also move (non-fatal) validity checks and storing of the header values outside
the actual parsing once we actually know that a valid frame is available.
And also don't warn on the last frame with fixed block size blocking strategy
that the block size has changed: the last frame is allowed to be smaller.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3281
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8075>