Marijn Suijten [Wed, 13 Jan 2021 10:07:47 +0000 (11:07 +0100)]
video/video-frame: @frame in video_frame_map is out caller-allocates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
Marijn Suijten [Tue, 12 Jan 2021 09:34:41 +0000 (10:34 +0100)]
audio,video: Add `out caller-allocates` to init and from_caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
Sebastian Dröge [Mon, 11 Jan 2021 10:25:33 +0000 (12:25 +0200)]
videosink: Add new GstVideoSink::set_info() virtual method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>
Sebastian Dröge [Sat, 26 Dec 2020 12:16:34 +0000 (14:16 +0200)]
videosink: Implement more complete BaseSink::get_times() based on the framerate
This will only make use of the framerate if the subclass is chaining up
BaseSink::set_caps(). Otherwise it will have the same behaviour as the
basesink default.
Doing so is useful if video buffers don't contain a duration to
calculate a default duration, and various video sinks already implement
a custom version of this.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/986>
Marijn Suijten [Tue, 12 Jan 2021 09:36:34 +0000 (10:36 +0100)]
video: Convert info_to_caps to take self as const ptr
This requires a slight modification to the function itself because it
was overwriting a member locally.
However, now this side-effect cannot be observed outside the function
anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1008>
Matthew Waters [Wed, 6 Jan 2021 00:16:18 +0000 (11:16 +1100)]
gl: add get_type() implementations for all of our memory types
Otherwise, various bindings can't really know the type of an object as
required.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/999>
Jakub Adam [Tue, 12 Jan 2021 21:08:14 +0000 (22:08 +0100)]
rtpbasepayload: fix header extension length calculation
Since ternary operator has the lowest precedence in the expressions at
hand, wordlen would always incorrectly yield 0 or 1.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1009>
Thibault Saunier [Thu, 7 Jan 2021 19:27:25 +0000 (16:27 -0300)]
giosrc: Ensure that an error is posted when underlying file is deleted
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1001>
Jakub Adam [Tue, 14 Jul 2020 18:44:18 +0000 (20:44 +0200)]
video-blend: fix blending 8-bit and 16-bit frames together
Replace hardcoded 255s with the correct max value for the given color
depth. Use 64-bit integer in calculations where overflow may occur.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1000>
Thibault Saunier [Mon, 7 Dec 2020 14:23:49 +0000 (11:23 -0300)]
encodebasebin: Ensure that parsers are compatible with selected encoders
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/845
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/963>
Matthew Waters [Tue, 5 Jan 2021 09:18:24 +0000 (20:18 +1100)]
gl: document some GL caps specifics
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/854
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/996>
Tim-Philipp Müller [Mon, 4 Jan 2021 13:40:20 +0000 (13:40 +0000)]
tagdemux: resize and trim buffer in place to fix interaction with oggdemux
Elements operating in pull mode may optionally pass a buffer to
pull_range that should be filled with the data. The only element
that does that at the moment is oggdemux operating in pull mode.
tagdemux currently creates a sub-buffer whenever a buffer pulled
from upstream (filesrc, usually) needs to be trimmed. This creates
a new buffer, however, so disregards any passed-in buffer from a
downstream oggdemux.
This would cause assertion failures and playback problems for
ogg files that contain ID3 tags at the end.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/848
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/994>
Mathieu Duponchelle [Thu, 31 Dec 2020 16:25:40 +0000 (17:25 +0100)]
appsrc: fix signal documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/992>
Edward Hervey [Wed, 30 Dec 2020 13:56:54 +0000 (14:56 +0100)]
videoaggregator: Pop out old buffers on timeout
This situation happens in the situation where an input stream has a framerate
exceeding the timeout latency (Ex: 1fps with a latency of 500ms) and an input
stream greater than output framerate (ex: 60fps in, 30 fps out).
The problem that would happen is that we would timeout, but then buffers from
the fast input stream would only be popped out one by one.... until a buffer
reaches the low-framerate input stream at which point they would quickly be
popped out/used. The resulting output would be "slow ... fast ... slow ... fast"
of that input fast stream.
In order to avoid this situation, whenever we detect a late buffer, check if
there's a next one and re-check with that one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/990>
Mathieu Duponchelle [Tue, 29 Dec 2020 22:44:42 +0000 (23:44 +0100)]
compositor/blend.c: fix MT checker pattern
When filling the checker pattern from multiple threads, y_start
needs to be taken into account to determine the shade of the
current pixel.
Example pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420 ! \
queue ! compositor sink_0::xpos=200 ! video/x-raw, format=I420 ! videoconvert ! \
xvimagesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
Mathieu Duponchelle [Tue, 29 Dec 2020 22:42:08 +0000 (23:42 +0100)]
compositor/blend.c: fix MT fill_checker for YUY2
The initial byte offset should be calculated from the stride,
not from the dest_add variable
Example pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=YUY2 ! \
queue ! compositor sink_0::xpos=200 ! video/x-raw, format=YUY2 ! xvimagesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
Mathieu Duponchelle [Tue, 29 Dec 2020 19:24:51 +0000 (20:24 +0100)]
compositor/blend: fix blending of subsampled components
The correct way to determine the byte offset at a certain yoffset
in a subsampled component is to shift the yoffset by the component's
hsub
This fixes out-of-bounds memory accesses and visible artefacts,
example pipeline with the samples from #802:
gst-launch-1.0 compositor name=vmixer sink_1::xpos=1910 sink_1::ypos=1080 ! \
videoconvert ! videorate ! xvimagesink \
filesrc location=VID_20200723_203606.mp4 ! decodebin name=demux1 ! \
queue ! videoflip method=vertical-flip ! vmixer. \
filesrc location=bridgeoverstubbledwater.mp4 ! decodebin name=demux2 ! \
queue ! vmixer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
Sebastian Dröge [Thu, 24 Dec 2020 09:44:27 +0000 (11:44 +0200)]
decodebin3: When reconfiguring a slot make sure that the ghostpad is unlinked
This was only taken care of previously if there was a decoder before.
However if previously a decoder was not needed then the ghostpad
would've been linked directly to the slot's srcpad.
Reconfiguring the slot requires this to be undone so that linking can
happen normally.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/985>
Seungha Yang [Sun, 20 Dec 2020 13:35:45 +0000 (22:35 +0900)]
examples: overlay: Add an example for Win32 window handle with playbin
Demonstrate video overlay handling on Windows when playbin is in use
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/983>
Stéphane Cerveau [Tue, 15 Dec 2020 21:05:11 +0000 (22:05 +0100)]
hdr: update doc
update GST_VIDEO_HDR10_PLUS_MAX_ROWS_MD_APL and
GST_VIDEO_HDR10_PLUS_MAX_COLS_MD_APL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/979>
Stéphane Cerveau [Fri, 3 Jul 2020 10:06:14 +0000 (12:06 +0200)]
videodecoder: Forward hdr-format info downstream
By default the hdr-format detected by a parser should
be passed to the downstream element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/650>
Stéphane Cerveau [Fri, 8 May 2020 09:06:42 +0000 (11:06 +0200)]
video-hdr: add hdr formats
Provide enum and helper method to set the hdr format
name in caps by example.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/650>
Stéphane Cerveau [Mon, 19 Oct 2020 13:36:58 +0000 (15:36 +0200)]
video-hdr: introduce HDR10+ parser
Video can now parse a HDR10+ data structure
coming from a SEI message.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/650>
Stéphane Cerveau [Mon, 27 Jan 2020 09:12:05 +0000 (10:12 +0100)]
video-hdr: add HDR10+ structure
Provides structure and GstVideoMeta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/650>
Sebastian Dröge [Tue, 15 Dec 2020 13:07:31 +0000 (15:07 +0200)]
audiorate: Make buffer writable before changing its metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/977>
Fabrice Fontaine [Mon, 14 Dec 2020 06:42:55 +0000 (07:42 +0100)]
gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc 4.8
Fix the following build failure with gcc 4.8 which has been added with
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/
d268c193ad39fb970351ed62898be806ebd0a71e:
../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init':
../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
^
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/974>
Jordan Petridis [Thu, 10 Dec 2020 17:06:00 +0000 (19:06 +0200)]
libvisual: workaround clang warning
libvisual api expects a priv data pointer to be passed, though we know its
going to be `GstDebugLevel`.
```
../subprojects/gst-plugins-base/ext/libvisual/plugin.c:33:39: error: cast to smaller integer type 'GstDebugLevel' from 'void *' [-Werror,-Wvoid-pointer-to-enum-cast]
GST_CAT_LEVEL_LOG (libvisual_debug, (GstDebugLevel) (priv), NULL, "%s - %s",
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/975>
Edward Hervey [Fri, 11 Dec 2020 09:13:59 +0000 (10:13 +0100)]
decodebin3: Release selection lock when pushing EOS
We can't keep the lock otherwise this would lock other actions. In order to keep
it safe, we grab a list of peer pads to send EOS to with the lock taken, then
send to the peer pads with the lock released.
Also make sure the selection lock is taken for another call to this function
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/847
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/971>
Edward Hervey [Fri, 11 Dec 2020 10:40:22 +0000 (11:40 +0100)]
typefind: Fix debug category usage
Only register it in one place and use it everywhere from the header. Also make
sure it doesn't clash with the debug category from core.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/972>
Stéphane Cerveau [Fri, 4 Dec 2020 15:55:53 +0000 (16:55 +0100)]
typefindfunctions: allow per features registration
Split plugin into features including
typefind functions which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Stéphane Cerveau [Tue, 1 Dec 2020 12:34:15 +0000 (13:34 +0100)]
pbtypes: allow per features registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Stéphane Cerveau [Mon, 30 Nov 2020 10:00:30 +0000 (11:00 +0100)]
subparse: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.
More details here:
i
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Julian Bouzas [Tue, 11 Aug 2020 15:47:02 +0000 (11:47 -0400)]
ogg: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Stéphane Cerveau [Thu, 22 Oct 2020 09:07:26 +0000 (11:07 +0200)]
playback: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Stéphane Cerveau [Fri, 16 Oct 2020 12:35:04 +0000 (14:35 +0200)]
alsa: allow per feature registration
Split plugin into features including
elements and device providers which
can be indiviually registered during
a static build.
More details here:
https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/900>
Thibault Saunier [Wed, 9 Dec 2020 13:40:40 +0000 (10:40 -0300)]
tests: Fix races in the read-growing-file test
First: the buffer is pushed on the encoding filesink only *after* the
checkpoints, leading to wrong ordering in expectations.
The second one is about EOS being posted on the bus *before* the
stop action is executed, leading to the action never being executed.
That action was plain useless as the default behavior of validate
scenario is to internally create a "stop" action on EOS (unless
disabled by user).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/968>
Thibault Saunier [Thu, 19 Nov 2020 22:17:18 +0000 (19:17 -0300)]
giosrc: Add support for growing source files
Add a way for applications to specify that the underlying file is
growing which implies that the source won't EOS when reaching the end
of the file but instead start monitoring it and start reading it again
whenever a change is detected.
Also add a validate test to check the behavior
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/937>
Seungha Yang [Wed, 25 Nov 2020 19:04:48 +0000 (04:04 +0900)]
video: Make use of gst_video_chroma_site_{from,to}_string() API
Replace deprecated gst_video_chroma_{from,to}_string()
to newly added gst_video_chroma_site_{from,to}_string()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/927>
Seungha Yang [Tue, 10 Nov 2020 09:01:12 +0000 (18:01 +0900)]
video-chroma: Add support for any combination of chroma-site flags
We've been allowing only a few known chroma-site values such as
jpeg (not co-sited), mpeg2 (horizontally co-sited) and
dv (co-sited on alternate lines). That's insufficient for
representing all possible chroma-site values. By this commit,
we can represent any combination of chroma-site flags.
But, an exception here is that any combination with
GST_VIDEO_CHROMA_SITE_NONE will be considered as invalid value.
For any combination of chroma-site flags,
gst_video_chroma_to_string() method is deprecated in order to
return newly allocated string via a new gst_video_chroma_site_to_string()
method. And for consistent API naming, gst_video_chroma_from_string()
is also deprecated. Newly written code should use
gst_video_chroma_site_from_string() instead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/927>
Jakub Adam [Mon, 30 Nov 2020 20:38:08 +0000 (21:38 +0100)]
rtpbasepayload: pass optional caps fields in a GstStructure
For more flexibility, allow to pass the extra output caps fields as
a GstStructure.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/952>
Ratchanan Srirattanamet [Thu, 5 Dec 2019 13:08:36 +0000 (20:08 +0700)]
audiobasesrc: always acquire if not acquired in _setcaps
audiobasesrc's setcaps contains an optimization that makes it not re-
acquire the ringbuffer if the caps have not changed. However, it doesn't
check if it has successfully acquired it or not. It's possible to have
the caps set but not having ringbuffer acquired if the previous attempt
to acquire fails.
This commit replaces the caps existence check with whether the
ringbuffer is acquired or not. There's no need to check for caps
existence because 1.) it's unlikely to be NULL if the ringbuffer is
acquired, and 2.) _setcaps shouldn't be called with a NULL caps.
This should also let the element retry on acquiring ringbuffer after an
error by re-setting the element's state to READY and back to PLAYING.
Whether this behavior is correct is up for debate.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/512>
He Junyan [Fri, 6 Nov 2020 06:05:39 +0000 (14:05 +0800)]
glimagesink: Avoid assert in query.
The sink_query just uses context, other_context and display to query info.
But all these objects can be changed or distroyed in state_change() func
and other places.
This patch is not very perfect. The condition race still exists in other
places in this element. All the functions directly access these objects
without protection. Most of them are executed when the data is pushing and
draw context/window have already been established, so they should not have
problems. But the sink_query and propose_allocation functions are the query
-like functions and executed in query context, which can be called in any
state of the element. So it can cause some crash issues because of destroyed
context object.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
He Junyan [Fri, 6 Nov 2020 08:18:14 +0000 (16:18 +0800)]
glcolorconver: Return empty caps in transform_caps if fails.
We should not return a NULL in transform_caps() function. The NULL
will generate a assert of:
"transform_caps returned caps which are not a real subset of the
filter caps"
in transform base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
He Junyan [Fri, 6 Nov 2020 07:36:01 +0000 (15:36 +0800)]
glbasefilter: Need to check the display before lock it.
In find_gl_context_unlocked(), the display of filter may be NULL
and can cause crash if we directly access and lock it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
He Junyan [Fri, 6 Nov 2020 07:36:21 +0000 (15:36 +0800)]
glbasefilter: Delete the un-paired unlock in change_state().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
Arun Raghavan [Thu, 3 Dec 2020 11:50:07 +0000 (06:50 -0500)]
audioencoder: Fix incorrect GST_LOG_OBJECT usage
GstBuffer is not a GstObject, so this causes a warning to be emitted.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/956>
Matthew Waters [Fri, 10 Jul 2020 05:33:46 +0000 (15:33 +1000)]
rtp/basepayload: implement support for rtp header extensions
New signals are added for managing the internal list of rtp header
extension implementations read by a specific depayloader instance.
If the 'extmap-$NUM' field is present in the src caps, then an
extension implementation will be requested but is not required to be able
to negotiate correctly. An extension will be requested using the
'request-extension' signal if none could be found internally.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
Matthew Waters [Fri, 10 Jul 2020 05:30:57 +0000 (15:30 +1000)]
rtp/basedepayload: implement support for rtp header extensions
New signals are added for managing the internal list of rtp header
extension implementations read by a specific depayloader instance.
If the 'extmap-$NUM' field is present in the sink caps, then an
extension implementation will be requested but is not requited to be
able to negotiate correctly. An extension will be requested using the
'request-extension' signal if none could be found internally.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
Matthew Waters [Fri, 10 Jul 2020 05:14:09 +0000 (15:14 +1000)]
rtp: add base object for reading/writing rtp header extensions (RFC5285)
Facilitates the creation of rtp header extension implementations that
can be reused across applications.
Implementations are registered into the GStreamer registry as elements
(idea from GstRTSPExtension) and can be retrieved by URI or filtered
manually. RTP header extensions must have the classification
"Network/Extension/RTPHeader" to be considered as a RTP Header
extension.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/777
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
Mart Raudsepp [Thu, 26 Nov 2020 12:52:26 +0000 (14:52 +0200)]
gl/eagl: Fix automatic resize behaviour
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/681
added a layoutSubViews, which never gets called, because it should have been
called layoutSubviews (non-capital "v"). However after fixing that, it still
doesn't work correctly, because window_width/height values are immediately
updated and then draw_cb will never trigger the resize path, because the
values are already up to date.
Update the values inside the resize path again instead, so the check for
entering the resize path is logically always correct.
This makes the layoutSubviews unnecessary, as it only updated the internal
size values prematurely, so it is deleted instead of method naming fixed.
These changes were originally done to avoid accessing UIKit objects on the
main thread, but no additional accesses are added here, only internal
private variable assignments under the same draw_lock, so there should be
no threading issues reintroduced.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/945>
Mart Raudsepp [Thu, 26 Nov 2020 12:45:05 +0000 (14:45 +0200)]
gl/eagl: Fix resize condition check in draw_cb to not get called unnecessarily
A CGSize contains CGFloat values (a typedef to double or float), which means
that the values aren't equal, despite it being equal after they are cast to
int by assigning them to window_height/width private members. This leads to
excessive gst_gl_window_resize calls on each frame, at least if the CGFloat
value has a .5 decimal value, e.g. 103.5.
Fix it by storing them as CGFloat instead of gint.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/945>
Matthew Waters [Fri, 20 Nov 2020 05:51:09 +0000 (16:51 +1100)]
video/converter: increase the number of cache lines for resampling
The exising hardcoded max default does not account for the possible
-1 offset when retrieving lines for resampling. As a result, when
another chain has the same number of cache lines (4), the resample
operation would be attempting to generate 5 lines with a cache size
of 4 and would overwrite the first cache line.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/821
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/938>
Sebastian Dröge [Tue, 1 Dec 2020 11:13:40 +0000 (13:13 +0200)]
compositor: Don't crash in prepare_frame() if the pad was just removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/950>
Guillaume Desmottes [Tue, 1 Dec 2020 08:31:48 +0000 (09:31 +0100)]
videometa: gir annotate the size of plane array in new API
Fix #838
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/949>
Thibault Saunier [Thu, 19 Nov 2020 22:06:12 +0000 (19:06 -0300)]
encodebin: Enhance algorithm to check if profiles can be plugged to muxer
In particular muxing sinks have specific set of sinkpads and we need
to handle that.
Thibault Saunier [Thu, 19 Nov 2020 22:03:29 +0000 (19:03 -0300)]
encodebin: Ignore element classification when a muxer name specified
Instead of going through the list of known muxers go ahead and
instantiate the muxer specified as 'preset name' as this specifies
the exact element factory name to use.
Thibault Saunier [Fri, 13 Nov 2020 19:32:45 +0000 (16:32 -0300)]
pbutils: Add support for muxing sinks usage in encoding profiles
Thibault Saunier [Fri, 13 Nov 2020 19:32:45 +0000 (16:32 -0300)]
encoding: Implement encodebin2 with an ON_REQUEST src pad
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/304
Thibault Saunier [Fri, 13 Nov 2020 16:06:32 +0000 (13:06 -0300)]
encodebin: Split implementation into a base class
Create EncodeBaseBin as a base class for the existing
encodebin to allow other implementations.
Co-authored with Jan Schmidt <jan@centricular.com>
Seungha Yang [Fri, 27 Nov 2020 19:14:14 +0000 (04:14 +0900)]
glcontext: wgl: Implement check_feature vfunc
There are several WGL specific extenstions such as WGL_NV_DX_interop.
Currently we have no WGL specific extension support and
this commit is also only for debugging purpose.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/947>
Sanchayan Maity [Fri, 27 Nov 2020 06:11:36 +0000 (11:41 +0530)]
audiodecoder: Move max_errors out of GstAudioDecoderContext
Currently max-errors gets set during init to default or via property.
However, if a decoder element calls gst_audio_decoder_reset with 'full'
argument set to TRUE, it would result in all the fields of context being
zeroed with memset. This effectively results in max-errors getting a
value of 0 overriding the default or user requested value set during
init.
This would result in calls to GST_AUDIO_DECODER_ERROR which track error
counts and allow max-errors, to be ineffective.
To fix this move max-errors out of GstAudioDecoderContext, as changes to
context should not affect this. The error_count is anyways also in
GstAudioDecoderPrivate and not in context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/946>
Stéphane Cerveau [Thu, 26 Nov 2020 16:37:01 +0000 (17:37 +0100)]
opus: disable docs option in meson fallback
As the docs are not necessary, no need to keep it
enabled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/943>
Marijn Suijten [Wed, 25 Nov 2020 19:16:53 +0000 (20:16 +0100)]
video: Provide "deprecated in" version for gst_video_color_transfer fns
As requested in [1].
[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/940#note_706437
Fixes:
d0f36c7e1 ("video: Rename video_color_transfer to video_transfer_function")
Marijn Suijten [Tue, 24 Nov 2020 19:54:49 +0000 (20:54 +0100)]
audio: Move fill_silence into audio_format_info
With the function named gst_audio_format_fill_silence it would get
associated to the GstAudioFormat type in .gir which is incorrect and
confusing. See [1] for the discussion sparking this change.
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/630#note_694795
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/940>
Jan Schmidt [Wed, 25 Nov 2020 12:54:08 +0000 (23:54 +1100)]
xvimagesink: Add support for the XV_COLORSPACE attribute.
The XV_COLORSPACE attribute exists on some Xv adapters, with the same
semantics as the XV_ITURBT_709 attribute that was already supported.
A value of 0 is bt601, and 1 is for bt709 colorspace.
Fixes color shifting issues displaying bt709 content on some Xv
adapters.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/941>
Edward Hervey [Fri, 13 Nov 2020 16:45:12 +0000 (17:45 +0100)]
decodebin3: Take into account decoder latency for interleave size
Some decoders might introduce quite large latencies, which would result in
multiqueue draining out on some streams. In order to avoid that, check the
latency of decoders and adjust the minimum interleave time of multiqueue
accordingly.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/800
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/931>
Edward Hervey [Thu, 19 Nov 2020 13:35:32 +0000 (14:35 +0100)]
decodebin3: Don't leak filter caps
Introduced by previous commit
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/934>
Edward Hervey [Sat, 14 Nov 2020 08:43:59 +0000 (09:43 +0100)]
decodebin3: Properly handle caps query with no filter
There's no guarantee that upstream elements will do queries with specified
filter caps. If that's the case, just return GST_CAPS_ANY
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933>
Tim-Philipp Müller [Sat, 7 Nov 2020 17:30:19 +0000 (17:30 +0000)]
opus: add subproject fallback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/924>
Mathieu Duponchelle [Sat, 7 Nov 2020 01:59:09 +0000 (02:59 +0100)]
compositor: expose zero-size-is-unscaled property
When that property is left to its default, the width and height
property considers frames from input pads with width or height <= 0
should be left unscaled in that dimension.
Setting this property to FALSE changes that behaviour to < 0, as when
animating these properties, 0 should be a valid end value (eg. shrinking
an input stream until it disappears).
The default value of the width and height properties is set to -1, so that
the default behaviour stays consistent whether that new property is set
or not.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/923>
Mathieu Duponchelle [Tue, 27 Oct 2020 23:01:16 +0000 (00:01 +0100)]
video-converter: switch to using a task pool ..
.. and make use of that API in videoaggregator.
When setting certain properties, such as cropping or the scaled
size of pads, a new converter is created by videoaggregator.
Before that patch, this implied spawning new threads, potentially
at each aggregate cycle when interpolating pad properties. This
is obviously wasteful, and re-using a task pool removes that
overhead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/896>
David Keijser [Tue, 10 Nov 2020 22:26:39 +0000 (23:26 +0100)]
Fix segfault when using invalid encoding profile
Trying to use gst_encoding_profile_get_file_extension on a
GstEncodingProfile with a cap containing a typo would result in strcmp
being called with NULL. Instead use g_strcmp0 that handles this case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/929>
Jan Alexander Steffens (heftig) [Tue, 3 Nov 2020 16:00:53 +0000 (17:00 +0100)]
videoaggregator: Fix locking around vagg->info
Take `GST_OBJECT_LOCK` when writing `vagg->info`, so that reading in
subclasses is protected against races, as documented in the struct.
/*< public >*/
/* read-only, with OBJECT_LOCK */
GstVideoInfo info;
`gst_video_aggregator_default_negotiated_src_caps` should take the
`GST_VIDEO_AGGREGATOR_LOCK` to avoid racing with
`gst_video_aggregator_reset` called by
`gst_video_aggregator_release_pad` of the last sinkpad. Otherwise it can
happen that `latency = gst_util_uint64_scale (...` gets called with a
zero framerate.
There doesn't seem to be any reason not to use the local `info` instead
of `vagg->info`, so do that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/915>
Guillaume Desmottes [Mon, 26 Oct 2020 07:59:34 +0000 (08:59 +0100)]
video: fix doc warning
@mode has been renamed to
gst_video_decoder_set_interlaced_output_state() but not in the header
file, raising a doc warning.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/894>
Jan Schmidt [Wed, 4 Nov 2020 17:43:47 +0000 (04:43 +1100)]
video-converter: Skip input lines where possible.
There is a case where there are no lines in the temp cache, and
it's possible to skip straight to the request line and not generate
intermediate ones. This is really only beneficial when doing
nearest-neighbour downscaling, as other methods generally require
all input lines sequentially to generate the output. In that case,
this change has no effect and all lines are generated and cached
as before.
As a side effect however, this fixes corruption when downscaling
using nearest-neighbour, as interactions with the pass_alloc flag
and reuse of temporary lines causes the unecessarily-generated
cache lines to overwrite the final output.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/919>
Jan Schmidt [Tue, 3 Nov 2020 15:11:30 +0000 (02:11 +1100)]
examples: Add a compositor mosaic example.
Add an example of configuring compositor to display 2 videos
side-by-side in a mosaic, and additionally configure some
video-converter properties to demonstrate how that works..
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/919>
He Junyan [Wed, 4 Nov 2020 15:05:27 +0000 (23:05 +0800)]
gluploadelement: Avoid race condition in propose_allocation().
The inside upload and context may have race condition in the function
of propose_allocation(). They may be destroyed while this function is
stilling using it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/916>
He Junyan [Wed, 4 Nov 2020 09:02:13 +0000 (17:02 +0800)]
gluploadelement: Avoid race condition of base class' context.
The base class' context may change, we should use the common API
with lock to access it, rather than the just directly access the
struct field.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/916>
Nirbheek Chauhan [Wed, 4 Nov 2020 13:12:11 +0000 (18:42 +0530)]
meson: Enable some MSVC warnings for parity with GCC/Clang
This makes it easier to do development with MSVC by making it warn
on common issues that GCC/Clang error out for in our CI configuration.
Continuation from https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/223
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/918>
He Junyan [Tue, 3 Nov 2020 12:19:16 +0000 (20:19 +0800)]
gluploadelement: Avoid race condition of inside upload creation.
The operations for the inside GstGLUploadElement->upload have race
condition. The _transform_caps() will creates this object if it does
not exist, while the _stop() and change_state() can destroy this object.
The _transform_caps() is called by the gst_base_transform_query(),
so it does not hold the stream lock. It may use the upload while the
_stop() and change_state() has already destroy that object, and then
crash.
Fix: #645
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/913>
Sebastian Dröge [Tue, 3 Nov 2020 14:40:38 +0000 (16:40 +0200)]
gl: Fix prototype of glGetSynciv()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/914>
Thibault Saunier [Fri, 30 Oct 2020 16:56:16 +0000 (13:56 -0300)]
videoaggregator: Guarantee that the output format is supported
In the case `videoaggregator` is set as allowing format conversions,
and as we convert only on the sinkpads, we should ensure that the
chosen format is usable by the subclass. This in turns implies
that the format is usable on the srcpad.
When doing conversion *any* format can be used on the sinkpads, and this
is the only way that we can avoid race conditions during renegotiations
so we can not change that fact, we just need to ensure that the chosen
intermediary format is usable, which was not actually ensured before
that patch.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/834
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/909>
Seungha Yang [Fri, 30 Oct 2020 18:14:20 +0000 (03:14 +0900)]
videodecoder: Don't assume GstVideoChromaSite and GstVideoColorimetry
Even if given GstVideoChromaSite and/or GstVideoColorimetry has unknown
value(s), assumption for an unknown value should be done by subclass or
downstream element, not a role of video decoder. And subclass might
want to output unknown value as is.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/910>
Seungha Yang [Fri, 30 Oct 2020 18:16:00 +0000 (03:16 +0900)]
videodecoder: Remove trailing whitespace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/910>
Jan Alexander Steffens (heftig) [Fri, 30 Oct 2020 12:52:29 +0000 (13:52 +0100)]
tcpserversink: Don't assume g_socket_get_remote_address succeeds
When the client disconnects immediately after connecting, the remote
address is no longer available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/908>
Thibault Saunier [Thu, 29 Oct 2020 19:38:44 +0000 (16:38 -0300)]
video-aggregator: Fix renegotiation when using convert pads
Since
23189c60f4cff998c7880e1768cee2f6d1b719d0 we started using the
useless result of `modified_caps` which, was never used since it was
introduced 7 years ago (in videomixer2). The intersection is useless and
we should just avoid doing it at all (which was always the case before)
as it can end up failing renegotiation for bad reasons.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/905>
Seungha Yang [Wed, 27 May 2020 14:20:25 +0000 (23:20 +0900)]
gst-play: Add support for audio mute control
Assign 'm' keyboard input to control audio mute state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/674>
Nicolas Dufresne [Wed, 28 Oct 2020 19:51:27 +0000 (15:51 -0400)]
tests: allocator: Fix FDMemory portability issue
This fixes few issues in the test but mainly some portability issue reported
on Ubutun. The test now uses a randomly name tempory file located into system
default tempory location and uses glib wrappers when available.
Fixes !895
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/901>
Dinesh Manajipet [Sat, 24 Oct 2020 18:15:19 +0000 (23:45 +0530)]
gl: optimize glcolorbalance by precomputing shader math
Precompute the rgb -> yuv conversion and color balance adjustment math
so that the shader does minimal work per pixel.
Merging these 15+ steps into 3 steps let us jump from choppy
360p video to smooth 720p video on our underpowered embedded system.
If we can remove the clamp() step inside the shader, or apply it after
rgba
conversion, there are more performance benefits to reap. But I am not
sure
what the side effects will be in that case.
<https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/893>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/893>
Matthew Waters [Wed, 28 Oct 2020 12:26:27 +0000 (23:26 +1100)]
gl/build: use the brcm GL libraries on the rpi
Upstream RPi has moved to a completely separate GL library names now due
to conflicts.
See https://github.com/RPi-Distro/repo/issues/134
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/898>
Tobias Ronge [Tue, 27 Oct 2020 13:12:42 +0000 (14:12 +0100)]
fdmemory: Allow for change of protection mode
After a memory has been unmapped, protection mode can now be changed
when mapping it again.
See https://bugzilla.gnome.org/show_bug.cgi?id=789952.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/895>
Mathieu Duponchelle [Wed, 28 Oct 2020 00:19:37 +0000 (01:19 +0100)]
videoaggregator: document and fix locking in convert pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/897>
Tim-Philipp Müller [Wed, 28 Oct 2020 13:22:09 +0000 (13:22 +0000)]
gldeinterlace: fix doc blurb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/899>
Xavier Claessens [Sun, 8 Apr 2018 00:52:12 +0000 (20:52 -0400)]
Meson: Use pkg-config generator
Seungha Yang [Thu, 22 Oct 2020 10:16:42 +0000 (19:16 +0900)]
urisourcebin: Fix crash caused by use after free
OutputSlotInfo doesn't hold ref of queue, so gst_bin_remove()
will free the queue memory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/888>
Zebediah Figura [Wed, 21 Oct 2020 19:55:40 +0000 (14:55 -0500)]
theoradec: Set telemetry options only if they are nonzero
Setting telemetry options, even to zero, causes libtheora to enable an expensive code path. For large enough videos (e.g. 1920x1080) this can increase the time to decode each frame by 30-40 ms, which can be enough to cause noticeable stutter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/887>
Michael Tretter [Wed, 21 Oct 2020 09:42:54 +0000 (11:42 +0200)]
glslstage: delete shader on finalize of stage
GLSLstage creates the glShader using glCreateShader, but never calls
glDeleteShader if the glShader is not used anymore. This forces the GL
library to keep the compiled shader around, because it might be used in
the future. Therefore, the glShader is leaked whenever a GLSLStage is
destroyed.
Fix the leak by deleting the glShader when finishing the GLSLStage.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/886>
Sebastian Dröge [Tue, 20 Oct 2020 09:44:21 +0000 (12:44 +0300)]
audio/videodecoder: Initialize max_errors in instance_init()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/882>
Sebastian Dröge [Tue, 20 Oct 2020 08:51:08 +0000 (11:51 +0300)]
audio/videodecoder: Don't reset max-errors in reset()
Otherwise setting the property on the elements has no effect at all
because it's immediately reset during startup.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/881>
Seungha Yang [Mon, 12 Oct 2020 18:34:07 +0000 (03:34 +0900)]
examples: Add an uridecodebin3 example
Demonstrate a way to select multiple streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/880>