Commit graph

20178 commits

Author SHA1 Message Date
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
Matthew Waters
1abd05dbff glviewconvert: fix reset context for GL context change
We need to remove GL resources from the old context instead of the new
GL context.  The two GL context may not even be shared.
2020-02-05 15:32:14 +11:00
Matthew Waters
af1986352b glviewconvert: fix a use-after-free with allocation params
_free(params) followed by a params->align is a bad idea :)
2020-02-05 15:32:14 +11:00
Matthew Waters
cbffe13d60 glviewconvert: also remove GL buffers on a reset
Fixes a possible memory leak on renegotiation
2020-02-05 15:32:14 +11:00
Matthew Waters
9461d178ea gl/basesrc: call gl_stop when shutting down
Fixes multiple leaks
2020-02-05 15:31:38 +11:00
Havard Graff
19e4d1a93c rtpbuffer: add gst_rtp_buffer_get_extension_onebyte_header_from_bytes
So that one can parse the GBytes returned by gst_rtp_buffer_get_extension_bytes
2020-02-04 08:44:43 +00:00
Mathieu Duponchelle
54cc985810 videoaggregator: handle gap buffers properly
This simply implies not trying to "prepare" those buffers,
as mapping an empty buffer to a video frame does not make
much sense.

This also adds a simple test in compositor that performs
some trivial checking of the handling of gap events, the test
was not failing before, but an error was logged, this is
no longer the case.

Fixes #717
2020-01-30 19:02:44 +01:00
Sebastian Dröge
72cb0c0641 videoaggregator: Don't configure NULL chroma-site/colorimetry
If there's no known value in the best caps then the functions to convert
them to strings will return NULL. Having the fields not in the caps is
not a problem, having them with a NULL value however will cause
negotiation failures.
2020-01-28 22:07:44 +02:00
Dimitrios Katsaros
e0a195b7bf decodebin3: Reset main group id on PAUSED->READY state change
The main_input stream-id would not get reset when going to READY state.
This would cause warnings when trying to reuse the same decodebin3, since
you would get a new STREAM_START event with a new stream-id, which would
collide with the now stale stream-id
2020-01-27 09:33:37 +00:00
Dimitrios Katsaros
36cada4542 decodebin3: Reduced logging level of messages
The logging is set to warning for a drain event, which is part of the
normal functionality of the parsebin.
2020-01-27 09:33:37 +00: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
Dimitrios Katsaros
19b7b248cc uridecodebin3: Fixed defauts not being set on initialization
The default values were not being set on element initialization. This
was a problem for buffer_duration and buffer_size since they would be
zero initialized, rather then being set to -1. This would cause the
underlaying queue2 element to have no limits and depending on the
streamed file, could cause queue2 to allocate massive amounts of memory.
2020-01-17 13:34:27 +01:00
Thibault Saunier
ae2b4f8899 encodebin: Add missing 'Since' marker 2020-01-13 18:33:29 -03: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
Nicolas Dufresne
104458071a tests: rtpbasedepayload: Test flow return whith push/push_list
This validate that the base class properly save and return the flow
return value received when gst_rtp_base_depay_push/push_list() helper is
being used.
2020-01-11 19:39:55 -05:00
Nicolas Dufresne
8b2afcf56a rtpbasepayload: Save and forward the push flow return
Save push/push_list helper flow return and in case of failure, return it
in the process function. This allow forwarding downstream flow return
even if the subclass is using the push/push_list helper.
2020-01-11 19:39:55 -05:00
Víctor Manuel Jáquez Leal
f4bcf8290b playbin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
In decodebin3 and uridecodebin3 the `force-sw-decoders` boolean property is
added. In uridecodebin3 it is only a proxy property which will forward
the value to decodebin3.

When decodebin3 has `force-sw-decoders` disabled, it will filter out in its
decoder and decodable factories those elements within the 'Hardware'
class, at reconfiguring output stream.

playbin3 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS, and sets
`force-sw-decoders` property accordingly to its internal uridecodebin, also
filters out the 'Hardware' class decoder elements when caps
negotiation.
2020-01-09 12:28:32 +00:00
Víctor Manuel Jáquez Leal
f3182a88b1 playbin2: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
Added `force-sw-decoders` boolean property in decodebin2 and
uridecodebin. By default the property is %FALSE and it bypass the new
code. Otherwise the factory list is filtered removing decoders
within 'Hardware' class.

uridecodebin sets the `force-sw-decoders` property in its internal
decodebin, and also filters out Hardware class in the
autoplug-factories default signal handler.

playbin2 adds by default GST_PLAY_FLAG_FORCE_SW_DECODERS it its flags
property, and depending on it playbin2 sets the `force-sw-decoders`
property on its internal uridecodebin, also filters out the Hardware
class decoding decoders at the autoplug-factories signal handler.
2020-01-09 12:28:32 +00:00
Víctor Manuel Jáquez Leal
d50c71708a playback: add GST_PLAY_FLAG_FORCE_SW_DECODERS enum
This flag would be common either for playbin2 and playbin3.
2020-01-09 12:28:32 +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
Sebastian Dröge
1c147208cc compositor: memcpy() lines directly for alpha formats with SOURCE operator and alpha=1.0 2020-01-08 16:20:30 +02:00
Randy Li
e85b856d30 rawvideoparse: allow setting the colorimetry
You can neither guess nor parse the colorimetry from the
input stream.

Signed-off-by: Randy Li <ayaka@soulik.info>
2020-01-08 02:34:17 +00:00
Sebastian Dröge
18ee5e57fd compositor: Alpha inputs with the SOURCE operator can be considered opaque
We don't have to look at each pixel's alpha component because we will
directly write it over the background.
2020-01-07 20:03:59 +02:00
Ryan Huang
c7a9a966b0 Fix link to raw video format design document 2020-01-02 23:37:21 +00:00
Philippe Normand
0a515acfa8 playbin3: Propagate sink context
When the playsink's sink is activated its state is set to READY but it remains
unlinked. So, in order for decodebin3 to potentially reuse the context later on,
the whole playbin3 needs to have it internally stored.
2019-12-31 10:00:20 +00:00
Seungha Yang
539a703b0b playbin: Propagate sink context
Any contexts created by sink during activation need to be propagated
to whole elements of playbin.
2019-12-31 15:51:53 +09:00