With the old method of adding build RPATHs, only the libsoup as
a subproject was supported. However, it's possible to use Homebrew for
libsoup too by adding libsoup as a dependency to the target (even
though we don't link to it).
Apple ld will not add a LC_LOAD_DYLIB entry for a library unless there
are symbols that need it because meson passes `-dead_strip_dylibs`, so
we can do this without issue.
As a bonus, this ensures the correct build RPATHs in all cases.
Additionally, we still need to explicitly add an LC_RPATH for the
installed case.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4027
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8403>
In many places in the log tracer %d was used for data types we have
string format functions. This is especially problematic when the data
type is not immediately obvious to the reader (e.g. gboolean vs
GstFlowRet, where TRUE==1 but GST_FLOW_OK==0) or the values are not easy
to memorize (GST_STATE_CHANGE_PLAYING_TO_PAUSED==35).
This patch replaces all the integer codes with string representations so
that the logs are easier to understand by humans.
The formatting of GstBufferList by the log tracer is also updated to use
GST_PTR_FORMAT instead of a raw pointer, so the user can see the
timestamps, size and number of buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8414>
For VPS, PPS, APS, OPI and DCI, the extension flags are the last syntax
in the structures, and according to the spec, should be ignored if set to 1.
Therefore, we can just ignore them rather than failing.
This fixes a few failures in fluster, like in the PSEXT_A_Nokia_2 stream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8359>
If we find VPS/SPS/PPS in codec_data and call gst_h266_parse_process_nal
with them, we need to have negotiated before in order to correctly
process them with flags like h266parse->transform set or not depending
on the negotiation. This is important because in certain vvc1/vvi1 streams we
may have correct codec_data but faulty parameter sets in the stream and
we would want to push the parameter sets from codec_data first.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8359>
implement serialization of codec_data containing VvcDecoderConfigurationRecord
as defined in ISO/IEC 14996-15.
The VPS/SPS/PPS NALs are added to the codec_data. APS NALs could be
optionally included as well but will be pushed in-band instead, because:
1. Logic is easier that way. We'd have to filter out for PREFIX_APS only
(SUFFIX_APS aren't allowed in codec_data).
2. APS NALs can also be sent for every non-keyframe slice, and often are, so just pushing
them in-band makes more sense to have less to keep track and avoid possible
duplicates.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8359>
If collecting the backchannel stream after the stream has begun
preparing, make sure to join it to the RTSP media bin, as is
done for dynamic payloaders in the pad-added handler. Add a
new internal stream creation method for it, that could be
publically exposed later if it proves useful.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
When prerolling / blocking an RTSP media, don't consider receiver
streams like onvif backchannel in the 'is everything blocked' check,
as those streams won't receive data until after the RTSP stream
is running.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
When decoupling send/receive loops in rtsp-media using appsink/appsrc,
put the appsink in the bin before linking it, as this code path
had that wrong.
For both sender and receiver paths, if the pipeline already started
also add the other appsrc/appsink of the pair to the pipeline
immediately instead of putting it in the pending elements list,
as they won't get added later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
The example was switched to use autovideosink, which broke
current position calculation based on the last video frame.
Add code to retrieve the actual video sink from within autovideosink
to make it work again.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
Suppose you're trying to debug why this pipeline doesn't work:
```
$ GST_DEBUG=GST_PIPELINE:DEBUG gst-launch-1.0 \
videotestsrc num-buffers=10 ! x264enc name=enc ! mux.sink_0 \
mpegtsmux name=mux ! fakesink
```
You will encounter this line in the logs:
> gst_parse_perform_link: linking some pad of GstX264Enc named enc to
> pad mux of GstMpegTsMux named mux (0/1) with caps "(NULL)"
It would seem that the element name is being read as a pad name as well,
and that made me wonder if the parsing was not working. However, it was
just a bug in the code printing that log. This patch fixes that bug.
Note that it is possible to specify more than one pad name for each side
of the link. For instance, the following is a valid pipeline that will
remux the video and audio of an MP4 file into MKV:
```
$ GST_DEBUG=GST_PIPELINE:DEBUG gst-launch \
filesrc location=input.mp4 ! qtdemux name=demux \
multiqueue name=mq \
matroskamux name=mux ! filesink location=output.mkv \
demux.video_0,audio_0 ! mq.sink_0,sink_1 \
mq.src_0,src_1 ! mux.video_0,audio_0
```
The new logging accomodates this by using a new utility function to join
strings of pad name lists instead of `PRETTY_PAD_NAME_FMT` (which only
supports one pad name). For example:
> linking pads {video_0, audio_0} of GstQTDemux named demux to pads
> {sink_0, sink_1} of GstMultiQueue named mq with caps "(NULL)"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8415>
"undefined reference to `GST_TRACER_PAD_SEND_EVENT_PRE'
undefined reference to `GST_TRACER_PAD_SEND_EVENT_POST'"
errors are generated when trying to build GStreamer with
the following build configuration:
meson setup -Dgstreamer:tracer_hooks=false build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8419>
Similar to qtdemux.
Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
In particular the Yaw value seems to get ignored by many clients.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319>
Similar to qtmux, but for mkv and webm containers.
Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
In particular the Yaw value seems to get ignored by many clients.
Can be tested with:
```
gst-launch-1.0 \
videotestsrc num-buffers=90 ! \
taginject tags="image-orientation=rotate-270" ! \
capsfilter caps=video/x-raw,width=640,height=480,max-framerate=30/1 ! \
videoconvert ! \
queue ! \
vp8enc ! \
queue ! \
webmmux ! \
filesink location=./test.webm
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8319>
Sometimes the seek to the end of file to determine the duration would trigger a
reset of the source pads, that would confuse the decoder downstream and trigger
an error. So the proposed fix is to not reset pads when the segment event being
processed is the consequence of a seek performed to determine the duration.
Fixes#4212
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/937>
For outputs with a high number of channels, macOS has a bug where
initially CoreAudio will report incorrect positions for all channels,
but after you run Audio MIDI Setup and configure the speaker layout
there, macOS will always report those few as positioned, with no option
to revert that (other than deleting some internal files).
In such scenario our code would just ignore all the unpositioned
channels. Since you can only position max. 16 channels in macOS, if you
had more on your output device, those would be unusable.
This commit makes sure that in addition to the usual positioned layout
(if there is one), we will expose caps for a no-positions layout that
always has the maximum amount of channels available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8311>
By default, for devices with larger amounts of outputs, CoreAudio can
provide invalid channel labels/positions, simply by starting at 0 and
incrementing forward. For example, values 19 through 32 are not valid
according to the CoreAudioBaseTypes.h header, but if your device has >19
output channels, you will find CoreAudio using those values.
This is most likely a bug in CoreAudio, since in that case it should use
unpositioned labels (e.g. _Discrete_X) instead.
This commit aims to work around this by overriding all channels to be
unpositioned if the case above is detected.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8311>
After a bit of back and forth, we figure-out that for backward
compatibility we need to set the tile stride the way GStreamer
defines it. Sinks such as glimagesink/waylandsink translate it
back to the number of bytes representation used by Linux.
The change in !7355 when the other way around, breaking tiled
playback through waylandsink and glimagesink.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7892>
Mirroring the demux element and isomp4mux from gst-plugins-rs.
Tested against other Gst elements and MPV. Note that the later
apparently does not show correct results for flipped values.
Can be tested with:
```
gst-launch-1.0 \
videotestsrc num-buffers=90 ! \
taginject tags="image-orientation=rotate-90" ! \
capsfilter caps=video/x-raw,width=640,height=480,max-framerate=30/1 ! \
videoconvert ! \
queue ! \
openh264enc ! \
queue ! \
h264parse ! \
mp4mux ! \
filesink location=./test.mp4
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8371>
There is no requirement for a base DRM format to be supported by libgstvideo
in order to be uploaded to.
The linux-dmabuf-v1 format events are DRM_FORMAT codes and don't need to
be converted before use with `gst_video_dma_drm_fourcc_to_string`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8279>
Most settings are copied from properties on the READY → PAUSED state
change. The recently added properties violate this scheme, and are
probably unsafe to change.
Make these properties consistently MUTABLE_READY. Also remove the unused
`output_padding` field.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7996>
After calculating a correct duration the oggdemux in some cases sets the duration to GST_CLOCK_TIME_NONE.
After that any seek will fail due to the oggdemux calculating a target time after the actual duration.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8296>
The documentation was incorrectly referring to `GST_QUERY` and `GST_BIN`
as GstDebug category names. These two don't follow the pattern of the
rest, and instead are named `query` and `bin` respectively.
This can be verified from the source code of the _do_init macro in the
same gstlog.c file, and from gstbin.c and gstquery.c calls to
GST_DEBUG_CATEGORY_INIT().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8365>
The third argument of the pad-chain-pre and pad-chain-post hooks are of type GstBuffer* and GstBufferList* respectively.
However, when I added do_chain_buffer_pre() and do_chain_buffer_post()
to gstlog.c I accidentally make them take GstFlowReturn -- almost
certainly as an artifact from duplicating the code of the _post()
variants, leading to erroneous log lines like this:
```
do_chain_buffer_pre:<vp9parse0:sink> 0:00:01.615378540, pad=<vp9parse0:sink>, res=-1073639680
```
This patch fixes that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8366>
Similar to de30de865c, this allows to follow the flow of events as they
arrive to a pad rather than only when they are pushed to a peer.
The hook is installed in gst_pad_send_event_unchecked() instead of
gst_pad_send_event() because the latter is often omitted: that is the
case especifically in gst_pad_push_event_unchecked(), where most event
propagation occurs.
This patch also makes use of the new hooks in the log tracer to log the
begining and end of the send_event processing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8330>
Previously, the tracer pad-push-event was only signalled on
gst_pad_push_event(). However, the sticky event handling code in
GStreamer uses gst_pad_push_event_unchecked() instead, which meant those
events were not logged.
This patch extends the definition of the pad-push-event tracer to cover
both calls to gst_pad_push_event() and any direct calls to
gst_pad_push_event_unchecked() that skip the former inside GstPad
private code.
gst_pad_push_event_unchecked() returns GstFlowReturn instead of
gboolean like gst_pad_push_event(). To maintain API compatibility, the
GstFlowReturn is converted to gboolean.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4182
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8342>
If starting the internal clock fails we would still store a broken clock in the
cache despite it being unusable and never recovering.
Not storing it allows the application to simply create a new one at a later time
and have starting it retried.
Also signal to the application that such a clock is not synced.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8334>
If the drain function of the decoder triggered by FLUSH_START
is run while the output loop is running, once the output loop
finished vtdec->downstream_ret will be GST_FLOW_FLUSHING instead
of GST_FLOW_OK, which must not be treated as an error since
the queue is cleaned correctly as well.
Fix#4179
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8328>
This adds the data required in AVCDecoderConfigurationRecord for
higher profile (High variants) configurations - everything in the if(...) {...} part
of ISO/IEC 14496-15:2024 Section 5.3.2.1.2. (or 5.3.3.1.2 in the 2019 version).
Resolves an error flagged by ComplianceWarden when muxing this into ISOBMFF.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8308>
This adds the data required in AVCDecoderConfigurationRecord for
higher profile (High variants) configurations - everything in the if(...) {...} part
of ISO/IEC 14496-15:2024 Section 5.3.2.1.2. (or 5.3.3.1.2 in the 2019 version).
Resolves an error flagged by ComplianceWarden when muxing this into ISOBMFF.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8308>
Commit de30de865c added a hook for pad-chain-{pre,post} and
pad-chain-list-{pre,post}. As explained in that commit, hooking the
chain is helpful because it allows you to hook to buffer propagation in
both srcpads (pad-push) and sinkpads (pad-chain).
This patch uses the new hooks to log pad-chain in the log tracer.
Before, only pad-push was logged, so you could only follow the flow of
buffers through the srcpads.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8329>
gst_sparse_file_read() is supposed to set @error when returning 0 but
in some cases was not.
Hopefully fix a crash in gst_download_buffer_read_buffer() which is
checking error->code when 0 is returned.
I'm not totally sure when this happens as I debugged this from a post
mortem crash but returning a generic error here seems the safe thing to
do.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8321>
The generation script can fail to generate a configuration for the four
libraries where the documentation is not generated from gir, as it needs
to run pkg-config.
Only add the path to the configuration file to the sitemap once it has
successfully been dumped.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8324>
Memcpy if needed to ensure sufficient alignment, as some
SIMD instructions might require more alignment than we provide
by default (e.g. vmovaps requires 32 bytes, but gstreamer uses
malloc alignment by default which is 16 bytes here on x86_64).
And in any case buffers might be trimmed, so the only alignment
we can expect is sample frame alignment which might be even
smaller than 16 bytes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8318>
With this patch, configure time is identical no matter whether doc is
enabled or not.
The configuration files also now contain explicitly-listed sources with
no wildcards.
For the four libraries where hotdoc needs to use clang to generate the
documentation (as opposed to the rest of the libraries where hotdoc uses
the gir), the script will call pkg-config to determine the appropriate
C flags.
This means a side effect of this patch is that pkg-config files are now
generated for the gstadaptivedemux and gstopencv libraries.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
It is a bit hard to track its origin as `git log --follow` leads all the
way to a 2001 Wim commit of a TODO file, but it was not used in the
documentation and the contained information appears in other places.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8312>
Some pixel aspect ratios found in dash streams have very large numerators and
denominators (while being close to 1:1). These values can cause integer overflow
during multiplication, leading to negotiation failures.
Add fallback path using gdouble when integer multiplication would overflow,
trading some precision for reliability instead of failing outright.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8262>
- Use frame_num instead of pic_num to set the long_term_pic_num
fixing 10 interlaced tests in fluster test suite: JVT-AVC_V1
- Send the slice offset only once in case of interlaced content.
Fixing 5 interlaced tests in fluster test suite: JVT-AVC_V1.
- The default value for top and bottom field flag should be 0 in the
case of a progressive content.
- Use short and long term refs helper getter method to retrieve the
reference frames according its none existing and interlaced state
- Reorganize the find_next_slot_idx code to be easier to read.
Co-authored-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7854>
Extended is identical to main but allows 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/7854>
In fit-down mode only 1.0 rates are supported, and the element will fit
audio data in buffers to their advertised duration.
This is useful in speech synthesis cases, where elements such as
awspolly will generate audio data from text, and assign the duration of the
input text buffers to their output buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8149>
When iterating through output devices, video_input_caps was being
updated instead of video_output_caps.
As a result, video output devices were being created with an empty caps object
and `gst-device-monitor-1.0 Video/Sink` would produce no decklink devices.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8298>