Thibault Saunier [Fri, 24 Sep 2021 19:13:17 +0000 (16:13 -0300)]
Merging gst-plugins-base
Thibault Saunier [Fri, 24 Sep 2021 19:13:07 +0000 (16:13 -0300)]
Move files from gstreamer into the "subprojects/gstreamer/" subdir
Tim-Philipp Müller [Thu, 23 Sep 2021 00:33:08 +0000 (01:33 +0100)]
Release 1.19.2
Tim-Philipp Müller [Thu, 23 Sep 2021 00:32:32 +0000 (01:32 +0100)]
Release 1.19.2
Sebastian Dröge [Wed, 23 Jun 2021 13:41:20 +0000 (16:41 +0300)]
clocksync: Add some debug output to the clock waiting code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/841>
Tim-Philipp Müller [Tue, 21 Sep 2021 21:39:46 +0000 (22:39 +0100)]
pbutils: codec-utils: fix g-ir-scanner warning
Warning: GstPbutils: gst_codec_utils_h264_get_profile_flags_level:
unknown parameter 'codec_data' in documentation comment, should be 'codecs_data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1279>
Nicolas Dufresne [Tue, 24 Aug 2021 19:27:32 +0000 (15:27 -0400)]
alsasink: Allow stop() function to happen during failing writes
In ALSA, there is possible temporary failures that may require a retry,
though in certain situation, this may leak to the write() function
holding on a lock forever preventing the pipeline from going to pause
or stop. Fix this by shortly dropping the lock between retries.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1261>
Nicolas Dufresne [Tue, 24 Aug 2021 19:26:12 +0000 (15:26 -0400)]
alsasink: Improve logging in write() function
This moves the "written X frames" lower so that we don't trace
confusing negative values on errors and add the error code in the
"Write error" log.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1261>
Sebastian Dröge [Mon, 20 Sep 2021 10:12:12 +0000 (13:12 +0300)]
gst: Initialize optional event/message fields when parsing
These might not exist inside the structure and then we would potentially
keep around uninitialized memory from the caller in the out parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/887>
Sebastian Dröge [Fri, 10 Sep 2021 12:10:46 +0000 (15:10 +0300)]
videodecoder: Add properties to automatically request sync points and vfunc to allow subclasses to handle packet loss / missing data
Subclasses could use the new vfunc to activate packet loss concealment,
for example.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1274>
He Junyan [Sun, 19 Sep 2021 13:01:21 +0000 (21:01 +0800)]
test: bitwriter: Add a test for reset_and_get_data when not byte unaligned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
He Junyan [Sun, 19 Sep 2021 14:39:09 +0000 (22:39 +0800)]
bitwriter: Fix a memory leak in reset_and_get_buffer.
We should record the ownership of the data before we reset the bitwriter.
Or we will always dup the buffer data and leak the memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
He Junyan [Sat, 18 Sep 2021 16:19:43 +0000 (00:19 +0800)]
bitwriter: Fix the trailing bits lost when getting its data.
In reset_and_get_data and reset_and_get_buffer, it fails to include
the trailing bits less than 8. So, when the bit_size is not byte
aligned, the trailing bits are lost in the return buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/886>
Havard Graff [Fri, 10 Sep 2021 14:12:51 +0000 (16:12 +0200)]
videodecoder: Fix min-force-key-unit-interval logic and logging
The new keyframe is needed when the deadline of the buffer has exeeded
the waiting time, not while it is within it.
Also, since we look at the deadline of the frame, log that instead of PTS.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1278>
Olivier Crête [Wed, 18 Aug 2021 23:40:55 +0000 (19:40 -0400)]
rtphdrext: Make write function return a signed value
Since the return value is documented to possibly be smaller than 0,
then it needs to be signed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1258>
Olivier Crête [Wed, 16 Jun 2021 19:07:13 +0000 (15:07 -0400)]
videorate: Add unit test for closing a segment and opening a separate one
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
Olivier Crête [Wed, 16 Jun 2021 19:06:57 +0000 (15:06 -0400)]
videorate: Drop incoming buffers that are outside of the segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
Olivier Crête [Fri, 24 Jul 2020 21:41:57 +0000 (17:41 -0400)]
videorate: Only "close" the segment if it is discontinous
Otherwise, it will drop valid buffers on a simple segment update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
Olivier Crête [Fri, 24 Jul 2020 21:38:58 +0000 (17:38 -0400)]
videorate: Add test for segment update
Continue as-is on segment update.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
Olivier Crête [Fri, 24 Jul 2020 20:35:04 +0000 (16:35 -0400)]
videorate: Update the base time on segment updates
Dropping it to 0 makes videorate push buffers from timestamp 0 again.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/767>
Mathieu Duponchelle [Thu, 9 Sep 2021 23:43:18 +0000 (01:43 +0200)]
multiqueue: fix obsolete comment re initial flow status
The initial single queue srcresult is OK, it hasn't been
NOT_LINKED since 2007.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
Mathieu Duponchelle [Thu, 9 Sep 2021 18:25:25 +0000 (20:25 +0200)]
multiqueue: never consider a queue that is not waiting
.. when computing the high id.
After a flush for instance, sq->srcresult is reset to OK,
yet it doesn't make sense to pick a non-existing position
id as the high id when a queue doesn't contain any items
in that situation either.
It is in any case completely OK to let the not-linked stream
get consumed without throttling at this stage, as any
first packet arriving on other single queues will get assigned
a higher position id.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/885>
Philippe Normand [Sun, 12 Sep 2021 09:07:49 +0000 (10:07 +0100)]
discoverer: Prevent stream tags from leaking in global tags
The PrivateStream should keep track of stream tags only. Likewise, the
GstDiscovererInfo should keep track of global tags only.
This patch fixes the issue where the discoverer would report duplicated tag
titles, especially for Matroska media files. The Matroska demuxer emits
correctly-scoped tags, but downstream was making no distinction of them.
Fixes #598, #836, https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/827
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1275>
Matthew Waters [Thu, 9 Sep 2021 05:44:55 +0000 (15:44 +1000)]
gl/buffer_storage: re-enable GL_ARB_buffer_storage
The extension version doesn't have the ARB suffix.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1273>
Tobias Ronge [Tue, 7 Sep 2021 11:55:08 +0000 (13:55 +0200)]
rtspconnection: Only reset timeout when socket is unused
After sending or retrieving data, gstrtspconnection resets the socket's
timeout to 0 (infinite). This could cause problems if sending and
receiving at the same time. For example, if RTCP data is sent from the
streaming thread while gstrtspsrc is already retrieving data.
With this patch, timeout is only reset to 0 if there is no other
thread using the socket.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1260>
Andika Triwidada [Thu, 9 Sep 2021 04:08:22 +0000 (04:08 +0000)]
add missing space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/884>
Ludvig Rappe [Thu, 2 Sep 2021 09:55:09 +0000 (11:55 +0200)]
pbutils: Add mjpg to MIME codecs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1270>
Jan Schmidt [Sun, 5 Sep 2021 15:43:57 +0000 (01:43 +1000)]
multiqueue: Use running time of gap events for wakeups.
Use gap events to update the next_time of a queue the same
as buffers or segment events. Fixes problems where a group
consisting only of sparse streams primarily driven by
gap events would stall with a full multiqueue because
unlinked streams in the group were not being woken to
push data.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/879>
Mathieu Duponchelle [Sun, 1 Aug 2021 16:20:06 +0000 (18:20 +0200)]
decodebin3: fix unblocking on input gap events
Initial gap events should not be discarded on the input streams,
but instead cause unblocking just as buffers do.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1239>
Philippe Normand [Thu, 24 Jun 2021 15:00:03 +0000 (16:00 +0100)]
parsebin: Guess subtitle/ caps as text streams
The subtitles in ogg/kate are identified using subtitle/ caps names.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1213>
Matthew Waters [Tue, 31 Aug 2021 05:31:23 +0000 (15:31 +1000)]
rtp: add some additional rtcp sdes values
Matches the current list at
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-5
as of 2021-September.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1267>
Ludvig Rappe [Wed, 25 Aug 2021 15:03:49 +0000 (17:03 +0200)]
pbutils: Add function to convert caps to MIME codec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1265>
Ludvig Rappe [Wed, 25 Aug 2021 15:01:19 +0000 (17:01 +0200)]
pbutils: Add function for parsing H.264 extradata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1265>
Matthew Waters [Fri, 27 Aug 2021 03:51:07 +0000 (13:51 +1000)]
element: NULL the lists of contexts in dispose()
If dispose() is called more than once, we may double unref the list of
GstContext's.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/875>
Olivier Blin [Tue, 24 Aug 2021 16:14:22 +0000 (18:14 +0200)]
eglimage: fix redefinition of EGLuint64KHR
It is already defined in gst/gl/egl/gstegl.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1262>
Jan Alexander Steffens (heftig) [Tue, 24 Aug 2021 12:53:30 +0000 (14:53 +0200)]
pad: Keep IDLE probe hook alive during immediate callback
When the probe returns GST_PAD_PROBE_REMOVE and gets called concurrently
from the streaming thread while we're in the callback here, the hook has
already been destroyed by the time we've reacquired the object lock.
Consequently, cleanup_hook gets passed an invalid pointer.
Keep another reference to the hook alive to avoid this situation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/873>
Seungha Yang [Thu, 5 Aug 2021 10:59:38 +0000 (19:59 +0900)]
video-converter: Add support for A420 to RGB fast path
Add fast path for A420 -> RGB format conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1245>
Seungha Yang [Mon, 19 Jul 2021 13:11:41 +0000 (22:11 +0900)]
compositor: Fix crash while drawing background and/or blending for subsampled YUV
Fix crash caused by out-of-bounds memory accesses when drawing
background and/or blending. This fix is conceptually identical to the
approach as the commit of
8ff5079e5eef37b9bd5b212350f0cefbd9546b1b
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1229>
Edward Hervey [Fri, 20 Aug 2021 14:34:16 +0000 (16:34 +0200)]
concat: Properly propagate seqnum of segment events
Was broken by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/819
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/871>
Mathieu Duponchelle [Sat, 14 Aug 2021 23:27:39 +0000 (01:27 +0200)]
encoding-profile: ignore more encoding private fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
Thibault Saunier [Tue, 10 Aug 2021 01:24:34 +0000 (21:24 -0400)]
smartencoder: Respect user `stream-format` when specified
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
Mathieu Duponchelle [Tue, 10 Aug 2021 00:09:09 +0000 (02:09 +0200)]
smartencoder: clean up and extend accepted formats
* Add support for H265
* Don't overwrite original codec_data / streamheader in the output
caps, but instead allow them to change and send them to the
combiner at the right moment: encoder caps, reencoded GOP,
original caps, original GOP(s), and potentially encoder caps
and rencoded last GOP.
* For H264 / H265, force usage of a format with inband SPS / PPS
(avc3 / hev1), this is cleaner than misadvertising avc1, hvc1 and
some muxers like mp4mux will actually advertise both differently.
Unfortunately, while mp4 supports updating the codec_data and using
avc1 with no in-band SPS / PPS updates, it turns out some decoders
(eg chrome / firefox) don't handle this particularly well and stop
decoding after the reencoded GOP. We could expose a switch to
force usage of avc1 / hvc1 nevertheless, but for now stick to
requiring that the parser output SPS / PPS in-band with
config-interval=-1 (that has not changed)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1249>
Seungha Yang [Tue, 3 Aug 2021 15:51:24 +0000 (00:51 +0900)]
compositor: Add "max-threads" property
Adding new property for user to be able to set expected the maximum
number of blend task threads. This can be useful in case that user
wants to restrict the number of parallel task runners for system
resource management or debugging/development purpose.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1242>
Théo MAILLART [Sun, 10 Jan 2021 22:37:21 +0000 (23:37 +0100)]
tests: elementfactory: add element creation tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
Théo MAILLART [Fri, 29 Jan 2021 19:36:51 +0000 (20:36 +0100)]
elementfactory: enable construct only property passing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/736>
Olivier Crête [Wed, 31 Mar 2021 22:36:00 +0000 (18:36 -0400)]
tracer: Add new tracer to list loaded elements and other features
This new tracer will list loaded elements and plugins. This should
make it easier to generate minimal builds of GStreamer.
This also traces other features such as typefind functions, device
providers and dynamic types.
The format of the output of gst-stats should match the parameters
expected by the meson based gst-build system.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
Olivier Crête [Fri, 23 Apr 2021 19:34:26 +0000 (15:34 -0400)]
tracers: Add tracepoint when a plugin feature it loaded
This makes it possible to trace which ones are loaded in a specific
program to make nice statistics.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/782>
Sebastian Dröge [Thu, 1 Jul 2021 09:41:11 +0000 (12:41 +0300)]
pbutils: Expose functions for getting a file extension for caps and flags for describing the format of the caps
This information was available internally already but not available from
the outside.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1221>
Sebastian Dröge [Wed, 4 Aug 2021 07:06:02 +0000 (10:06 +0300)]
playbin/uridecodebin: Emit source-setup signal early before doing the scheduling query
Some elements will require the source to be set up properly before the
scheduling query returns useful results, e.g. appsrc and giostreamsrc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1241>
Edward Hervey [Wed, 18 Aug 2021 08:23:38 +0000 (10:23 +0200)]
pad: Ensure last flow return is set on sink pads in push mode
The last flow return field was never updated on sink pads in push mode. This
fixes it and makes it consistent.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/868>
Devarsh Thakkar [Thu, 10 Jun 2021 07:55:23 +0000 (00:55 -0700)]
ext: alsa: Fix fallback paths for setting buffer and period times
Below fallback paths were introduced in
https://github.com/GStreamer/gst-plugins-base/commit/
9759810d8206b5f1aa199f98599caec3630a1813
if setting period time after buffer time failed :
1) Set period time and then buffer time if it doesn't work
2) Set only buffer time
3) Set only period time
These all were not functioning properly since they were using old
copy of snd_pcm_hw_params_t which already had some fields set
as per previous try and this was causing issues as driver was
referring to that old value while trying to set them again in
fallback paths.
So now we always use the initial copy of snd_pcm_hw_params_t
for every fallback and same is also being done at
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/
557c4295107dc7374c850b0bd5331dd35e8fdd0f
Also we change the sequence to set period time earlier than
buffer time since period bytes being the smaller unit, most of the times
if underlying alsa device has a dependency then it is of period bytes
to be a multiple of some value (as per underlying DMA constraint)
and rest of the parameters like buffer bytes need to be adjusted
as per period bytes.
The same sequence is also followed in alsa-utils at
https://github.com/alsa-project/alsa-utils/commit/
9b621eeac4d55c4e881f093be5b163ca07d01b63
Fix 2) and 3) scenarios by returning success if the exclusive setting is passed
and not doing any further setting for buffer time or period time.
Add new fallback path of not setting any buffer time and period time
if all above fallback paths fail. The same is also being
followed at aforementioned pulseaudio commit.
In case of alsasink, remove the retry goto label, since it is not
required anymore as fallback paths take care of setting default
values if driver is not accepting any of the fallback paths.
Use separate label for exit to free params structs and return err
code. This also fixes leak in no_rate goto path in alsasink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1212>
Jakub Adam [Tue, 25 May 2021 19:16:48 +0000 (21:16 +0200)]
videoencoder: pass upstream HDR information through codec state
Don't copy HDR metadata from sink pad, because its caps may not have
been set yet if GstVideoEncoder::negotiate is called from
GstVideoEncoder::set_format, as e.g. vpx encoder does.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1175>
Jakub Adam [Tue, 25 May 2021 19:15:53 +0000 (21:15 +0200)]
videoutils: add HDR metadata fields to GstVideoCodecState
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1175>
Sebastian Dröge [Mon, 16 Aug 2021 07:19:07 +0000 (10:19 +0300)]
video-overlay-composition: Allow empty overlay compositions
Allowing to pass NULL to the constructor removes the need to
special-case the first rectangle in calling code and generally
simplifies application code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1256>
Per Förlin [Tue, 1 Jun 2021 13:27:31 +0000 (15:27 +0200)]
gstrtspconnection: Add support to ignore x-server header reply
When connecting to an RTSP server in tunnled mode (HTTP) the server
usually replies with a x-server header. This contains the address
of the intended streaming server. However some servers return an
"invalid" address. Here follows two examples when it might happen.
1. A server use Apache combined with a separate RTSP process to handle
Https request on port 443. In this case Apache handle TLS and
connects to the local RTSP server, which results in a local
address 127.0.0.1 or ::1 in the x-server reply. This address is
returned to the actual RTSP client in the x-server header.
The client will receive this address and try to connect to it
and fail.
2. The client use a ipv6 link local address with a specified scope id
fe80::aaaa:bbbb:cccc:dddd%eth0 and connects via Http on port 80.
The RTSP server receives the connection and returns the address
in the x-server header. The client will receive this address and
try to connect to it "as is" without the scope id and fail.
In the case of streaming data from RTSP servers like 1. and 2. it's
useful to have the option to simply ignore the x-server header reply
and continue using the original address.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1192>
Nirbheek Chauhan [Fri, 13 Aug 2021 13:51:41 +0000 (19:21 +0530)]
gstbuffer: Use g_memdup2 instead of g_memdup
This was added in !826 which was created after !803 (which changes
g_memdup -> g_memdup2), but merged before it, so it slipped through.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/866>
Nirbheek Chauhan [Fri, 13 Aug 2021 14:05:23 +0000 (19:35 +0530)]
sdp: Avoid using g_memdup() since it is deprecated
g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib. Instead of using
g_memdup2(), we can simply use the new gst_buffer_new_memdup() added
in 1.19.x
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1254>
Tim-Philipp Müller [Tue, 10 Aug 2021 12:35:14 +0000 (13:35 +0100)]
plugin: load plugins with unknown license strings
We shouldn't fail to load plugins just because we don't
recognise the license string. It's not our job to validate
licenses, and the license list is outdated and ambiguous
anyway.
Also add MPL-2.0 to the list, and fix some defunct license
URLs in the code comments.
Get rid of the hard-coded skip index, doesn't really buy us
much versus just skipping with a few strlens, and is harder
to maintain.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/864>
Matthew Waters [Fri, 4 Jun 2021 08:32:07 +0000 (18:32 +1000)]
glbuffer: support persistent buffer mappings
Requires OpenGL 4.4 or EXT_buffer_storage
Current mesa exposes GL_ARB_buffer_storage when retrieving the relevant
functions returns no-ops and causes failures.
Improves throughput of uploads by roughly 30%-60% and download throughput by
roughly 10-30% across depending on the exact scenario and hardware.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1191>
Stéphane Cerveau [Mon, 2 Aug 2021 12:23:58 +0000 (14:23 +0200)]
identity: provide a log to check the buffers
In order to not rely only on app to display the
message from identity, display the message in the logs
too.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/863>
Seungha Yang [Fri, 30 Jul 2021 14:57:20 +0000 (23:57 +0900)]
examples: win32-videooverlay: Add support for testing gst_video_overlay_set_render_rectangle
Add keyboard handler to test gst_video_overlay_set_render_rectangle()
API for Windows video elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1235>
Seungha Yang [Sat, 31 Jul 2021 18:36:31 +0000 (03:36 +0900)]
examples: controller-graph: Fix build with MSVC
To use macros in math.h, one needs to define _USE_MATH_DEFINES
before including the math.h file. Use glib's math define instead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/862>
Seungha Yang [Fri, 30 Jul 2021 14:04:57 +0000 (23:04 +0900)]
examples: win32-videooverlay: Use d3d11videosink by default
d3d11videosink was promoted to have primary rank and
it's recommended videosink element on Windows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1235>
Seungha Yang [Thu, 8 Jul 2021 08:47:28 +0000 (17:47 +0900)]
tests: appsink: Add reverse stepping test case
To demonstrate reverse stepping issue of
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1223>
Seungha Yang [Thu, 3 Jun 2021 10:15:22 +0000 (19:15 +0900)]
examples: win32-videooverlay: Add test option for threading scenario
Add an option to test the case where window thread and pipeline handling
thread are different. Mainly to test the HWND leak fixed by
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2302
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1188>
Seungha Yang [Tue, 11 May 2021 15:54:43 +0000 (00:54 +0900)]
gst-launch: Enable Windows high-resolution clock
Default timer precision of Windows is dependent on system, but
usually it's known to be about 15ms in worst case.
That's not an enough precision for multimedia application.
Enable high-resolution clock in gst-launch to demonstrate
the usage of Windows high-precision clock for application developers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/817>
Jan Alexander Steffens (heftig) [Fri, 23 Jul 2021 14:20:20 +0000 (16:20 +0200)]
input-selector: Use proper segments when cleaning cached buffers
We need to use the segment associated with the cached buffer, not the
current segment of the pad, otherwise we miscalculate the running time
of cached buffers from before a segment change.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/859>
Matthew Waters [Tue, 27 Jul 2021 07:44:02 +0000 (17:44 +1000)]
rtpbasedepayload: remove object locking an extension
Doing that is fraught with danger of deadlocks and is not conceptually
part of the API contract. The object lock is generally intended for
internal-object-use only.
If another lock is needed, that should be added separately.
This lock was erronously added as part of:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1118
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1233>
Matthew Waters [Tue, 27 Jul 2021 03:30:56 +0000 (13:30 +1000)]
gldownload: use the GstGLSyncMeta in all cases
fixes qmlglsrc ! gldownload ! videoconvert in some cases.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1232>
Stéphane Cerveau [Tue, 20 Jul 2021 07:51:04 +0000 (09:51 +0200)]
gitlab: update bug template
Finetune the bug description.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/854>
Zhao, Gang [Sun, 9 May 2021 03:45:49 +0000 (11:45 +0800)]
gsturi: Set GError if uri is invalid
GError should be set if function call failed and the failed reason is
not a programmer error.
Fixed: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1380
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>
Zhao, Gang [Sun, 9 May 2021 03:13:48 +0000 (11:13 +0800)]
gsturi: Don't treat invalid format of uri as critical error
Normally uri is get from user input and invalid user input should not
be treated as critical error. Moved gst_uri_is_valid outside of
g_return_val_if_fail.
NULL uri is checked inside of gst_uri_is_valid and is correctly
treated as critical error, removed unneeded checks of NULL uri outside
of gst_uri_is_valid function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/816>
Seungha Yang [Tue, 20 Jul 2021 07:52:12 +0000 (16:52 +0900)]
systemclock: Restore default clock mode to monotonic for non-linux system
Before the MR https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/829
Windows and macOS system clock used monotonic clock regardless of
selected clock mode. And because of clock resolution, we should prefer
monotonic over realtime unless realtime clock is selected explicitly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/855>
Nicolas Dufresne [Thu, 22 Jul 2021 21:11:26 +0000 (17:11 -0400)]
glcontext: egl: Stop comparing native surface pointer
This was noticed with wayland, sometimes the newly create native
handle can have the same pointer (even though its new). This lead
to unwanted errors or crash.
Fixes #927
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1231>
Nicolas Dufresne [Thu, 22 Jul 2021 21:02:51 +0000 (17:02 -0400)]
glwindow: Add "window-handle-changed" signal
This allow other objects to clear any wrapper object that depends
on the previous handle, and properly re-create the new wrappers without
having to resort into doing pointer comparison.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1231>
Nicolas Dufresne [Fri, 23 Jul 2021 17:39:34 +0000 (13:39 -0400)]
Revert "glwindow: wayland: Skip redoing surfaces if window haven't changed"
This reverts commit
aba6bd7822f4c0f572765bfaada76f454a594317.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1231>
Guillaume Desmottes [Mon, 22 Feb 2021 12:17:18 +0000 (13:17 +0100)]
appsrc: serialize custom events with buffers flow
Application may want to inject events to the pipeline and keep them
synchronized with the buffers flow.
Fix #247
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1046>
Guillaume Desmottes [Fri, 19 Feb 2021 12:32:48 +0000 (13:32 +0100)]
appsink: add API to catch events
There is currently no way for users to receive incoming events from
appsink while keeping them properly serialized with the buffers flow.
This can be especially useful when application is injecting custom
downstream events into the pipeline and needs to know when they reached
appsink.
Solving this by adding a new signal notifying about new incoming events
and a set of action signals and method to pull those events.
The API is actually pulling the samples and events all together as they
are actually fetched from the same queue.
Having a specific API to pull only events would have the side effect of
discarding samples (and pulling samples would discard events) making
this API not convenient for users.
Partially fix #247
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1046>
Guillaume Desmottes [Fri, 19 Feb 2021 13:45:08 +0000 (14:45 +0100)]
appsink: factor out dequeue_object()
No semantic change, will be used to implement new event API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1046>
Nicolas Dufresne [Tue, 20 Jul 2021 13:37:58 +0000 (09:37 -0400)]
glwindow: wayland: Skip redoing surfaces if window haven't changed
The problem is that EGLNativeWindowSurface and wl_egl_surface are the
same object underneath, so we must recreate both together. As an
optimization, the EGLNativeWindowSurface wrapper is only re-created
if the window_handle changed.
On Mesa, this would cause crash, which will be fixed by:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11979
And will lead to proper errors in the future or on other GL stack. This
issue was encounter using a permanent GstGLDisplay after cycling one of
multiple independent pipelines through NULL state.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1230>
Nicolas Dufresne [Tue, 20 Jul 2021 13:36:22 +0000 (09:36 -0400)]
glwindow: wayland: Remove redundant create_surfaces call
The surfaces will be created in _roundtrip_async, so no need to call
this early. This should cause no functional difference.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1230>
Seungha Yang [Wed, 7 Jul 2021 11:11:13 +0000 (20:11 +0900)]
basesink: Don't swap rstart/rstop when stepping
Step handling is implemented based on unmodified start/stop
segment running time, and basesink takes rate into account for
stepping. This commit is partially undoing new behavior introduced by
the commit of
39b9cc554c960fec8d41f8394c41390883cadeed when stepping.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/848>
Nirbheek Chauhan [Mon, 19 Jul 2021 14:34:16 +0000 (20:04 +0530)]
gstptpclock: Don't leak the GList
120 bytes in 5 blocks are definitely lost in loss record 7,615 of 9,510
at 0x484486F: malloc (vg_replace_malloc.c:380)
by 0x58A2938: g_malloc (gmem.c:106)
by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
by 0x588F059: g_list_prepend (glist.c:335)
by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
by 0x5B9CA8E: cleanup_cb (gstptpclock.c:1930)
by 0x589AD20: g_timeout_dispatch (gmain.c:4889)
by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
by 0x5899A92: g_main_loop_run (gmain.c:4329)
by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
by 0x58C8C31: g_thread_proxy (gthread.c:826)
576 bytes in 24 blocks are definitely lost in loss record 8,782 of 9,510
at 0x484486F: malloc (vg_replace_malloc.c:380)
by 0x58A2938: g_malloc (gmem.c:106)
by 0x58BA1F4: g_slice_alloc (gslice.c:1069)
by 0x588F059: g_list_prepend (glist.c:335)
by 0x5B9C5C0: select_best_master_clock (gstptpclock.c:756)
by 0x5B9EFA0: handle_announce_message (gstptpclock.c:934)
by 0x5B9EFA0: handle_ptp_message (gstptpclock.c:1765)
by 0x5B9EFA0: have_stdin_data_cb (gstptpclock.c:1851)
by 0x589A4CE: UnknownInlinedFun (gmain.c:3337)
by 0x589A4CE: g_main_context_dispatch (gmain.c:4055)
by 0x58EE4E7: g_main_context_iterate.constprop.0 (gmain.c:4131)
by 0x5899A92: g_main_loop_run (gmain.c:4329)
by 0x5B9BA4C: ptp_helper_main (gstptpclock.c:1980)
by 0x58C8C31: g_thread_proxy (gthread.c:826)
by 0x5DA4298: start_thread (pthread_create.c:481)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/852>
Nirbheek Chauhan [Tue, 6 Jul 2021 07:34:04 +0000 (13:04 +0530)]
gstpad: Don't spam INFO when default-chaining a buffer list
This is being logged for each buffer, so it should not use INFO.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/853>
Michael Olbrich [Fri, 11 Jun 2021 07:02:29 +0000 (09:02 +0200)]
decodebin3: improve decoder selection
Currently the decoder selection is very naive: The type with the highest
rank that matches the current caps is used. This works well for software
decoders. The exact supported caps are always known and the static caps are
defined accordingly.
With hardware decoders, e.g. vaapi, the situation is different. The decoder
may reject the caps later during a caps query. At that point, a new decoder
is created. However, the same type is chosen an after several tries,
decodebin fails.
To avoid this, do the caps query while adding the decoder and try again
with other decoder types if the query fails:
1. create the decoder from the next matching type
2. add and link the decoder
3. change the decoder state to READY
4. do the caps query
if it fails then remove the decoder again and go back to 1.
5. expose the source pad
6. sync the decoder state with the parent.
This way, the decoder is already part of the pipeline when the state change
to READY happens. So context handling should work as before.
Exposing the source pad after the query was successful is important:
Otherwise the thread from the decoder source pad may block in a blocked pad
downstream in the playsink waiting for other pads to be ready.
The thread now blocks trying to set the state back to NULL while holding
the SELECTION_LOCK. Other streams may block on the SELECTION_LOCK and the
playsink never unblocks the pad. The result is a deadlock.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1201>
Nicolas Dufresne [Wed, 14 Jul 2021 20:09:41 +0000 (16:09 -0400)]
gl: x11: Issue XSync to close our top level window
This is similar action as when the window handle is modified, we now issue
XSync whenever we destroy our internal window. This ensure that the window is
properly closed before the connecgtion is dropped.
Fixes #815
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1226>
Nicolas Dufresne [Wed, 14 Jul 2021 15:43:10 +0000 (11:43 -0400)]
gl: wayland: Fix hinding the window on close()
When the window is called, we properly destroy all surfaces, which effectively
will unmap that surface and should make it disapear on screen, but we also
destroy the wl_source, a GSource that is resposibble of dispatching and executing
messages to/from the Wayland server.
As a side effect, the server never gets the message and the surfaces are
"leaked" on the server. We fix this using wl_display_flush() before destroying
the wl_source.
Fixes #815
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1226>
Nicolas Dufresne [Thu, 15 Jul 2021 15:09:35 +0000 (11:09 -0400)]
tests: example: Add missing glx_dep when building sdlshare
Might be realted to some recent Mesa cleanup, but GLX is not longer visible
through libOpenGL, so add the missing deps now.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1227>
Stéphane Cerveau [Tue, 15 Jun 2021 08:23:33 +0000 (10:23 +0200)]
gitlab: add bug template
To clarify what is expected in an issue description and avoid
issue which is just an usage issue, add a bug template in gitlab.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/836>
Matthew Waters [Mon, 17 May 2021 02:04:50 +0000 (12:04 +1000)]
examples/qt/textureshare: add explicit dep on glx_dep
Fixes linking:
/usr/bin/ld: subprojects/gst-plugins-base/tests/examples/gl/qt/qglwtextureshare/qglwtextureshare.p/qglrenderer.cpp.o: undefined reference to symbol 'glXGetCurrentContext'
/usr/bin/ld: /usr/lib64/libGLX.so.0: error adding symbols: DSO missing from command line
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1143>
Haelwenn (lanodan) Monnier [Fri, 14 May 2021 12:10:55 +0000 (14:10 +0200)]
gl: Try GLVND 'opengl' and 'glx' first
This fixes targetting desktop OpenGL without libGL.so
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1143>
Sebastian Dröge [Mon, 12 Jul 2021 06:37:24 +0000 (09:37 +0300)]
audioaggregator: Only post QoS messages if the property is enabled
Previously one of the branches did not check for the property value. To
avoid this in the future, check inside the QoS calculation function
instead.
As a side effect this now always prints the debug messages into the logs
when samples are dropped, which is useful information even without the
QoS messages.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
Sebastian Dröge [Fri, 9 Jul 2021 06:49:15 +0000 (09:49 +0300)]
audioaggregator: Resync on the next buffer when dropping a buffer on discont resyncing
If a buffer is dropped during resyncing on a discont because either its
end offset is already before the current output offset of the
aggregator or because it fully overlaps with the part of the current
output buffer that was already filled, then don't just assume that the
next buffer is going to start at exactly the expected offset. It might
still require some more dropping of samples.
This caused the input to be mixed with an offset to its actual position
in the output stream, causing additional latency and wrong
synchronization between the different input streams.
Instead consider each buffer after a discont as a discont until the
aggregator actually resynced and starts mixing samples from the input
again.
Also update the start output offset of a new input buffer if samples
have to be dropped at the beginning. Otherwise it might be mixed too
early into the output and overwrite part of the output buffer that
already took samples from this input into account.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912
which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
Olivier Crête [Wed, 26 May 2021 22:20:02 +0000 (18:20 -0400)]
audiomixer: Add test for QoS message posting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
Olivier Crête [Wed, 26 May 2021 14:38:18 +0000 (10:38 -0400)]
audio aggregator: Post QoS message when dropping audio
Post a QoS message every time some audio samples are dropped.
Also print log messages to make it easier to debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
Olivier Crête [Tue, 25 May 2021 22:05:05 +0000 (18:05 -0400)]
audio aggregator: Count samples that are dropped or processed
Keep a count of samples that are dropped or processed as statistics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
Olivier Crête [Fri, 21 May 2021 20:16:50 +0000 (16:16 -0400)]
audio aggregator: Add QoS property to pad
Add a property to emit a QoS message whenever any data is dropped.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
Olivier Crête [Fri, 21 May 2021 20:10:06 +0000 (16:10 -0400)]
audio aggregator: Rename property enum to match class name
Add "CONVERT" into the property enum as we're going to add an
enum specifically for the base pad.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1209>
Stéphane Cerveau [Tue, 24 Sep 2019 15:14:10 +0000 (17:14 +0200)]
videodecoder: add API to receive subframes
A video decoder can now receive subframes and start decoding
instead of waiting for the full frame to be complete.
Subframe support will reduce latency as described in the
video encoder base class.
A unit test illustrating this API is available in
tests/check/libs/videodecoder.c.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/454>
Kasper Steensig Jensen [Thu, 8 Jul 2021 09:48:58 +0000 (11:48 +0200)]
Add meson description for tracer_hooks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/849>