If the caller passed in "audio_%u" instead of a concrete pad name into
gst_element_request_pad_simple() then the pad name will be NULL. In that case
use the pad template name for requesting the pad from splitmuxsink.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8697>
`gst/analytics/analytics.h` includes `gst/analytics/gstanalyticssegmentationmtd.h`,
which in turn `gst/video/video-info.h` but `gst-video-1.0` was only listed
in `Requires.private` field of `gst-analytics-1.0.pc`.
This would cause projects linking against `gst-analytics-1.0.pc` to fail to find
the headers when using alternative interpretation of pkg-config specification
that only considers private dependencies for include path during static builds,
such as the case e.g. on Nix.
https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/28
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8661>
The position is no longer duplicated across each pad and pad's segment. The
position is now only updated if it changes in the direction of playback so that
quickly repeated forward seeks do not cause the stream to seek from 0.
Reverse playback is expressly disallowed and an unnecessary extra flush of track
when seeking was removed.
A background task was added to periodically check on the current position and
the media source's buffering levels to keep the ready state up-to-date. The
source buffer no longer needs to trigger this update, it will happen whenever
the element state is READY or higher.
Finally, added proper error reporting when failing to push a buffer and improved
debug logging.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
Since the sample map/track buffer now iterates samples in batches corresponding
to each coded frame group, the logic to feed the tracks is simpler. For media
without delta frames, it's a special case where the coded frame groups are all
size 1.
Now, all it does is skip data until the keyframe group containing the seek point
is found, then feed the track queue with the current sample and all future
samples until EOS or cancellation.
Resync of the iterator when the underlying track is modified is not necessary
because the outer loop attempts to resume feeding track data from where it was
interrupted in case of modification.
Also, the track feed task struct now holds a weak ref to its parent source
buffer to allow the task to cancel itself in any situation where the source
buffer is destroyed before the task is shut down.
Media parsing activity in the append pipeline no longer triggers ready state
recalculation on the msesrc since the msesrc now has a background task that
updates the ready state periodically when it's active which is more efficient in
cases where there is a high volume of samples being processed by the media
parser.
Finally, updated to adapt to track buffer API changes. Some functions previously
passed in a lower bound for sample timestamps. Now the source buffer is
responsible for clipping samples within a desired range of time.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
Now when the buffered list is requested, the tolerance for merging two ranges
when there's a small gap between them is MAX(0.1sec, max frame duration * 2).
Previously it was hardcoded to 0.01sec. The specification suggests that it
could be something like the max frame duration * 2.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
The source buffer currently has a thread for each track that feeds the track
with all data in the track buffer until EOS is reached.
Each pass over the track buffer currently waits for the EOS to appear when it's
done iterating the track buffer which is too restrictive.
When the source buffer reaches the end of the track buffer, it should wait for
any new data to be processed -- not just an EOS -- then check for cancellation
if the deadline expires without new data.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
Both operations now work on coded frame groups (GOPs). This simplifies queueing
of video data. There is rarely any point of dealing with individual video frames
when iterating in DTS order, it's most meaningful to decode or delete whole
coded frame groups at a time, so the sample map will now do that when iterating
by DTS. When iterating in PTS order, the existing behavior is preserved since
that is used for informational purposes, not media processing.
A new private boxed type for coded frame groups was added to provide each data
item to the source buffer. Another possible solution would be creation of a new
GstSample representing the whole group by merging all the samples in a group
into a single sample containing a GstBufferList.
Also, start time filtering was removed from the API since gst_iterator_filter()
can be used by callers to achieve the same result.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8512>
h265parser defers linking parameter sets until slice header is parsed.
Thus valid SPS/PPS parsed by h265parser can have no linked
parent parameter set. Apply this behavior to
gst_h265_parser_update_{sps,pps} too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8673>
Fixes an issue where the webrtcbin would hangup when finalizing due
to the sctpenc hanging up when finalizing. This occurred when the
webrtcbin chose to use a sctp association ID already in use.
The sctpenc would fail to reach the paused state, but startup a task
anyways that was never stopped.
This commit modifies the behavior to not choose sctp association IDs
randomly, and instead only choose one that is free. It also prevents the
sctpenc from starting up that task if it fails to reach the paused state.
Fixes: #4188
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8607>
VT supports changing properties on the fly, and old code attempted to
support that. Perhaps 10 years ago that worked, but these days
VTSessionSetProperty will always wait for the output callback to finish
before proceeding. This means that it's very prone to deadlocking, as
property setters will take the object lock, the callback thread will
take the stream lock, and the main (streaming) thread attempts to take
both, resulting in a deadlock.
New version uses something similar to other encoders (e.g. x264enc) -
changing a property when a session is already created will just flag it
to be reconfigured upon the next encode call. This is done in similar
fashion to how restarting the session upon an error works.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8597>
According to the UVC 1.5 specification, section 4.1.2, the GET_INFO request
must return a bitmap indicating supported operations for the control.
Value 0x00 indicates that neither GET nor SET operations are supported.
This patch fixes control handling in the UVC gadget implementation to properly
respond to GET_INFO requests with the correct bitmap, allowing host systems
to properly detect supported control operations (none in this case).
The pipeline I'm using to test this is:
gst-launch-1.0 videotestsrc ! uvcsink v4l2sink::device=/dev/video0
This is the equivalent of [0] but the difference is that we are now returning
0x00 instead of 0x03.
Without this change the host in my case is unable to probe the UVC gadget at
all, automatically disconnecting the device after a few seconds.
Following is the log when the gadget is not working (without this fix):
usb 1-1.2: new high-speed USB device number 73 using xhci_hcd
usb 1-1.2: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.15
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: UVC Gadget
usb 1-1.2: Manufacturer: localhost.localdomain
usb 1-1.2: SerialNumber: 0123456789
usb 1-1.2: Found UVC 1.10 device UVC Gadget (0525:a4a2)
usb 1-1.2: Failed to query (GET_INFO) UVC control 2 on unit 1: -110 (exp. 1).
usb 1-1.2: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
uvcvideo 1-1.2:1.1: Failed to query (129) UVC probe control : -71 (exp. 34).
uvcvideo 1-1.2:1.1: Failed to initialize the device (-71).
cdc_subset 1-1.2:1.0: probe with driver cdc_subset failed with error -22
cdc_subset 1-1.2:1.1: probe with driver cdc_subset failed with error -22
usb 1-1.2: USB disconnect, device number 73
With the fix the USB device is correctly probed:
usb 1-1.2: new high-speed USB device number 88 using xhci_hcd
usb 1-1.2: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 5.15
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: UVC Gadget
usb 1-1.2: Manufacturer: localhost.localdomain
usb 1-1.2: SerialNumber: 0123456789
usb 1-1.2: Found UVC 1.10 device UVC Gadget (0525:a4a2)
[0] camera/uvc-gadget@0df9d3ad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8572>
All decoders have the same design pattern in decide allocation
and forgot to release sink allocator before allocating a new one.
Fixing the memory leak by clearing sink allocator before creating
the new one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8583>
Extensions can have a minimum set of dependencies (e.g. API version) and may
also be promoted to core in a later version. Don't explicitly enable extensions
that fail to meet their requirements or that have been promoted to the core API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
The instance API version supported may not be of the same version supported by
the device. It is possible that the function that is returned may be non-0
but not functional due to the requested API version of the instance limiting the
availability of calling the returned function.
Can be reproduced by running a pipeline with GST_VULKAN_INSTANCE_API_VERSION=1.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>
Since Vulkan 1.1, the requested API version is the maximum API version that the
application is expecting to use. It is also possible for individual devices
(backed by potentially different drivers) may support a higher or lower API
version than the instance. Both cases (higher and lower) should be supported
and as such, it is not an error to request an API version that is larger than
the instance supported API version.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8554>