Commit graph

19926 commits

Author SHA1 Message Date
Haihao Xiang 6d0f796591 glimagesink: add support for P010 variants
This makes a pipeline below works:

little endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10LE ! glimagesink

big endian:
gst-launch-1.0 videotestsrc ! video/x-raw,format=P010_10BE ! glimagesink
2019-06-18 16:32:00 +08:00
Haihao Xiang 49f16489ab glcolorconvert: rename the NV12/NV12 shader to semi planar
This shader can be used for other semi planar formats, e.g. P010_10LE
2019-06-18 16:18:02 +08:00
Song Bing 3aa1437ae4 playsink: Set ts-offset to text sink.
Find right text sink to set the ts-offset.
2019-06-18 06:14:28 +00:00
Haihao Xiang 3f63295280 glimagesink: add support for BGR10A2_LE / RGB10A2_LE
This makes a pipeline below work:

gst-launch-1.0 videotestsrc ! video/x-raw,format={BGR10A2_LE, \
RGB10A2_LE} ! glimagesink
2019-06-18 02:58:16 +00:00
Haihao Xiang d15a516037 glformat: removde dead break after return 2019-06-18 02:58:16 +00:00
Roman Sivriver 2b25862973 video-and: Fix buffer overflow detected by asan
gst_meta_api_type_register() assumes that the last tags element is null, but it wasn't

==17422==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f4e2a67c998 at pc 0x7f4e2a0c92ac bp 0x7ffcc41f80b0 sp 0x7ffcc41f80a0
READ of size 8 at 0x7f4e2a67c998 thread T0
    #0 0x7f4e2a0c92ab in gst_meta_api_type_register ../subprojects/gstreamer/gst/gstmeta.c:94
    #1 0x7f4e2a5582c3 in gst_video_afd_meta_api_get_type ../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1146
    #2 0x404c7c in invoke_get_type (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404c7c)
    #3 0x406b5c in dump_irepository (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x406b5c)
    #4 0x407089 in main (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x407089)
    #5 0x7f4e295b4b6a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26b6a)
    #6 0x404479 in _start (/home/ubuntu/gst-build/build/tmp-introspect5gv1rovo/GstVideo-1.0+0x404479)

0x7f4e2a67c998 is located 40 bytes to the left of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1232:25' (0x7f4e2a67c9c0) of size 24
0x7f4e2a67c998 is located 0 bytes to the right of global variable 'tags' defined in '../subprojects/gst-plugins-base/gst-libs/gst/video/video-anc.c:1141:25' (0x7f4e2a67c980) of size 24
SUMMARY: AddressSanitizer: global-buffer-overflow ../subprojects/gstreamer/gst/gstmeta.c:94 in gst_meta_api_type_register
2019-06-17 22:03:34 -04:00
Seungha Yang 3dc9f772ec tests: pbutils: Add test parsing H265 profiles 2019-06-15 17:17:36 -04:00
Seungha Yang 3f0e1f937d codec-utils: Add parsing H265 range extensions profiles
Add support all h265 profiles defined by ITU-T H.264 (02/2018) revision
2019-06-15 17:17:36 -04:00
Wonchul Lee 7883663e26 appsrc: Fix typo in documentation 2019-06-15 14:33:32 +09:00
Wonchul Lee afcfb22f83 videodecoder: Fix typo in documentation 2019-06-15 10:44:48 +09:00
Håvard Graff 2572f4d7c5 meson.build: use join_paths() on prefix
So that "/" are correct on Windows.
2019-06-14 15:47:49 +00:00
Adrian Negreanu 96363a3425 glcontext_egl: check if eglChooseConfig has a matching config
The specs recommends to also check the num_config parameter.
2019-06-14 12:59:03 +03:00
Nirbheek Chauhan abd80b6561 compositor: Copy frames as-is when possible
The blend functions for alpha formats need to do more work than just
doing a memcpy, so we can do a memcpy when we know that a blend is not
actually needed.

1080p AYUV ! compositor background=transparent ! fakesink - 56% faster

Specifically, when we don't draw the background and the first pad we
draw completely covers the output frame, we can just copy it as-is.
The rest of the pads (if any) will get composited on top normally.
2019-06-14 02:50:51 +05:30
Stian Selnes eaade96409 rtpbasedepayload: Add max-reorder property
Add max-reorder property to make the old hard coded reordering limit of
100 configurable. It's particularly useful in some scenarios to set
max-reorder=0 to disable the behavior that the depayloader will drop
packets.

Note that although the default value is 100, the default limit has
increased with one because of the changed if-test. This was done to
allow the max-reorder value to be more intuitive. See tests.
2019-06-13 19:41:11 +03:00
Nirbheek Chauhan bb1650cfda compositor: Sprinkle some const in prototypes
These helper functions don't edit the rectangles passed in.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ba4484c6a0 compositor: Skip background if transparent and obscured
If the background is transparent and obscured by a pad that may or may
not have alpha, we can still skip drawing it entirely

AYUV 1080p ! compositor background=transparent ! fakesink - 75% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ba20aec539 compositor: Skip the background when not visible
We don't need to waste time drawing the background when one of the
pads completely covers the output and there's no alpha on the pad or
in the video format. Speedups:

I420 1080p ! compositor ! fakesink - 72% faster
I420 1080p ! compositor background=black ! fakesink - 45% faster
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan 65615a841d compositor: Don't log per-frame under GST_INFO 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan ecec30c1ca compositor: Factor-out rectangle-obscuring check
We're going to use this for checking if one of the pads obscures the
background.
2019-06-13 20:31:50 +05:30
Nirbheek Chauhan a3462a2c6d compositor: Add some comments, remove outdated ones 2019-06-13 20:31:50 +05:30
Nirbheek Chauhan cf3287dba4 compositor: Remove unused function argument 2019-06-13 20:31:50 +05:30
Matthew Waters 7ff2cfa977 tests/gl-launch-lines: gltestsrc works on gles2/opengl3 now
There's no need to feature gate the gltestsrc pipelines anymore
2019-06-13 09:37:37 +00: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
Matthew Waters 6a399b95a8 glcontext: add a couple of preconditions of invalid usage 2019-06-13 07:08:06 +00:00
Víctor Manuel Jáquez Leal 634ff541d0 gl: detect possible GL version prefix
Instead of checking if the requested GL API is GLES2 (because ANY can
be set) the string is matched with the GLES2 prefix, and if so, then
the string is offset.
2019-06-12 20:42:34 +02:00
Havard Graff 5d51c45b17 meson: add rtpmeta-tests 2019-06-12 15:33:41 +00:00
Havard Graff f7408f9418 rtpbasepayload: don't use GINT_TO_POINTER with GType
GType can (and will) be 64bit. GINT_TO_POINTER is not.
This will result in the api-type checked for being a different one than
it actually is...
2019-06-12 12:38:26 +00:00
Havard Graff 2e342a16ce rtpbasedepayload: don't consider existing GstRTPSourceMeta
The meta should always be generated based on what is present in the
rtp-header.
2019-06-12 12:38:26 +00:00
Marc Leeman a83859aaee gstrtppayloads: add vp8/vp9/opus encoding-name
Adding these encoding names allows easy lookup of the caps based on the
encoding-name.
2019-06-12 12:32:33 +00:00
Eike Hein 303f927d70 rtspconnection: Start CSeq at 1
RFC 7826 recommends (but does not require) starting at 0,
but at least one known server implementation fails to copy
request sequence numbers <1 into responses due to an
incorrect null check.

The server known to exhibit this behavior is the Parrot
Streaming Server, serving video from their UAV devices.
A fix has been submitted upstream as well:
https://github.com/Parrot-Developers/librtsp/pull/2

The Parrot developers are known to have tested with LibVLC.
In WireShark debugging, LibVLC appears to start with a CSeq
of 2, which is likely why this bug went unnoticed.

This reverts 487595a7d6, which set this to 0 citing the
RFC. The switch to 0 was thus a recent one; it's therefore
possible server implementors relied on the previous
GStreamer client behavior in their tests as well.

Fixes #624.
2019-06-12 16:21:41 +09:00
Haihua Hu 2ea98270b4 viv-fb: fix build break for GST_GL_API
Need include config.h in gstglwindow_viv_fb_egl.c
2019-06-11 18:55:00 +08:00
Thibault Saunier e0ebd29a17 discoverer: Plug some leaks in the cache loading path 2019-06-07 22:44:31 -04:00
Matthew Waters bdb43689a9 gl/tests: fix shader creation tests part 2
Continuation of 4fd7a2c783

We check the availability of the high precision floats in GLSL shaders
which involves an OpenGL call and thus is required to be executed on the
OpenGL thread.

The tests were not respecting that and could fail on more strict
drivers.

Tests update for 675415bf2e
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/590
2019-06-08 02:59:13 +10:00
Matthew Waters 4fd7a2c783 gl/tests: fix shader creation tests
We check the availability of the high precision floats in GLSL shaders
which involves an OpenGL call and thus is required to be executed on the
OpenGL thread.

The tests were not respecting that and could fail on more strict
drivers.

Tests update for 675415bf2e
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/590
2019-06-07 11:14:39 +00:00
Mathieu Duponchelle 944396af33 valgrind: suppress incorrect conditional error in orc backup code 2019-06-05 20:51:47 +00:00
Mathieu Duponchelle d6847fe04d discoverer: unref "next" variant when parsing from variant 2019-06-05 20:51:47 +00:00
Mathieu Duponchelle 81ae045e3d valgrind: free buffer list in audiorate test 2019-06-05 20:51:47 +00:00
Mathieu Duponchelle 5934dc6ba3 valgrind: suppress conditional jump or move error
valgrind gets confused with the following piece of code:

var37.i = ORC_CLAMP_SL((orc_int64)var33.i + (orc_int64)var34.i);

Where all variables are orc_int32
2019-06-05 20:51:47 +00:00
Fernando Herrrera 80547d9437 wayland: set the event queue also for the xdg_wm_base object 2019-06-05 13:27:56 +01:00
Niels De Graef 93daa1435a Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means we
no longer need the macro there, but for most types in base/gst-libs we
don't want to break ABI, which means it's better to just keep it like it
is (and use the `#ifdef` instead).
2019-06-04 20:31:09 -04: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 fad8539c31 docs: override rtsp library project name
.. to avoid conflicts with the rtsp plugin
2019-06-04 15:04:03 +02:00
Mathieu Duponchelle 1abecb3f42 docs: override rtp library project name
.. to avoid conflicts with the rtp plugin
2019-06-04 14:58:45 +02:00
Niels De Graef ab165db6a9 meson: Bump minimal GLib version to 2.44
This means we can use some newer features and get rid of some boilerplate code using the G_DECLARE_* macros.

As discussed on IRC, 2.44 is old enough by now to start depending on it.
2019-06-03 16:18:51 +00:00
Mathieu Duponchelle 59dd2af6d6 compositor: remove invalid test
With https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/159,
a single flush start on an aggregator sinkpad will start the flushing
process if the aggregator isn't already flushing.

The behaviour that this test was checking for is thus no longer correct
2019-06-03 14:05:14 +00:00
Daniel Klamt 394ad27507 Added GI annotation for gstvideoaffinetransformationmeta apply_matrix
The problem is that Gobject Introspections does not understand the const
gfloat matrix[16] as an matrix but as an array of gfloasts but as just
one gfloat.

To fix this i added the annotation to the parameter
descriptions.
2019-06-02 16:42:57 +00:00
Mathieu Duponchelle e3e5ccdb08 docs: unprefix subproject paths
special case for app, renamed to applib to not conflict
with the plugin
2019-06-01 02:39:20 +02:00
Mathieu Duponchelle d98835fdef doc: remove xml from comments 2019-05-30 01:12:59 +02:00
Thibault Saunier 1d2994ce64 overlaycompositor: Show the full example instead of a stripped down version 2019-05-29 14:41:10 -04:00