platform/upstream/gstreamer.git
4 years agoglupload: fix transform_caps NULL pointer dereference
Philipp Zabel [Mon, 24 Feb 2020 15:38:56 +0000 (16:38 +0100)]
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.

4 years agoglupload: dmabuf: support direct upload into external-oes textures
Philipp Zabel [Wed, 12 Feb 2020 17:25:54 +0000 (18:25 +0100)]
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.

4 years agogl/egl: support direct dmabuf import with external-oes only formats
Philipp Zabel [Thu, 13 Feb 2020 09:28:40 +0000 (10:28 +0100)]
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.

4 years agoglquery: fix a possible unintialized value
Matthew Waters [Mon, 2 Mar 2020 08:35:16 +0000 (19:35 +1100)]
glquery: fix a possible unintialized value

A GL driver may not fill the resulting value so initialize it to 0
ourselves.

4 years agogl/context/glx: dump GLXFBConfig information to debug logs
Matthew Waters [Wed, 26 Feb 2020 03:33:16 +0000 (14:33 +1100)]
gl/context/glx: dump GLXFBConfig information to debug logs

4 years agotcpclientsrc: Expose connection stats as property
Vivia Nikolaidou [Mon, 24 Feb 2020 14:44:12 +0000 (16:44 +0200)]
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.

4 years agovideo-info: fix typo in doc
Guillaume Desmottes [Mon, 10 Feb 2020 04:59:25 +0000 (10:29 +0530)]
video-info: fix typo in doc

4 years agovideo: fix GST_VIDEO_FRAME_IS_BOTTOM_FIELD()
Guillaume Desmottes [Fri, 7 Feb 2020 05:48:24 +0000 (11:18 +0530)]
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

4 years agovideo: add macros checking for GST_VIDEO_BUFFER_FLAG_TOP/BOTTOM_FIELD flags
Guillaume Desmottes [Thu, 6 Feb 2020 09:05:47 +0000 (14:35 +0530)]
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.

4 years agovideoencoder: protect the use of num_subframes
Stéphane Cerveau [Thu, 6 Feb 2020 08:52:31 +0000 (09:52 +0100)]
videoencoder: protect the use of num_subframes

change stream lock location to protect the use of
frame->abidata.ABI.num_subframes

4 years agovideoencoder: Release stream lock in finish_subframe before pad_push
Devarsh Thakkar [Wed, 5 Feb 2020 10:58:14 +0000 (02:58 -0800)]
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.

4 years agomeson: gl: Update to support when egl and win32 window system are explicitly requested
Seungha Yang [Tue, 18 Feb 2020 11:36:38 +0000 (20:36 +0900)]
meson: gl: Update to support when egl and win32 window system are explicitly requested

4 years agoglwindow/win32: Accept both win32 and egl display
Seungha Yang [Tue, 18 Feb 2020 11:09:19 +0000 (20:09 +0900)]
glwindow/win32: Accept both win32 and egl display

EGL would be the case where we use ANGLE.

4 years agoglcontext: egl: Fix build with win32 window system
Seungha Yang [Tue, 18 Feb 2020 10:40:34 +0000 (19:40 +0900)]
glcontext: egl: Fix build with win32 window system

4 years agogl: Decouple win32 window and wgl context
Seungha Yang [Tue, 18 Feb 2020 10:33:18 +0000 (19:33 +0900)]
gl: Decouple win32 window and wgl context

With ANGLE, win32 window can be used with gles and egl

4 years agoglcontext/egl: Fix build with upstream ANGLE
Seungha Yang [Tue, 18 Feb 2020 04:03:00 +0000 (13:03 +0900)]
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.

4 years agogl/window/win32: Handle mouse and key events
Seungha Yang [Thu, 13 Feb 2020 12:33:11 +0000 (21:33 +0900)]
gl/window/win32: Handle mouse and key events

This is at least useful for the gst-play-1.0 use case.

4 years agolibs: dmabuf: init the GST_CAT_DEFAULT in type define.
He Junyan [Fri, 14 Feb 2020 17:19:29 +0000 (01:19 +0800)]
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

4 years agoappsrc/appsink: Make setting/replacing callbacks thread-safe
Sebastian Dröge [Wed, 12 Feb 2020 11:11:43 +0000 (13:11 +0200)]
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

4 years agortpbasepayload: add property for embedding twcc sequencenumbers
Håvard Graff [Fri, 14 Feb 2020 09:40:59 +0000 (09:40 +0000)]
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.

4 years agogl/window/win32: implement get_window_handle()
Matthew Waters [Wed, 12 Feb 2020 23:41:29 +0000 (10:41 +1100)]
gl/window/win32: implement get_window_handle()

Some other frameworks need the HWND to retrieve information from.

4 years agortpbasepayload: fix test warnings
Havard Graff [Mon, 10 Feb 2020 16:39:57 +0000 (17:39 +0100)]
rtpbasepayload: fix test warnings

Compiling with MSVC and Clang.

4 years agortpbasepayload: timestamp bug, if rate control=no
Kristofer Björkström [Thu, 23 Jan 2020 15:11:28 +0000 (16:11 +0100)]
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.

4 years agodiscoverer: Start discovering next URI from right thread
Thibault Saunier [Mon, 10 Feb 2020 20:15:13 +0000 (17:15 -0300)]
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.

4 years agoglcolorconvert: error out if memory context is different than ours
Matthew Waters [Tue, 4 Feb 2020 03:14:38 +0000 (14:14 +1100)]
glcolorconvert: error out if memory context is different than ours

4 years agogltestsrc: NULL out the functions used
Matthew Waters [Tue, 4 Feb 2020 03:06:36 +0000 (14:06 +1100)]
gltestsrc: NULL out the functions used

Fixes segfault when the display changes

4 years agoglviewconvert: fix reset context for GL context change
Matthew Waters [Tue, 4 Feb 2020 03:01:47 +0000 (14:01 +1100)]
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.

4 years agoglviewconvert: fix a use-after-free with allocation params
Matthew Waters [Tue, 4 Feb 2020 03:00:48 +0000 (14:00 +1100)]
glviewconvert: fix a use-after-free with allocation params

_free(params) followed by a params->align is a bad idea :)

4 years agoglviewconvert: also remove GL buffers on a reset
Matthew Waters [Tue, 4 Feb 2020 02:59:37 +0000 (13:59 +1100)]
glviewconvert: also remove GL buffers on a reset

Fixes a possible memory leak on renegotiation

4 years agogl/basesrc: call gl_stop when shutting down
Matthew Waters [Thu, 12 Dec 2019 07:59:10 +0000 (18:59 +1100)]
gl/basesrc: call gl_stop when shutting down

Fixes multiple leaks

4 years agortpbuffer: add gst_rtp_buffer_get_extension_onebyte_header_from_bytes
Havard Graff [Tue, 28 Jan 2020 17:17:47 +0000 (18:17 +0100)]
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

4 years agovideoaggregator: handle gap buffers properly
Mathieu Duponchelle [Thu, 30 Jan 2020 18:00:07 +0000 (19:00 +0100)]
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

4 years agovideoaggregator: Don't configure NULL chroma-site/colorimetry
Sebastian Dröge [Tue, 28 Jan 2020 20:07:44 +0000 (22:07 +0200)]
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.

4 years agodecodebin3: Reset main group id on PAUSED->READY state change
Dimitrios Katsaros [Fri, 17 Jan 2020 13:26:29 +0000 (14:26 +0100)]
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

4 years agodecodebin3: Reduced logging level of messages
Dimitrios Katsaros [Fri, 17 Jan 2020 13:16:23 +0000 (14:16 +0100)]
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.

4 years agoclockoverlay: fix bogus time display caused by previous commit
Tim-Philipp Müller [Thu, 23 Jan 2020 18:03:13 +0000 (18:03 +0000)]
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

4 years agouridecodebin3: Fixed defauts not being set on initialization
Dimitrios Katsaros [Fri, 17 Jan 2020 10:22:48 +0000 (11:22 +0100)]
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.

4 years agoencodebin: Add missing 'Since' marker
Thibault Saunier [Mon, 13 Jan 2020 21:32:59 +0000 (18:32 -0300)]
encodebin: Add missing 'Since' marker

4 years agooggstream: Workaround for broken PAR in VP8 BOS
Philippe Normand [Mon, 13 Jan 2020 09:06:02 +0000 (09:06 +0000)]
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

4 years agotests: rtpbasedepayload: Test flow return whith push/push_list
Nicolas Dufresne [Sun, 12 Jan 2020 00:26:24 +0000 (19:26 -0500)]
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.

4 years agortpbasepayload: Save and forward the push flow return
Nicolas Dufresne [Fri, 22 Nov 2019 02:04:14 +0000 (21:04 -0500)]
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.

4 years agoplaybin3: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
Víctor Manuel Jáquez Leal [Sun, 3 Nov 2019 14:52:28 +0000 (15:52 +0100)]
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.

4 years agoplaybin2: handle GST_PLAY_FLAG_FORCE_SW_DECODERS
Víctor Manuel Jáquez Leal [Sun, 3 Nov 2019 14:37:44 +0000 (15:37 +0100)]
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.

4 years agoplayback: add GST_PLAY_FLAG_FORCE_SW_DECODERS enum
Víctor Manuel Jáquez Leal [Sun, 3 Nov 2019 14:16:04 +0000 (15:16 +0100)]
playback: add GST_PLAY_FLAG_FORCE_SW_DECODERS enum

This flag would be common either for playbin2 and playbin3.

4 years agomeson: add graphene subproject
Tim-Philipp Müller [Wed, 8 Jan 2020 17:28:46 +0000 (17:28 +0000)]
meson: add graphene subproject

So we can build all the OpenGL elements.

4 years agocompositor: memcpy() lines directly for alpha formats with SOURCE operator and alpha=1.0
Sebastian Dröge [Wed, 8 Jan 2020 06:29:18 +0000 (08:29 +0200)]
compositor: memcpy() lines directly for alpha formats with SOURCE operator and alpha=1.0

4 years agorawvideoparse: allow setting the colorimetry
Randy Li [Wed, 8 Jan 2020 02:34:17 +0000 (02:34 +0000)]
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>
4 years agocompositor: Alpha inputs with the SOURCE operator can be considered opaque
Sebastian Dröge [Tue, 7 Jan 2020 18:01:14 +0000 (20:01 +0200)]
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.

4 years agoFix link to raw video format design document
Ryan Huang [Tue, 31 Dec 2019 07:08:05 +0000 (23:08 -0800)]
Fix link to raw video format design document

4 years agoplaybin3: Propagate sink context
Philippe Normand [Sun, 11 Aug 2019 10:25:50 +0000 (11:25 +0100)]
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.

4 years agoplaybin: Propagate sink context
Seungha Yang [Tue, 31 Dec 2019 06:49:05 +0000 (15:49 +0900)]
playbin: Propagate sink context

Any contexts created by sink during activation need to be propagated
to whole elements of playbin.

4 years agortspurl: add API method to create request uri combined with control url
Aaron Boxer [Fri, 6 Dec 2019 13:47:14 +0000 (08:47 -0500)]
rtspurl: add API method to create request uri combined with control url

code logic very similar to gst_rtsp_url_get_request_uri ()

4 years agogstvideoaggregator: always update converter when needed
Mathieu Duponchelle [Fri, 27 Dec 2019 11:53:41 +0000 (12:53 +0100)]
gstvideoaggregator: always update converter when needed

In prepare_frame, it is not enough for the target info
(conversion_info) to not have changed to decide not to update
the converter, as the vpad info may have changed as well.

Fixes #714

4 years agofft: Update our kiss fft version
Sebastian Dröge [Fri, 27 Dec 2019 09:34:26 +0000 (11:34 +0200)]
fft: Update our kiss fft version

This fixes thread-safety issues and various other minor issues. Our
previous version was about 13 years old.

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

4 years agoglwindow/win32: Don't post any WinProc message to parent window
Seungha Yang [Fri, 20 Dec 2019 03:27:57 +0000 (12:27 +0900)]
glwindow/win32: Don't post any WinProc message to parent window

Posting any message to parent seems to be pointless. That might break
parent window.
Regardless of the posting, parent window can catch mouse event
and also any keyboard events will be handled by parent window by default.

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

4 years agoplaybin: remove deprecated raw audio and raw video sink flags
Aaron Boxer [Thu, 19 Dec 2019 19:48:43 +0000 (14:48 -0500)]
playbin: remove deprecated raw audio and raw video sink flags

These flags were deprecated in 2011 with commit
105da803ade859fb299ed3c5265d6acdd168ca8f

Removing these flags will simplify the logic in playbin.

4 years agotests: add video encoder test with subframes API
Stéphane Cerveau [Fri, 6 Sep 2019 16:07:48 +0000 (18:07 +0200)]
tests: add video encoder test with subframes API

4 years agovideoencoder: send new headers in finish_frame
Stéphane Cerveau [Thu, 12 Sep 2019 10:07:08 +0000 (12:07 +0200)]
videoencoder: send new headers in finish_frame

If headers have been set by subclass, this headers should be sent
for a first time or on demand with a key-unit

4 years agovideoencoder: Use video marker flag to signal end of frame
Stéphane Cerveau [Wed, 25 Sep 2019 08:45:28 +0000 (10:45 +0200)]
videoencoder: Use video marker flag to signal end of frame

This marker is optional, its name refer to RTP marker bit. This mark can
be use to reduce latency in various use cases. With the split between
finish_frame() and finish_subframe() we will now be able to identitfy
the last subframe with no latency.

In order to detail the use of GST_BUFFER_FLAG_MARKER in a video
use case, the flag GST_VIDEO_BUFFER_FLAG_MARKER has been introduced
with a proper documentation clarifying marker's role.

4 years agovideoencoder: add API to push subframes
Guillaume Desmottes [Fri, 31 Aug 2018 10:09:57 +0000 (12:09 +0200)]
videoencoder: add API to push subframes

Introduce a new API so encoders can split the encoding in subframes.
This can be useful to reduce the overall latency as we no longer need to
wait for the full frame to be encoded to start decoding or sending it.

4 years agovideoencoder: factor out logic from gst_video_encoder_finish_frame()
Guillaume Desmottes [Fri, 31 Aug 2018 08:55:30 +0000 (10:55 +0200)]
videoencoder: factor out logic from gst_video_encoder_finish_frame()

No semantic change, I'm going to reuse all those functions in a new
finish_slice() methods.

4 years agoaudioencoder: fix segment event leak
Jonas Holmberg [Fri, 20 Dec 2019 12:35:53 +0000 (13:35 +0100)]
audioencoder: fix segment event leak

Segment event was leaked if format != _TIME.

4 years agoRevert "videoencoder: factor out logic from gst_video_encoder_finish_frame()"
Olivier Crête [Thu, 19 Dec 2019 22:52:12 +0000 (17:52 -0500)]
Revert "videoencoder: factor out logic from gst_video_encoder_finish_frame()"

This reverts commit b1ec312b8ed39ffaeeca1f5a8a014acd4b74d5f9.

4 years agovideoencoder: factor out logic from gst_video_encoder_finish_frame()
Stéphane Cerveau [Thu, 19 Dec 2019 21:59:10 +0000 (21:59 +0000)]
videoencoder: factor out logic from gst_video_encoder_finish_frame()

No semantic change, I'm going to reuse all those functions in a new
finish_slice() methods.

4 years agortspconnection: Add functions without GTimeVal deprecate existing
Olivier Crête [Tue, 10 Dec 2019 23:03:05 +0000 (18:03 -0500)]
rtspconnection: Add functions without GTimeVal deprecate existing

GTimeVal is now deprecated in GLib, so let's deprecate it here too

4 years agotests: Remove deprecated GTimeVal
Olivier Crête [Tue, 10 Dec 2019 22:09:57 +0000 (17:09 -0500)]
tests: Remove deprecated GTimeVal

GTimeVal won't work past 2038

4 years agobase: use of g_value_dup_string
Stéphane Cerveau [Wed, 18 Dec 2019 15:03:54 +0000 (16:03 +0100)]
base: use of g_value_dup_string

Use helper method to get string from GValue.

4 years agoremove various useless linefeed in logs
Stéphane Cerveau [Wed, 11 Dec 2019 09:07:12 +0000 (10:07 +0100)]
remove various useless linefeed in logs

4 years agotests: actually define HAVE_VALGRIND
Tim-Philipp Müller [Sun, 8 Dec 2019 01:17:31 +0000 (01:17 +0000)]
tests: actually define HAVE_VALGRIND

This stuff should probably be done differently, but
for now just define it like we used to.

4 years agoxvimage: remove unused HAVE_XVIDEO define
Tim-Philipp Müller [Sun, 8 Dec 2019 00:52:17 +0000 (00:52 +0000)]
xvimage: remove unused HAVE_XVIDEO define

4 years agotest: fix up HAVE_X11 / HAVE_X defines
Tim-Philipp Müller [Sun, 8 Dec 2019 00:50:03 +0000 (00:50 +0000)]
test: fix up HAVE_X11 / HAVE_X defines

Only HAVE_X was defined, while both HAVE_X11 and HAVE_X were used.

4 years agotypefindfunctions: build gio xdgmime typefinder again
Tim-Philipp Müller [Sun, 8 Dec 2019 00:00:37 +0000 (00:00 +0000)]
typefindfunctions: build gio xdgmime typefinder again

And add gio-typefinder option to disable it. HAVE_GIO
was never set, at least not in the Meson build.

4 years agotests: simple-launch-lines: remove use of unused HAVE_LIBVISUAL define
Tim-Philipp Müller [Sat, 7 Dec 2019 21:13:09 +0000 (21:13 +0000)]
tests: simple-launch-lines: remove use of unused HAVE_LIBVISUAL define

This is not set anywhere, and it's pretty clear the pipeline in
question has not been tested in a long time. Disable test with
a FIXME, test needs to be rewritten to not use real output devices.

4 years agotests: gl-launch-lines: check for features at runtime
Tim-Philipp Müller [Sat, 7 Dec 2019 21:02:53 +0000 (21:02 +0000)]
tests: gl-launch-lines: check for features at runtime

Instead of using HAVE_PNG and HAVE_JPEG defines.

4 years agomultifdsink: remove defunct include guarded by unused HAVE_FIONREAD_IN_SYS_FILIO
Tim-Philipp Müller [Sat, 7 Dec 2019 20:47:01 +0000 (20:47 +0000)]
multifdsink: remove defunct include guarded by unused HAVE_FIONREAD_IN_SYS_FILIO

The configure check for this went away in 2012 in commit cd3eee.

4 years agotests: oggmux: check vorbisenc + theoraenc availability at runtime
Tim-Philipp Müller [Sat, 7 Dec 2019 14:36:36 +0000 (14:36 +0000)]
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.

4 years agotests: playback: include stdlib.h unconditionally
Tim-Philipp Müller [Sat, 7 Dec 2019 14:22:06 +0000 (14:22 +0000)]
tests: playback: include stdlib.h unconditionally

Like we do elsewhere. And drop the check for the header.
Also remove some superfluous unistd.h includes.

4 years agovorbis: drop unneeded check for vorbis_synthesis_restart()
Tim-Philipp Müller [Sat, 7 Dec 2019 14:12:04 +0000 (14:12 +0000)]
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.

4 years agopango: check if localtime_r is available
Tim-Philipp Müller [Sat, 7 Dec 2019 14:04:00 +0000 (14:04 +0000)]
pango: check if localtime_r is available

HAVE_LOCALTIME_R was used, but never defined.

4 years agoexamples: overlaycomposition: Fix implicit declaration warning
Seungha Yang [Sun, 8 Dec 2019 09:13:55 +0000 (18:13 +0900)]
examples: overlaycomposition: Fix implicit declaration warning

overlaycomposition.c:276:5: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
overlaycomposition.c(263): warning C4090: 'initializing': different 'const' qualifiers

4 years agoexamples: win32-videooverlay: Remove unused variable
Seungha Yang [Sun, 8 Dec 2019 09:12:00 +0000 (18:12 +0900)]
examples: win32-videooverlay: Remove unused variable

win32-videooverlay.c:34:20: warning: 'msg_io_channel' defined but not used [-Wunused-variable]

4 years agocodec-utils: add h264 constrained and progressive profiles
Stéphane Cerveau [Tue, 3 Dec 2019 23:35:23 +0000 (23:35 +0000)]
codec-utils: add h264 constrained and progressive profiles

Those profiles have been added in the version 2012-01
and 2011-06 of the AVC spec.

Aligned code with https://bugzilla.gnome.org/show_bug.cgi?id=794127

4 years agobuild: use -fvisibility=hidden for objc code
Matthew Waters [Tue, 3 Dec 2019 03:16:06 +0000 (14:16 +1100)]
build: use -fvisibility=hidden for objc code

4 years agogl/macos+ios: privatise _invoke_on_main()
Matthew Waters [Tue, 3 Dec 2019 03:15:58 +0000 (14:15 +1100)]
gl/macos+ios: privatise _invoke_on_main()

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1132

4 years agovideoaggregator: don't let a repeat-after-eos pad prevent EOS
Mart Raudsepp [Wed, 27 Nov 2019 18:42:34 +0000 (20:42 +0200)]
videoaggregator: don't let a repeat-after-eos pad prevent EOS

.. if there are pads present that are not repeating after EOS.

Fixes #664

4 years agotests: expand compositor repeat-after-eos tests for multiple pads
Mart Raudsepp [Wed, 27 Nov 2019 13:54:57 +0000 (15:54 +0200)]
tests: expand compositor repeat-after-eos tests for multiple pads

If there are any pads with repeat-after-eos NOT set, then the compositor
should EOS after all of those pads have gone EOS, but not before all
repeat-after-eos pads have as well.

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

4 years agotools: Add support for CameraSource pipeline description
Thibault Saunier [Tue, 4 Jun 2019 14:05:54 +0000 (10:05 -0400)]
tools: Add support for CameraSource pipeline description

4 years agovideo-converter: Fix RGB-XYZ-RGB conversion
Edward Hervey [Fri, 8 Nov 2019 14:13:59 +0000 (15:13 +0100)]
video-converter: Fix RGB-XYZ-RGB conversion

The matrices were in the wrong order.
Instead of the conversion matrix being
  _ XYZ_TO_RGB_output * RGB_TO_XYZ_input * input_RGB
It was
  _ RGB_TO_XYZ_input * XYZ_TO_RGB_output * input_RGB

4 years agoximagesink, xvimagesink: don't use XkbKeycodeToKeysym if Xkb is unavailable
Akinobu Mita [Tue, 21 May 2019 12:59:23 +0000 (21:59 +0900)]
ximagesink, xvimagesink: don't use XkbKeycodeToKeysym if Xkb is unavailable

ximagesink and xvimagesink use XkbKeycodeToKeysym when the key event is
received. However, this function returns NoSymbol if Xkb is unavailable.

This causes all key events to be translated to "unknown" key when running
ximagsink under some VNC.

Fix it by using XKeycodeToKeysym if Xkb is unavailable.

4 years agogst-play: Handle KeyDown event instead of KeyUp on Win32 keyboard handler
Seungha Yang [Fri, 27 Sep 2019 11:08:39 +0000 (20:08 +0900)]
gst-play: Handle KeyDown event instead of KeyUp on Win32 keyboard handler

To handle long press case, KeyDown input should be handled instead of KeyUp.
Note that OS will take care of the sensitivity of KeyDown event, so we can safely
assume one KeyDown as one input. That will not break user experience.

4 years agogst-play: Remove timer GSource from Win32 keyboard handler
Seungha Yang [Fri, 27 Sep 2019 10:26:03 +0000 (19:26 +0900)]
gst-play: Remove timer GSource from Win32 keyboard handler

Use WaitForMultipleObjects to handle keyboard input only if pending
keyboard input exists.

4 years agoexamples: win32-videooverlay: Add an option for testing reuse of external window
Seungha Yang [Wed, 13 Nov 2019 10:37:29 +0000 (19:37 +0900)]
examples: win32-videooverlay: Add an option for testing reuse of external window

Adding "repeat" option to test a case where external window is reused.

4 years agoaudiorate: Update next_offset per rate change
Seungha Yang [Thu, 7 Nov 2019 13:00:03 +0000 (22:00 +0900)]
audiorate: Update next_offset per rate change

To support runtime audio samplerate change, re-calculate next target offset
per caps. Calculating the next buffer offset using the previous
offset seems to be tricky and rounding error prone.

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

4 years agoRevert "audiorate: accumulate offset by time diff"
Seungha Yang [Thu, 7 Nov 2019 12:42:25 +0000 (21:42 +0900)]
Revert "audiorate: accumulate offset by time diff"

This reverts commit 4fa850e3e6c039000fc7f648de238af6c2278469.

The commit would break an constant rate audio stream with gap.

4 years agoxvimagepool: Update size, stride, and offset with allocated XvImage
Seungha Yang [Fri, 8 Nov 2019 08:28:44 +0000 (17:28 +0900)]
xvimagepool: Update size, stride, and offset with allocated XvImage

Memory layout of XvImage might be different from that of GstVideoInfo.
If so, the image size, stride, and offset would be wrongly informed.

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

4 years agoxvimagepool: Fix confusing debug message for padding size
Seungha Yang [Fri, 8 Nov 2019 08:33:17 +0000 (17:33 +0900)]
xvimagepool: Fix confusing debug message for padding size

4 years agoopusenc: Add low delay option
Ambareesh "Amby" Balaji [Sun, 17 Nov 2019 18:23:59 +0000 (18:23 +0000)]
opusenc: Add low delay option

Fixes #681

4 years agoaudioringbuffer: Reset reorder flag before check
Jochen Henneberg [Mon, 26 Aug 2019 13:03:48 +0000 (15:03 +0200)]
audioringbuffer: Reset reorder flag before check

This function might be revisited with different channel position mapping
while audio source goes into play so the reorder flag needs to be reset
before the checks happen.

4 years agoglupload: Fix allocator leak
Wonchul Lee [Fri, 15 Nov 2019 09:06:13 +0000 (18:06 +0900)]
glupload: Fix allocator leak

It fixes allocator leak in failure case

4 years agoexamples: overlaycomposition: Fix typo
Seungha Yang [Fri, 15 Nov 2019 03:19:56 +0000 (12:19 +0900)]
examples: overlaycomposition: Fix typo

Sorry for the noise. Default should be autovideosink