Commit graph

3587 commits

Author SHA1 Message Date
Mathieu Duponchelle
1aef6b8fd5 glcolorscale: fix documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/653>
2020-05-15 14:34:16 +00:00
Edward Hervey
add3023f09 gloverlaycompositor: Don't leak caps feature
Only copy it if we really are going to modify and use it

CID #1439873

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/652>
2020-05-05 17:17:57 +02:00
Matthew Waters
5d47b8e232 gl: fix application context querying between elements
Fixes error introduced by:
a4e49ba8c9
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Using the application GL context as the local GL context is not going to
work very well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>
2020-04-27 11:36:02 +10:00
Guillaume Desmottes
989bbe29d8 opusdec: add 'stats' property
Allow users to retrieve the number of samples, and their duration,
generated using PLC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/641>
2020-04-24 14:49:05 +02:00
Matthew Waters
a4e49ba8c9 gl: avoid deadlock querying for OpenGL context
If there are two elements and threads attempting to query each other for
an OpenGL context. The locking may result in a deadlock.

We need to unlock each element's context_lock when querying another
element for the OpenGL context in order to allow any other element to
take the lock when the other element is querying for an OpenGL context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642>
2020-04-24 18:03:16 +10:00
Jan Schmidt
f16d970f77 textrender: Don't calculate caps on every buffer
Only renegotiate with downstream when the srcpad has a pending
reconfigure flag, instead of querying, fixating and sending caps
for every buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/640>
2020-04-21 23:17:28 +10:00
Matthew Waters
cdd5470f06 glvideomixer: fix black output after display changes
Partial revert of 55e80b550e

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/743
2020-04-14 12:03:49 +10:00
Matthew Waters
ebf8198a97 glvideomixer: intersect with template caps when updating
Downstream may provide extra things when we ask it for caps that we may
need to remove.

Fixes the following pipeline warning:

gltestsrc ! glvideomixerelement ! glimagesinkelement

** (gst-launch-1.0:908581): WARNING **: 13:53:28.518: glvideomixer0: update_src_caps returned caps which are not a real subset of the filter caps
2020-04-14 12:03:49 +10:00
Jan Schmidt
212c94312e textrender: Fix AYUV output.
Fix the check for whether the element is operating in ARGB mode. It
was incorrectly checking if the output format has an alpha channel,
which is true for both ARGB and AYUV, leading to the element
incorrectly outputting ARGB values into AYUV caps.
2020-04-09 18:29:51 +00:00
Philippe Normand
3f79805aa0 gl/wayland: Mouse events handling 2020-03-19 09:59:47 +00:00
Philippe Normand
5a4c5e9169 gl/navigation: Scroll events dispatch support 2020-03-19 09:59:47 +00:00
Edward Hervey
0200175d97 gloverlay: Fix various issues in allocation handling
* A copy-paste error was getting the information from the wrong
  query
* The 'allocation_meta' GstStructure was being leaked
* No check was done on whether the query existed (to try to set the
  resulting allocation meta on)

CID: 1439872
CID: 1439873
CID: 1439874
CID: 1439875
CID: 1439876
CID: 1439877
2020-03-05 06:01:50 +00:00
Matthew Waters
6dbda0681b glstereomix: support gl display changes 2020-03-03 02:11:52 +00:00
Matthew Waters
7e2073000a glbasefilter: add support for changing the display
Each element will remove its usage of the old display and context and
try to retrieve a new GL context.
2020-03-03 02:11:52 +00:00
Matthew Waters
4e12363cb7 glstereosplit: support gl display changes 2020-03-03 02:11:52 +00:00
Matthew Waters
55e80b550e gl/mixer: support GstGLDisplay changes 2020-03-03 02:11:52 +00:00
Matthew Waters
2a4a3aa0d6 gltestsrc: NULL out the functions used
Fixes segfault when the display changes
2020-02-05 15:32:14 +11:00
Tim-Philipp Müller
37c996dcf4 clockoverlay: fix bogus time display caused by previous commit
Fixes regression introduced by "clean-up" done as part of commit 98ebcb4.

dummy must live as long as use the return value of localtime_r() since
that's just a pointer to it, and by putting it inside the block we made
dummy go out of scope right after localtime_r() returned, which messed
up the time values since when we poked at the struct the contents might
already have been overwritten.

Fixes #722
2020-01-23 18:28:45 +00:00
Philippe Normand
6be01f0738 oggstream: Workaround for broken PAR in VP8 BOS
Similarily to the Theora mapping, process 0:N, N:0 and 0:0 pixel aspect ratios
as 1:1.

Fixes #719
2020-01-13 09:09:02 +00:00
Tim-Philipp Müller
cd4e64f885 meson: add graphene subproject
So we can build all the OpenGL elements.
2020-01-08 17:28:46 +00:00
Stéphane Cerveau
f8dc428a2a remove various useless linefeed in logs 2019-12-11 10:07:12 +01:00
Tim-Philipp Müller
2b99761dcf tests: oggmux: check vorbisenc + theoraenc availability at runtime
HAVE_VORBIS was used but never set, so only 3 out of 7 tests
actually ran. Drop now-unused HAVE_THEORA define.
2019-12-09 07:33:55 +00:00
Tim-Philipp Müller
72bafd442f vorbis: drop unneeded check for vorbis_synthesis_restart()
This was added in 1.0.1 more than 16 years ago, I think we
can safely assume this is always present now. Also in tremor.

While at it, bump vorbis requirement to 1.3.1 from 2010.
2019-12-09 07:33:55 +00:00
Tim-Philipp Müller
98ebcb4b8a pango: check if localtime_r is available
HAVE_LOCALTIME_R was used, but never defined.
2019-12-09 07:33:55 +00:00
Ambareesh "Amby" Balaji
d7913a0d14 opusenc: Add low delay option
Fixes #681
2019-11-17 18:23:59 +00:00
Nicolas Dufresne
95abc6c263 gldownload: Fix renegotiation loop
When DMABuf was tried, we would renegotiate back and fourth between
DMABuf and system memory if the export failed. This would happen for
every single frame.

This patch introduces try_dmabuf_exports boolean, which is unset when
an export failed. This boolean is then put back to TRUE when upstream
pushes new caps, or downstream pushes a reconfigure event.
2019-11-11 17:11:45 -05:00
Nicolas Dufresne
a09674dd6d gldownload: Refactor download mode selection
This introduces an enum in order to cleanup how we select the
transfer mode. It also fixes the case where we callback to PBO but
we didn't execute the PBO. That was not causing any issue, just that
the processing latency would be delayed to the next element, which
can be confusing.
2019-11-11 17:01:23 -05:00
Nicolas Dufresne
ac0d19b72f eglimage: Fix exported DMABuf size
All we know is the height and the stride, so make sure not to expose
the DMABuf larger then the size we know about.
2019-11-11 17:01:23 -05:00
Nicolas Dufresne
747ae7d769 gldownload: Wait on sync meta if any
This is possibly not strictly needed when pixels are being downloaded to
CPU memory, but would cause issue when exporting DMABuf, as the data may
not be yet ready when the DMABuf reaches the consumer.
2019-11-11 17:01:18 -05:00
Matthew Waters
a32cd0e55e gl/gbm: ensure we call the resize callback before attempting to draw
Without this, sinks will not be notified about size changes or even the
initial size and would render at 0x0.
2019-11-05 07:27:29 +11:00
Guillaume Desmottes
b418b4b6ec gl: use gst_video_meta_set_alignment() 2019-11-02 13:05:43 +01:00
Nicola Murino
4ed345b7eb glimagesink: fix upper-left and upper-right rotate matrices 2019-10-30 14:59:40 +01:00
Tim-Philipp Müller
289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Sebastian Dröge
73bd32e791 glfilters: Don't use static variables for storing per-element state 2019-10-03 00:49:09 +00:00
Axel Mårtensson
5d3c948572 alsasink: pause/resume
alsasink can now detect a resume, stop and pause. The sink is now
properly paused using snd_pcm_pause(), and without losing any data
2019-09-27 05:34:57 +00:00
Thibault Saunier
51e49ab96b oggdemux: Move seeking in pull mode to the streaming thread
Flushing and teering down the streaming thread from the seeking thread
and simply letting the streaming thread handle the seek event in its
loop function.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/639
2019-09-06 15:06:53 +00:00
Thibault Saunier
909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Matthew Waters
cbd4110611 oggdemux: fix werror build on macos
../ext/ogg/gstoggdemux.c:1071:7: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
      packet->granulepos);
      ^~~~~~~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1062:96: note: expanded from macro 'GST_DEBUG_OBJECT'
#define GST_DEBUG_OBJECT(obj,...)       GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG,   obj,  __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~
../ext/ogg/gstoggdemux.c:1312:15: error: format specifies type 'long' but the argument has type 'ogg_int64_t' (aka 'long long') [-Werror,-Wformat]
              packet.granulepos);
              ^~~~~~~~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:1060:98: note: expanded from macro 'GST_WARNING_OBJECT'
#define GST_WARNING_OBJECT(obj,...)     GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, obj,  __VA_ARGS__)
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Library/Frameworks/GStreamer.framework/Versions/1.0/include/gstreamer-1.0/gst/gstinfo.h:646:31: note: expanded from macro 'GST_CAT_LEVEL_LOG'
        (GObject *) (object), __VA_ARGS__);                             \
                              ^~~~~~~~~~~
2019-08-30 13:27:28 +10:00
Matthew Waters
0973e1d07a gl: also build plugin with -fobjc-arc
Fixes macos werror build

../ext/gl/caopengllayersink.m:336:23: error: '__bridge_retained' casts have no effect when not using ARC [-Werror,-Warc-bridge-casts-disallowed-in-nonarc]
    ca_sink->layer = (__bridge_retained gpointer)layer;
                      ^~~~~~~~~~~~~~~~~~
2019-08-30 13:20:37 +10:00
Niels De Graef
0314b482f3 Don't pass default GLib marshallers for signals
By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
2019-08-27 07:31:57 +02:00
Mathieu Duponchelle
e0fadd6fdd docstrings: port ulinks to markdown links 2019-08-23 18:28:16 +02:00
Philippe Normand
8d122f21ad gl: New pushsrc-based glbasesrc base class
The gltestsrc element was refactored to inherit from this base class which
handles the GL context. The sub-class only needs to implement the gl_start,
gl_stop and fill_gl_memory vfuncs, along with properly advertizing the GL APIs
it supports through the supported_gl_api GstGLBaseSrc class attribute.
2019-08-20 09:51:05 +01:00
Mathieu Duponchelle
79c3304375 timeoverlay: chain up finalize
Mistakenly forgot to amend this in for !325
2019-08-07 20:18:34 +02:00
Mathieu Duponchelle
72eb7c6a74 timeoverlay: add a property to show times as dates
In this mode, buffer timestamps are displayed as an absolute date
since a user-specifiable epoch. The format is also specifiable as
a string property, that will be passed to g_date_time_format().
2019-08-06 02:09:44 +00:00
Matthew Waters
df7b189ecb gluploadelement: don't passthrough on same caps
If we do, then multiple disjoint OpenGL contexts will not perform the
necessary download and reupload of data that is necessary to cross between
each OpenGL context sharegroup.
2019-07-24 14:27:30 +10:00
Matthew Waters
f31b83bc86 glvideomixer: perform _get_highest_precision on the GL thread
gst_gl_shader_string_get_highest_precision needs to make an OpenGL call
so execution outside the OpenGL thread and context results in undefined
behaviour.
2019-06-13 09:37:37 +00:00
Matthew Waters
b596bf7cb7 glmosaic: port to opengl3/gles2
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/543
2019-06-13 09:37:37 +00:00
Thibault Saunier
ac5d0f7da6 alsa: Implement a DeviceProvider
Removing gstalsadeviceprobe.[ch] as it was a relique from the 0.10
century.

This doesn't implement device monitoring but only probing, monitoring
should be implemented in its own commit.
2019-06-04 14:07:37 +00:00
Mathieu Duponchelle
d3e983280b gstglfiltershader: don't try to link to "version" in doc 2019-05-25 17:26:52 +02:00
Mathieu Duponchelle
1c85065d16 doc: fix element section documentations
Element sections were not rendered anymore after the hotdoc
port, fixing this revealed a few incorrect links.
2019-05-25 16:55:57 +02:00