Commit graph

20203 commits

Author SHA1 Message Date
Niels De Graef
1b6a6cabf2 compositor: Use G_DECLARE_FINAL_TYPE 2020-03-16 15:47:58 +00:00
Niels De Graef
ec84cf92f9 *aggregator: Add g_autoptr support for *ConvertPad 2020-03-16 15:47:58 +00:00
Tobias Ronge
f1b3ed37c6 gstrtpbasepayloader: Add property for scaling RTP timestamp
This patch introduces a property which, if set to FALSE, prevents RTP
basepayloader from scaling the RTP time when a segment's rate is not
equal to 1.0. The specification is ambiguous on this subject and some
clients expect the timestamps not to be scaled.
2020-03-16 10:25:44 +00:00
Matthew Waters
a777fe2628 videometa: constify tc argument to add_video_time_meta()
We don't modify the argument.
2020-03-16 15:34:02 +11:00
Peter Seiderer
7b00e5de99 meson: add window system egl 2020-03-12 10:00:59 +00:00
Guillaume Desmottes
e8f5777c92 rtsp: remove documentation link on GTimeVal
Looks like it's been removed from glib.devhelp2 on Fedora 31.

Fix #508
2020-03-12 13:44:10 +05:30
Matthew Waters
f58914b93b gl/wayland: use wayland's roundtrip_queue()
There's no need to roll our own anymore
2020-03-11 09:17:36 +00:00
Mathieu Duponchelle
0739fafd62 subparse: accept WebVTT timestamps without an hour component
https://www.w3.org/TR/webvtt1/#webvtt-timestamp

mm:ss,000 is a valid WebVTT timestamp
2020-03-11 05:44:23 +00:00
Sebastian Dröge
d5ee11fb36 compositor: Create a square checkerboard for UYVY/YUY2/YVYU too
Previously the "squares" were twice as wide.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/732
2020-03-09 21:51:32 +00:00
Sebastian Dröge
0227d0ca60 compositor: Define a separate checker fill function for BGRx/RGBx than for xBGR/xRGB
Otherwise we'll create a cyan or yellow checkerboard.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/736
2020-03-09 21:51:32 +00:00
Vivia Nikolaidou
d1c9972e94 tcpclientsrc: Fix compilation on FreeBSD
The members of the tcp_info struct are prefixed with a double
underscore, as reported in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/584#note_423487
2020-03-08 10:45:57 +00:00
Philipp Zabel
40773e9c91 glupload: dmabuf: only accept uploads to external-oes if supported by the context
This keeps the DirectDmabufExternal uploader from accepting buffers if
texture-target=external-oes is not supported by the GL context.
2020-03-06 12:02:58 +01: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
Peter Seiderer
51253830f3 meson: static linkig of tools needs gmodule_dep
Add gmodule_dep (analog to gstreamer/tools/meson.build).

Fixes:

.../bin/ld: .../usr/lib/libgstreamer-1.0.a(gstplugin.c.o): in function `gst_plugin_register_func':
gstplugin.c:(.text+0x3bc): undefined reference to `g_module_make_resident'
.../bin/ld: .../usr/lib/libgstreamer-1.0.a(gstplugin.c.o): in function `_priv_gst_plugin_load_file_for_registry':
gstplugin.c:(.text+0x1228): undefined reference to `g_module_supported'
.../bin/ld: gstplugin.c:(.text+0x126c): undefined reference to `g_module_open'
.../bin/ld: gstplugin.c:(.text+0x1368): undefined reference to `g_module_symbol'
.../bin/ld: gstplugin.c:(.text+0x1494): undefined reference to `g_module_supported'
.../bin/ld: gstplugin.c:(.text+0x17f4): undefined reference to `g_module_close'
.../bin/ld: gstplugin.c:(.text+0x1a2c): undefined reference to `g_module_error'
2020-03-04 14:48:15 +00:00
Matthew Waters
5ae7998a8f gl/wayland: use a proxy wrapper for the wl_display
This allows us to remove races when setting the wl_queue on wayland
objects with wl_proxy_set_queue() as each created object is created with
the queue already set.

We can also move all our initilization code into the window as we
can retrieve all wayland objects from each window instance.  This
removes a possible race when integrating with external API's as we would
always attempt to immediately retrieve a small set of wayland objects.
That is no longer the case with the objects from each window instance.
2020-03-04 00:04:18 +00:00
Matthew Waters
3df7edaa49 glfilter: use gst_object_unref/ref functions
Allows better visibility into ref/unref points with the leaks tracer
2020-03-04 00:04:18 +00:00
Matthew Waters
aa703285f9 gl/wayland: fix xdg shell close notification
Don't segfault by not calling the appropriate callback that destroys
resources in the correct order.
2020-03-04 00:04:18 +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
de58d23b5c glbasesrc: add support for changing display's 2020-03-03 02:11:52 +00:00
Matthew Waters
4c008895ce gldisplay: add support removing a context from the internal list 2020-03-03 02:11:52 +00:00
Matthew Waters
55e80b550e gl/mixer: support GstGLDisplay changes 2020-03-03 02:11:52 +00:00
Philipp Zabel
0e038a5612 glupload: dmabuf: add DirectDmabufExternal uploader
Automatic negotiation of texture-target=external-oes does not work
without separating the external-oes support out of the DirectDmabuf
uploader into a separate DirectDmabufExternal uploader.
2020-03-02 11:07:26 +00:00
Philipp Zabel
dedd20f430 glupload: fix transform_caps NULL pointer dereference
gst_gl_upload_transform_caps() is missing a NULL pointer check in case
the current upload method's transform_caps returns a NULL pointer. In
the following loop over all upload methods, NULL pointer return values
are already handled correctly.
2020-03-02 11:07:26 +00:00
Philipp Zabel
7849f22cb3 glupload: dmabuf: support direct upload into external-oes textures
Some drivers support directly importing DMA buffers in some formats into
external-oes textures only, for example because the hardware contains
native YUV samplers.
Note that in these cases colorimetry can only be passed as hints and
there is no feedback whether the driver supports the required YUV
encoding matrix and quantization range.
2020-03-02 11:07:26 +00:00
Philipp Zabel
359e361881 gl/egl: support direct dmabuf import with external-oes only formats
Allow creating EGL images from DMA buffers in formats that the driver
only supports for the external-oes texture target.

Pass the intended texture target to gst_egl_image_from_dmabuf_direct so
that _gst_egl_image_check_dmabuf_direct can decide whether to create an
EGL image for a format that can only be targeted at external-oes
textures by the driver. Allow creating GstGLMemoryEGL objects from these
DMA buffers.
2020-03-02 11:07:26 +00:00
Matthew Waters
7da70e2b9f glquery: fix a possible unintialized value
A GL driver may not fill the resulting value so initialize it to 0
ourselves.
2020-03-02 19:36:50 +11:00
Matthew Waters
c7c2d09acf gl/context/glx: dump GLXFBConfig information to debug logs 2020-03-02 19:36:50 +11:00
Vivia Nikolaidou
ea930a4bf8 tcpclientsrc: Expose connection stats as property
Unfortunately the OS takes care of bad connections for us, so we can't
get the stats in a platform-independent way. Count total bytes received
as well, platform-independently.
2020-02-28 14:17:34 +02:00
Guillaume Desmottes
a12f161724 video-info: fix typo in doc 2020-02-26 16:15:59 +00:00
Guillaume Desmottes
ea2619aadc video: fix GST_VIDEO_FRAME_IS_BOTTOM_FIELD()
GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD is a subset of
GST_VIDEO_FRAME_FLAG_TOP_FIELD so needs to be checked accordingly.

Fix #726
2020-02-26 16:15:59 +00:00
Guillaume Desmottes
26f386ce8b video: add macros checking for GST_VIDEO_BUFFER_FLAG_TOP/BOTTOM_FIELD flags
The GST_VIDEO_BUFFER_FLAG_TOP_FIELD flag is a superset of
GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD as they are defined using other
flags. As a result we can't use GST_BUFFER_FLAG_IS_SET() to check for
those flags.
2020-02-26 16:15:59 +00:00
Stéphane Cerveau
19f27f94ee videoencoder: protect the use of num_subframes
change stream lock location to protect the use of
frame->abidata.ABI.num_subframes
2020-02-24 20:37:38 +00:00
Devarsh Thakkar
8df947df5d videoencoder: Release stream lock in finish_subframe before pad_push
Derived from 780d635dadc0723e39a8ba90cfe0903a2de346fd for
https://bugzilla.gnome.org/show_bug.cgi?id=715192
which was for finish_frame.
2020-02-24 20:37:38 +00:00
Seungha Yang
6dd643532f meson: gl: Update to support when egl and win32 window system are explicitly requested 2020-02-18 21:04:42 +09:00
Seungha Yang
6531037533 glwindow/win32: Accept both win32 and egl display
EGL would be the case where we use ANGLE.
2020-02-18 20:11:40 +09:00
Seungha Yang
929c17e6cc glcontext: egl: Fix build with win32 window system 2020-02-18 20:10:22 +09:00
Seungha Yang
e78c5ffb1b gl: Decouple win32 window and wgl context
With ANGLE, win32 window can be used with gles and egl
2020-02-18 20:10:03 +09:00
Seungha Yang
4a006d6951 glcontext/egl: Fix build with upstream ANGLE
ANGLE_surface_d3d_render_to_back_buffer extension is only available
with Microsoft fork of ANGLE. Note that Microsoft's ANGLE repository
has been deprecated.
2020-02-18 04:48:06 +00:00
Seungha Yang
d176f67d33 gl/window/win32: Handle mouse and key events
This is at least useful for the gst-play-1.0 use case.
2020-02-17 02:42:41 +00:00
He Junyan
07f459caa4 libs: dmabuf: init the GST_CAT_DEFAULT in type define.
To avoid `gst_debug_log_valist: assertion 'category != NULL' failed`
if we do not call gst_dmabuf_allocator_new
2020-02-15 11:42:15 +08:00
Sebastian Dröge
9a55945c0b appsrc/appsink: Make setting/replacing callbacks thread-safe
Previously we would simply use them without any locking at all, while
using the object lock for setting them. Nothing prevented new callbacks
to be set in the meantime, potentially calling a callback with already
freed user_data.

To prevent this move the callbacks into a reference counted struct and
use the appsrc/appsink mutex to protect access to it, which is used in
all functions calling the callbacks already anyway.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/729
2020-02-14 14:42:19 +00:00
Håvard Graff
85e201fe30 rtpbasepayload: add property for embedding twcc sequencenumbers
By setting the extension-ID for TWCC (Transport Wide Congestion Control),
the payloader will embed sequencenumbers as a RTP header-extension
according to https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-2

The negotiation of this being enabled with downstream elements
is done with caps reflecting the way this is communicated using SDP.
2020-02-14 09:40:59 +00:00
Matthew Waters
0e1f7f6e8d gl/window/win32: implement get_window_handle()
Some other frameworks need the HWND to retrieve information from.
2020-02-13 12:31:43 +11:00
Havard Graff
7283a45afe rtpbasepayload: fix test warnings
Compiling with MSVC and Clang.
2020-02-11 14:06:45 +00:00
Kristofer Björkström
4152b0c840 rtpbasepayload: timestamp bug, if rate control=no
With commit "basepayload: Expose onvif-no-rate-control property" the rtp
timestamp changed behaviour when rate control is disabled.

When disabling rate control, we must take care of the stream time to
avoid the timestamps to begin from zero again.
2020-02-11 12:30:49 +00:00
Thibault Saunier
1e9da26b68 discoverer: Start discovering next URI from right thread
When using the cache, we were not using the right GMainContext to setup
next URI to discovery, fix that.
2020-02-10 17:16:42 -03:00
Matthew Waters
a171eb80d6 glcolorconvert: error out if memory context is different than ours 2020-02-05 15:32:14 +11:00
Matthew Waters
2a4a3aa0d6 gltestsrc: NULL out the functions used
Fixes segfault when the display changes
2020-02-05 15:32:14 +11:00