RFC 7826 recommends (but does not require) starting at 0,
but at least one known server implementation fails to copy
request sequence numbers <1 into responses due to an
incorrect null check.
The server known to exhibit this behavior is the Parrot
Streaming Server, serving video from their UAV devices.
A fix has been submitted upstream as well:
https://github.com/Parrot-Developers/librtsp/pull/2
The Parrot developers are known to have tested with LibVLC.
In WireShark debugging, LibVLC appears to start with a CSeq
of 2, which is likely why this bug went unnoticed.
This reverts 487595a7d6, which set this to 0 citing the
RFC. The switch to 0 was thus a recent one; it's therefore
possible server implementors relied on the previous
GStreamer client behavior in their tests as well.
Fixes#624.
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means we
no longer need the macro there, but for most types in base/gst-libs we
don't want to break ABI, which means it's better to just keep it like it
is (and use the `#ifdef` instead).
The problem is that Gobject Introspections does not understand the const
gfloat matrix[16] as an matrix but as an array of gfloasts but as just
one gfloat.
To fix this i added the annotation to the parameter
descriptions.
This came up in the case where v4l2 sets caps with colorimetry=NULL, and
then tries to parse back the colorimetry, causing a crash in
gst_video_get_colorimetry() because of g_str_equal(). We fix this by
making sure the only caller of the function never calls it with a null
colorimetry string.
SMPTE ST 2084 transfer characteristics (a.k.a ITU-R BT.2100-1 perceptual quantization, PQ)
is used for various HDR standard.
With ST 2084, we can represent BT 2100 (Rec. 2100). BT 2100 defines
various aspect of HDR such as resolution, transfer functions, matrix, primaries
and etc. It uses BT2020 color space (primaries and matrix) with PQ or HLG
transfer functions.
The code for this is mostly lifted from audiobuffersplit, it
allows use cases such as keeping the buffers output by compositor
on one branch and audiomixer on another perfectly aligned, by
requiring the compositor to output a n/d frame rate, and setting
output-buffer-duration to d/n on the audiomixer.
The old output-buffer-duration property now simply maps to its
fractional counterpart, the last set property wins.
Packed 10 bits per each R, G and B channel with MSB 2bits alpha channel.
This format is mapped to Windows' DXGI_FORMAT_R10G10B10A2_UNORM format which is
required for 10bits HDR rendering.
Note that this RGB10A2_LE format is R - B channel swapped version of BGR10A2_LE
... if subclass didn't update values. Note that the mastering-display-info
and content-light-level might be updated by user defined value (e.g., encoding option).
Introduce HDR signalling methods
* GstVideoMasteringDisplayInfo: Representing display color volume info.
Defined by SMPTE ST 2086
* GstVideoContentLightLevel: Representing content light level specified in
CEA-861.3, Appendix A.
Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/400
By using strtoul(), invalid values will get mapped to MAXULONG and we
would have to check errno. They won't get mapped to 0.
To solve this, use the signed g_ascii_strtoll(). This will map errors to
0 or G_MAXINT64 or G_MININT64, and the valid range for GstDateTime is >
0 and <= 9999 so we can directly check for this here.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/384
As part of commit 808e7127, we prefixed the `GstWlWindow`'s `shell`
field with wl_, to differentiate it from the other types of shells a
Wayland compositor might support. However, this is apparently a struct
that we expose to our users, so changing it means we have an API break.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/592
Add the possible to limit the Content-Length
Define an appropriate request size limit and reject requests exceeding
the limit (413 Request Entity Too Large)
When the glupload element renegotiates the caps, set_caps will reset the
method_impl to NULL, but the method will be kept. transform_caps tries
to use the method_impl to transform the caps, because a method is set,
but will segfault.
Make rtspconnection a little more strict to RFC2326.
Make sure that CSeq is in every RTSP message and that CSeq is valid.
Also break the build_next loop if any parsing fails, By acting on
the builder->status code.
video-anc.h💯 Error: GstVideo: identifier not found on the first line:
* Active Format Description (AFD) support
^
video-anc.h:207: Error: GstVideo: identifier not found on the first line:
* Bar data support
^
video-anc.h:228: Warning: GstVideo: "@top_bar_flag" parameter unexpected at this location:
* @top_bar_flag : flag indicating presence of top bar field
^
This is inconsistent with other add_meta methods such as
gst_buffer_add_video_meta , which will return NULL without
logging when gst_video_info_set_format fails.
It is up to the caller to check the return value of the
function, and log if appropriate.
It's invalid to have a 'interlace-mode=alternate' without the Interlaced caps
feature as well.
Modify gst_video_info_from_caps() to reject such case so we can easily
spot them in bugged elements.
gst_gl_memory_setup_buffer() was marked as introspectable=0
anyway, so might just as well mark it as '(skip)' and suppress
the warning. Reason is the (element-type gpointer) on wrapped_data.
gstglmemory.c:1426: Warning: GstGL: gst_gl_memory_setup_buffer: argument wrapped_data: Missing (element-type) annotation
gstglmemory.c:1426: Warning: GstGL: gst_gl_memory_setup_buffer: argument wrapped_data: Missing (element-type) annotation
egl/gstegl.h:40: Warning: GstGL: symbol='EGL_EGLEXT_PROTOTYPES': Unknown namespace for symbol 'EGL_EGLEXT_PROTOTYPES'
gstaudiometa.c:382: Warning: GstAudio: gst_buffer_add_audio_meta: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
The function rtcp_packet_min_length() returns a length for each known type
and -1 for unknown types. This change fixes the test accordingly and silences
the following warning.
gstrtcpbuffer.c:567:12: error: comparison of constant -1 with expression of type 'GstRTCPType' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
if (type == -1)
Fix the following warnings by adding casts.
gstdiscoverer.c:1801:17: error: format specifies type 'unsigned long' but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
location, file_status.st_size, file_status.st_mtime);
^~~~~~~~~~~~~~~~~~~
gstdiscoverer.c:1801:38: error: format specifies type 'long long' but the argument has type '__darwin_time_t' (aka 'long') [-Werror,-Wformat]
location, file_status.st_size, file_status.st_mtime);
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/570
Before a gap event is pushed downstream a segment event must be pushed
since the gap event can cause packet concealment downstream and hence
data flow. Since concealment before receiving any data packets usually
doesn't make any sense, the gap event is not sent downstream.
Alternatively one could generate a default caps and segment event, but
no need to complicate things until it's proven necessary.
https://bugzilla.gnome.org/show_bug.cgi?id=773104https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/301
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes.
Using a single condition variable for synchronization across all GL
messages is very slow on Windows and uses up to 20% CPU usage in some
workloads due to lock contention and false broadcasts.
Using per-message event handles reduces the CPU usage to negligible
amounts despite having to allocate a new event handle for each
message.
Implement the prepare and check functions according to the
documentation by returning TRUE when events should be dispatched
via the dispatch function.
As wl_display_read_events never blocks we can call it unconditionally
without looking at the poll status.
This simplifies the implementation and gets rid of a race where the
mainloop could get blocked due to nobody actually reading the events
from the wayland connection.
The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).
This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.
This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.
This means that the various sinks need to reset the viewport on draw.
In the process, fix resizing on cocoa.
If we only ever make it to READY, transform_caps can create an
internal convert object that will never be freed by basetransform's
stop vmethod (PAUSED->READY).
This allows us to output audio samples without discarding
any input frames, which is useful for some formats/codecs
(e.g. the MonkeysAudio decoder implementation in ffmpeg
which will might return e.g. 16 output buffers for an
input buffer for certain files).
In the past decoder implementations just concatenated
the returned audio buffers until a full frame had been
decoded, but that's no longer possible to do efficiently
when the decoder returns audio samples in non-interleaved
layout.
Allowing subframes to be output before the entire input
frame is decoded can also be useful to decrease startup
latency/delay.
https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/49