Commit graph

2431 commits

Author SHA1 Message Date
Tim-Philipp Müller e539f0cd67 Use new gst_buffer_new_memdup()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1170>
2021-05-26 11:46:27 +00:00
Thibault Saunier 4188959a79 tests: Update expectation files with sorted structure fields 2021-05-21 17:10:07 -04:00
Jose Quaresma 56380af717 tests: use the real name of the videoscale test in GST_REGISTRY
The videoscale tests uses the same name as the one used in base tests.
Fix this and use the name of the videoscale test on the test environment GST_REGISTRY

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1146>
2021-05-14 23:24:20 +01:00
Matthew Waters f03071439f gl/api: improve the to/from string for GstGLAPI/GstGLPlatform
With unit tests now!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/809>
2021-05-13 15:35:23 +10:00
Haihao Xiang c778686a3c test: enlarge the number
This is to make sure the case can pass after adding new video formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1141>
2021-05-11 12:24:41 +08:00
Sebastian Dröge 26b8a96b84 appsrc: Add test for testing the max-* and leaky-type properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1133>
2021-05-05 15:13:33 +00:00
François Laignel ca7a964fb1 Use gst_element_request_pad_simple...
Instead of the deprecated gst_element_get_request_pad.
2021-05-05 11:55:54 +03:00
Stéphane Cerveau 9b6a425aa4 playback-test: add window title
If playbin mode, display the current uri

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1122>
2021-04-29 23:47:05 +00:00
Doug Nazar b14c2e6fb0 opengl: Silence macOS OpenGL deprecations
As of macOS 10.14 the entire OpenGL system is deprecated. No need to
log the general warnings about it. Specific warnings are still enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1123>
2021-04-24 22:26:36 -04:00
Stéphane Cerveau 403e0024f1 playback-test: fix seek crash
check that app->seek_format exists before seeking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1095>
2021-04-23 11:43:17 +02:00
Doug Nazar 27c392bda3 tests/tcp: Fail if unable to start pipelines.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1105>
2021-04-20 09:49:23 +00:00
Doug Nazar a273573d1e overlaycomposition: Fix test for big endian.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1103>
2021-04-12 04:39:49 -04:00
Jakub Adam 1a87a6572e rtpbasedepayload: handle caps change partway through buffer list
While preparing a blist for pushing, some RTP header extension may
request caps change for a specific buffer in the list. When this
happens, depayloader should immediately push those buffers from the list
that precede the currently processed buffer (for which the caps change
was requested) and only then apply the new caps to the src pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1011>
2021-03-12 18:45:04 +01:00
Vivia Nikolaidou 2527c8f9f8 libs: audio: Handle meta changes in gst_audio_buffer_truncate
Set timestamp and duration to GST_CLOCK_TIME_NONE unless trim==0,
because that function doesn't know the rate and therefore can't
calculate them. Set offset and offset_end to appropriate values. Make it
clear in the documentation that the caller is responsible for setting
the timestamp and duration.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1039>
2021-02-18 11:25:32 +02:00
Thibault Saunier a8fca8d040 encodebin: Add APIs to set element properties on encoding profiles
User often want to set encoder properties on encoding profiles,
this introduces a way to easily 'preset' properties when defining the
profile. This uses GstStructure to define those properties the same
way it is done in `splitmux` for example as it makes simple to handle.

This also defines a more complex structure type where we can map a set
of properties to set depending on the muxer/encoder factory that has
been picked by EncodeBin so it is quite flexible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1002>
2021-02-10 15:56:26 +00:00
Vivia Nikolaidou 278b10dd2e videoconvert,videoscale: Add alternate-field negotiation tests
Make sure buffers with alternate-field interlacing mode can be
negotiated

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1027>
2021-02-04 21:47:27 +02:00
Guillaume Desmottes df9064fdc6 rtpbasedepayload: set attributes on newly requested extensions
Users were supposed to configure the extension themselves but it was
impossible to do so as they didn't have access to the caps.

Fix #864

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1021>
2021-01-27 09:48:49 +01:00
Guillaume Desmottes 912cf46b83 rtpbasepayload: set attributes on newly requested extensions
Users were supposed to configure the extension themselves but it was
impossible to do so as they didn't have access to the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1021>
2021-01-27 09:48:49 +01:00
Knobe, Daniel cdbf535f01 overlay/example: added qt core dependency for qt overlay example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1020>
2021-01-27 07:44:59 +00:00
Matthew Waters 4caab55109 gl/examples: fix recordgraphic example
Not ported to proper modern OpenGL though but that is the case for a lot
of the GL examples.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/859

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1016>
2021-01-22 14:04:39 +11:00
Marijn Suijten abb026ec6a gl,video: Make ptrs to VideoInfo and (GL)AllocationParams immutable
These parameters are incorrectly regarded as mutable in G-IR making them
"incompatible" with languages that are explicit about mutability like
Rust. In order to clean up the code and expected API there, update the
signatures here, right at the source (instead of overriding them in
Gir.toml and hoping for the best).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1005>
2021-01-14 11:53:10 +00:00
Seungha Yang 932dfd4031 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>
2020-12-20 23:51:27 +09:00
Thibault Saunier 22d37a930c 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>
2020-12-09 10:52:24 -03:00
Thibault Saunier f1f966d987 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>
2020-12-08 12:14:58 -03:00
Seungha Yang 410efd196a 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>
2020-12-08 07:21:28 +00:00
Matthew Waters 7a53fbad68 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>
2020-12-03 10:19:32 +00:00
Matthew Waters 092ea647bb 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>
2020-12-03 10:19:32 +00:00
Matthew Waters 427c3f4442 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>
2020-12-03 10:19:32 +00:00
Marijn Suijten 3ec795f613 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>
2020-11-25 19:18:25 +01:00
Mathieu Duponchelle c50f4477ec 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>
2020-11-12 17:38:34 +00:00
Jan Schmidt f51b3fcd26 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>
2020-11-05 07:14:20 +00:00
Thibault Saunier d268c193ad 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>
2020-11-03 00:10:31 +00:00
Nicolas Dufresne db4567152d 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>
2020-10-29 09:45:25 +00:00
Tobias Ronge e2a1aa44df 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>
2020-10-28 17:11:05 +00:00
Seungha Yang 91ed298bb0 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>
2020-10-19 20:45:38 +09:00
Seungha Yang 615b1ac579 tests: appsrc: Fix unstable test case
Wait all buffers to be consumed before sending flush seek event,
so that checking timestamp and segment as expected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/816>
2020-10-14 10:57:19 +00:00
Will Miller ac72a6adaa gstrtpbuffer: fix header extension length validation
We validate the header extensions length of an RTP buffer by comparing
it against the block size. Since we multiply the length in words by 4 to
get the length in bytes, a suitably large length could cause a wrapround
of the uint16, giving a lower length which erroneously passes the check
and allows the buffer to be mapped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/864>
2020-10-12 15:01:22 +01:00
Jan Alexander Steffens (heftig) a6ed17c273 examples/gl/gtk: Add missing dependency on gstgl
Occasionally, a clean build would fail like this:

    In file included from ../subprojects/gst-plugins-base/tests/examples/gl/gtk/gstgtk.c:24:
    ../subprojects/gst-plugins-base/gst-libs/gst/gl/gl.h:25:10: fatal error: gst/gl/gl-enumtypes.h: No such file or directory
       25 | #include <gst/gl/gl-enumtypes.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~

Add the missing dependency so that the headers are generated beforehand.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/855>
2020-10-10 03:46:39 +00:00
Matthew Waters 52793dbfca tests: add gl structs to abi check
Tested on x86, x86_64, armv7l, aarch64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/854>
2020-10-09 06:12:30 +00:00
Nicolas Dufresne 6643e941be meson: Add a qt5 feature
This allow opting out items of the builds the depends on QT5 library.
Auto-detection of QT5 in cross-build requires host tools to match with the
sysroot, and detection of mis-match is not fully reliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/817>
2020-09-15 14:15:36 -04:00
Marijn Suijten d0f36c7e13 video: Rename video_color_transfer to video_transfer_function
Rename remaining `gst_video_color_transfer_{encode,decode}` functions on
the `GstVideoTransferFunction` enumeration to
`gst_video_transfer_function_{encode,decode}` permitting
gobject-introspection to turn these into associated functions and place
them under the respective `<enumeration>` block in gir XML files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/805>
2020-09-12 09:46:44 +03:00
Sebastian Dröge 40a1e01740 glmixer: Fix unit test to actually work reliably
Don't run the harness in live mode, or otherwise it would output frames
already in the very beginning before a buffer was provided to it due to
timeout.

Also send EOS/a second buffer before pulling a buffer as videoaggregator
has one frame of latency.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/812>
2020-09-10 14:19:04 +03:00
Sebastian Dröge 91ec4e06d7 video: Rename gst_video_color_transfer_*() to gst_video_transfer_function_*() in new API
The type is called GstVideoTransferFunction so the function names should
match, otherwise gobject-introspection is keeping the functions as
global functions instead of methods on the type.

The same mistake was also made in lots of other APIs over the years, but
here we can at least fix it for 1.18 still.

Thanks to Marijn Suijten for noticing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/807>
2020-09-07 13:04:20 +03:00
Josh Matthews 855315cd39 Add required dependencies of cocoa GL example for linking.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/782>
2020-08-10 16:18:31 +00:00
Sebastian Dröge 61064257ef videoaggregator: Update for additional info parameter to the "samples-selected" signal
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/590

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/780>
2020-08-07 09:34:37 +03:00
Guillaume Desmottes dd5f7f1bf9 gl: move each gl platform specific API to its own gir
With contributions from:
Thibault Saunier <tsaunier@igalia.com>
Matthew Waters <matthew@centricular.com>

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/651

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/661>
2020-08-06 04:09:09 +00:00
Mathieu Duponchelle 1de8af6f8b videoaggregator: update to new samples selection API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/778>
2020-08-05 20:09:52 +02:00
Jordan Petridis 66ff1eedca tests/check/elements/audioresample.c: avoid implict int ot float conversion
Also use doubles instead so the calculation won't overflow

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/773>
2020-08-04 17:32:31 +03:00
Xavier Claessens 0d246fb8b0 Meson: find_program() will return gst-tester from subproject
gstreamer now use override_find_program() so it won't return the system
version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/776>
2020-08-04 07:11:54 -04:00
Tim-Philipp Müller 141062c4d6 examples: compositor: fix build with older GLib versions
Don't use g_hash_table_steal_extended() which was only
added in 2.58.

Fixes #801

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/772>
2020-07-31 23:24:02 +00:00