platform/upstream/gstreamer.git
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

4 years agovideo-info: improve GST_CAPS_FEATURE_FORMAT_INTERLACED documentation
Guillaume Desmottes [Wed, 13 Nov 2019 09:58:20 +0000 (15:28 +0530)]
video-info: improve GST_CAPS_FEATURE_FORMAT_INTERLACED documentation

Copied the description from gst-doc written by Tim.

Fix #606

4 years agogl/window: marshall quit to the window thread
Matthew Waters [Tue, 12 Nov 2019 01:17:44 +0000 (12:17 +1100)]
gl/window: marshall quit to the window thread

Fixes a possible deadlock where we're waiting for the window thread to
quit but it never does.

4 years agoaudio-buffer: Don't fail to map buffers with zero samples
Sebastian Dröge [Thu, 14 Nov 2019 11:37:58 +0000 (12:37 +0100)]
audio-buffer: Don't fail to map buffers with zero samples

Instead initialize the map infos, etc to NULL like gst_buffer_map()
would be doing on a zero-sized buffer.

This fixes a crash in audioresample if the first output buffer would
contain zero samples.

4 years agoexamples: overlaycomposition: Add option for videosink element selection
Seungha Yang [Tue, 12 Nov 2019 12:15:38 +0000 (21:15 +0900)]
examples: overlaycomposition: Add option for videosink element selection

It would be useful for testing overlaycomposition with specific videosink element.

4 years agoglcontext/egl: Fix window leak
Wonchul Lee [Wed, 13 Nov 2019 08:31:29 +0000 (17:31 +0900)]
glcontext/egl: Fix window leak

Fixed to do unref after use of window get by gst_gl_context_get_window()

4 years agogldownload: Fix renegotiation loop
Nicolas Dufresne [Mon, 11 Nov 2019 01:05:59 +0000 (20:05 -0500)]
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.

4 years agogldownload: Refactor download mode selection
Nicolas Dufresne [Mon, 11 Nov 2019 01:02:09 +0000 (20:02 -0500)]
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.

4 years agoeglimage: Fix extension names in dmabuf import check
Nicolas Dufresne [Sun, 14 Jul 2019 20:42:17 +0000 (16:42 -0400)]
eglimage: Fix extension names in dmabuf import check

There was a typo in the extension name which resulted in the modifiers
to never be set when doing DMABuf import. That triggered the modifiers
lookup in Intel driver, which was in fact hiding bugs in the gldownload
to glupload path when doing DMABuf.

Note, this changes breaks pipeline the following pipeline on Intel and
some other drivers:

  gltestsrc ! gldownload ! video/x-raw\(memory:DMABuf\) ! glimagsink

A fix for this was added to Mesa recently:

Related to https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1338
Fixes 5d0e191710

4 years agoeglimage: Fix exported DMABuf size
Nicolas Dufresne [Sun, 14 Jul 2019 20:33:35 +0000 (16:33 -0400)]
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.

4 years agoeglimage: Fail exportation if a modififer is used
Nicolas Dufresne [Wed, 25 Apr 2018 17:09:05 +0000 (13:09 -0400)]
eglimage: Fail exportation if a modififer is used

We don't support modififers and that would result in bad image being
displayed. Note that this was fixes recently in Mesa MR 1138, prior to
that, the reported modifier is always 0, which makes this change a
no-op.

Fixes #441
Related to https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1338

4 years agogldownload: Wait on sync meta if any
Nicolas Dufresne [Sat, 3 Aug 2019 17:14:53 +0000 (13:14 -0400)]
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.

4 years agoplaybin: Handle error message with redirection indication
Thibault Saunier [Tue, 3 Sep 2019 20:03:49 +0000 (16:03 -0400)]
playbin: Handle error message with redirection indication

There are in the wild (mp4) streams that basically contain no tracks
but do have a redirect info[0], in which case, qtdemux won't be able
to expose any pad (there are no tracks) so can't post anything but
an error on the bus, as:
  - it can't send EOS downstream, it has no pad,
  - posting an EOS message will be useless as PAUSED state can't be
    reached and there is no sink in the pipeline meaning GstBin will
    simply ignore it

In that case, currently the application could try to handle that but it
is pretty complex as it will get the REDIRECT message on the bus at
which point it could set the URL but playbin will ignore it, as
it will only be for the next EOS, it thus need to set the pipeline to
NULL (READY won't do as it is already in READY at that point). And it
needs to figure out the following ERROR message on the bus needs to be
ignored, which is not really simple.

The approach here is to allow element to add details to the ERROR
message with a `redirect-location` field which elements like playbin handle
and use right away.

We could also use the element 'redirect' message in playbin, but the
issue with that approach is that the element will still emit the ERROR
message on the bus, leading to wrong behaviour. That can't be avoided
since in the case the app/parent pipeline is not handling the redirect
instruction, the ERROR message is necessary (and there is no way to
detect that the message has been "handled" from the element emitting the
redirect).

[0]: http://movietrailers.apple.com/movies/paramount/terminator-dark-fate/terminator-dark-fate-trailer-2_480p.mov

4 years agooverlaycomposition: set sink pad to proxy allocation queries
Aaron Boxer [Thu, 19 Sep 2019 21:12:25 +0000 (15:12 -0600)]
overlaycomposition: set sink pad to proxy allocation queries

4 years agodisplay: add a specific lock for the list of windows
Matthew Waters [Sat, 2 Nov 2019 13:46:49 +0000 (00:46 +1100)]
display: add a specific lock for the list of windows

It's either this or replacing all the object lock usage in gldisplay
with a recursive mutex which is not backwards compatible

The failure case is effectively:
1. The user has locked the display object lock
2. a glcontext loses it's last ref and attempts to quit the window
3. gst_gl_window_quit() attempts to remove the window from the display
4. gst_gl_display_remove_window attempts to take the display object lock

The only concern with changing the locking for the window list in the
display is that gst_gl_display_create_window() has documentation requiring
the object lock to be held which must continue to work correctly.

4 years agoglwindow: fix racy resize updates
Matthew Waters [Fri, 8 Mar 2019 06:43:40 +0000 (17:43 +1100)]
glwindow: fix racy resize updates

Take locks around resize handling and marshall all resizes to the
windowing thread by default.

4 years agoglwindow: remove window from display list on quit/finalize
Matthew Waters [Fri, 8 Mar 2019 06:40:52 +0000 (17:40 +1100)]
glwindow: remove window from display list on quit/finalize

Fixes a possible use-after-free in the X11 backend.

4 years agogl/display: Add thread-safe retrieve_window
Matthew Waters [Sat, 2 Nov 2019 11:58:42 +0000 (22:58 +1100)]
gl/display: Add thread-safe retrieve_window

Returning a transfer none value for a value checked by a lock is not
thread safe as the reference could disappear before the caller can take
its reference.

4 years agoencodebin: Ensure that a single segment is pushed into encoders
Thibault Saunier [Fri, 30 Aug 2019 21:16:35 +0000 (17:16 -0400)]
encodebin: Ensure that a single segment is pushed into encoders

Following the [design document] encodebin needs to handle sources that
output multiple streams, for that purpose and to make it simpler,
we ensure that a single segment is outputted to the encoders by using
an `identity single-segment=true` at the beginning of streams chains.

Added API to enable or disable the use of that new feature.
Added support for the encoding profile parser for that new property,
keeping backward compatibility

[design document]: https://gstreamer.freedesktop.org/documentation/additional/design/encoding.html?gi-language=c#rendering-timelines

4 years agortcpbuffer: add RTPFB_TYPE_TWCC for Transport-Wide Congestion Control
Havard Graff [Tue, 19 Mar 2019 15:20:01 +0000 (16:20 +0100)]
rtcpbuffer: add RTPFB_TYPE_TWCC for Transport-Wide Congestion Control

4 years agoaudioconvert: Fixed changing mix-matrix at runtime
Jochen Henneberg [Sun, 3 Nov 2019 10:25:55 +0000 (10:25 +0000)]
audioconvert: Fixed changing mix-matrix at runtime

Setting the property again after it had already been set ran
g_value_unset() but did not initialize it again to g_value_copy() failed
afterwards. Removed the unset as cleanup is done implicitely from
g_value_copy().

Changing the mix-matrix property did not trigger reconfiguration of the
caps, this has been added.

If the matrix is set to an empty matrix, instead of copying this the
matrix is simply disabled by setting mix_matrix_is_set (formerly
mix_matrix_was_set) to FALSE so the mix-matrix is ignored from now on.

4 years agovideorate: Fix max-duplication-time handling
Sebastian Dröge [Mon, 28 Oct 2019 12:43:50 +0000 (14:43 +0200)]
videorate: Fix max-duplication-time handling

Previously this would've only set discont=TRUE and then for all future
buffers simply returned immediately.

Instead we also need to
  a) drain previous input until its buffer time
  b) update next_ts and base_ts accordingly for the gap
  c) actually store the new buffer after the gap so it can be used in
     the future and so the old buffer before the gap is gone

Also update the unit test accordingly so that it actually tests for this
behaviour. Previously it only tested that after the gap we got no output
at all.

4 years agocompositor: Add support for VUYA format
Seungha Yang [Tue, 20 Aug 2019 14:12:22 +0000 (23:12 +0900)]
compositor: Add support for VUYA format

Reversed order of AYUV format. Most of core methods are prepared
already.

4 years agovideometa: document how the meta can be used to negotiate buffers layout
Guillaume Desmottes [Sat, 25 May 2019 17:23:35 +0000 (19:23 +0200)]
videometa: document how the meta can be used to negotiate buffers layout

I'm going to use this new API in gst-omx so an encoder can request
v4l2src to produce buffers matching the encoder stride and slice heights
preventing copies of incoming buffers.

4 years agogl/gbm: ensure we call the resize callback before attempting to draw
Matthew Waters [Sun, 3 Nov 2019 13:38:18 +0000 (00:38 +1100)]
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.

4 years agovideo-scaler: Ensure we're always using the correct lines for scaling in gst_video_sc...
Sebastian Dröge [Sat, 2 Nov 2019 15:24:39 +0000 (16:24 +0100)]
video-scaler: Ensure we're always using the correct lines for scaling in gst_video_scaler_2d()

Especially for interlaced input make sure to
  a) never mix both fields
  b) never read lines after the end of the input frame
  c) allocate enough space in the temporary lines to not write outside
     the allocated memory area

This fixes various memory corruptions and rescaling artefacts.

4 years agovideodecoder: Add a property to disable dropping on QoS
Nicolas Dufresne [Tue, 2 Oct 2018 16:04:14 +0000 (12:04 -0400)]
videodecoder: Add a property to disable dropping on QoS

4 years agovideodecoder: Post QoS when we drop because of QoS
Nicolas Dufresne [Tue, 2 Oct 2018 15:09:33 +0000 (11:09 -0400)]
videodecoder: Post QoS when we drop because of QoS

At the moment, we only posted QoS messages when frame_drop() was
called, but not in finish_frame() when QoS triggered a late push.
This should fix applications that tries to account the dropped
frames. We also emit a warning on drops so it's more clear what is
happening.

4 years agogl: use gst_video_meta_set_alignment()
Guillaume Desmottes [Tue, 23 Jul 2019 06:19:07 +0000 (11:49 +0530)]
gl: use gst_video_meta_set_alignment()

4 years agox(v)image: use gst_video_meta_set_alignment()
Guillaume Desmottes [Mon, 22 Jul 2019 11:25:04 +0000 (16:55 +0530)]
x(v)image: use gst_video_meta_set_alignment()

Use the new API to tell buffer consumers about alignment details.

This change is backward compatible as non ported elements can safely
ignore the alignment information and keep processing buffers as they use
to, copying if necessary.

4 years agovideometa: add alignment field
Guillaume Desmottes [Tue, 9 Jul 2019 10:17:44 +0000 (12:17 +0200)]
videometa: add alignment field

By adding this field, buffer producers can now explicitly set the exact
geometry of planes, allowing users to easily know the padded size and
height of each plane.

GstVideoMeta is always heap allocated by GStreamer itself so we can
safely extend it.

4 years agovideo-info: add gst_video_info_align_full()
Guillaume Desmottes [Mon, 3 Jun 2019 10:56:08 +0000 (16:26 +0530)]
video-info: add gst_video_info_align_full()

When using gst_video_info_align() user had no easy way to retrieve the
padded size and height of each plane.
This can easily be implemented in fill_planes() as it's already called
in align() with the padded height.

Ideally we'd add a plane_size field to GstVideoInfo but the remaining
padding is too small so that would be an ABI break.

Fix #618

4 years agovideo-info: fix GST_VIDEO_INFO_FIELD_HEIGHT() with frame odd height
Guillaume Desmottes [Sat, 2 Nov 2019 11:15:15 +0000 (12:15 +0100)]
video-info: fix GST_VIDEO_INFO_FIELD_HEIGHT() with frame odd height

We want to round up when halfing height.

I do have a test for this but it relies on my new video-align tests so
it's part of the next commit. Recording the fix separately if we want to
backport this fix to the stable branch.

4 years agoglimagesink: fix upper-left and upper-right rotate matrices
Nicola Murino [Wed, 30 Oct 2019 13:59:40 +0000 (14:59 +0100)]
glimagesink: fix upper-left and upper-right rotate matrices

4 years agotests: audio: Add test for gst_audio_info_from_caps() method
Seungha Yang [Fri, 25 Oct 2019 11:44:27 +0000 (20:44 +0900)]
tests: audio: Add test for gst_audio_info_from_caps() method

Test gst_audio_info_from_caps() with raw and encoded formats.

4 years agoaudio-info: Allow from_caps() with encoded audio format
Seungha Yang [Fri, 25 Oct 2019 03:05:54 +0000 (12:05 +0900)]
audio-info: Allow from_caps() with encoded audio format

Similar to gst_video_info_from_caps() which allows encoded video format,
don't error gst_audio_info_from_caps() with encoded audio format.
Because gst_audio_info_set_format() supports encoded format, current
behavior does not seem to be consistent.

4 years agovideo-converter: Use G_N_ELEMENTS instead of writing it out manually
Sebastian Dröge [Mon, 21 Oct 2019 13:43:32 +0000 (16:43 +0300)]
video-converter: Use G_N_ELEMENTS instead of writing it out manually

4 years agovideo-converter: Scaling-only fast-paths for planar formats are keeping interlacing
Sebastian Dröge [Mon, 21 Oct 2019 14:40:35 +0000 (17:40 +0300)]
video-converter: Scaling-only fast-paths for planar formats are keeping interlacing

So we can also use them for interlaced content and speed up scaling a
bit.

4 years agovideo-scaler: Correctly handle interlaced vertical scalers in gst_video_scaler_2d()
Sebastian Dröge [Mon, 21 Oct 2019 14:28:46 +0000 (17:28 +0300)]
video-scaler: Correctly handle interlaced vertical scalers in gst_video_scaler_2d()

We need to provide twice as many lines as usual to the scaling function
as every second lines would be skipped.

Without this we read from random memory and produce colorful output and
crashes.

4 years agovideo-converter: Don't use fast-path halfing/doubling rescalers for interlaced planar...
Sebastian Dröge [Mon, 21 Oct 2019 13:43:02 +0000 (16:43 +0300)]
video-converter: Don't use fast-path halfing/doubling rescalers for interlaced planar formats

They will mix lines from the top and bottom field and by that
effectively deinterlace the video, badly.

4 years agovideo-converter: Use interlaced scalers for vertical scaling if needed
Sebastian Dröge [Mon, 21 Oct 2019 13:43:02 +0000 (16:43 +0300)]
video-converter: Use interlaced scalers for vertical scaling if needed

Without this, scaling e.g. interlaced UYVY causes corrupted output with
lines as follows: f1 f1 f2 f2, i.e. two lines of each field and only
then the other field.

4 years agogstrtspconnection: messages_bytes not decreased
Joakim Johansson [Thu, 3 Oct 2019 10:03:09 +0000 (12:03 +0200)]
gstrtspconnection: messages_bytes not decreased

The watch->messages_bytes is not decreased when the write operation
from the backlog is only partly successfull.

This commit decreases the watch->messages_bytes for the successfully
sent messages.

Fixes #679

4 years agomeson: build gir even when cross-compiling if introspection was enabled explicitly
Tim-Philipp Müller [Thu, 17 Oct 2019 19:06:24 +0000 (20:06 +0100)]
meson: build gir even when cross-compiling if introspection was enabled explicitly

This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
when cross-compiling, but allow it if introspection was
enabled explicitly via -Dintrospection=enabled.

See gstreamer/gstreamer#454 and gstreamer/gstreamer#381.

4 years agoglimagesink: add support for Y210 format
Haihao Xiang [Sat, 12 Oct 2019 04:00:46 +0000 (12:00 +0800)]
glimagesink: add support for Y210 format

Y210 is a 10-bit YUY2, so we may re-use the YUY2 shaders but gl format
is set to RG16

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y210 ! glimagesink

4 years agoglcolorconvert: add support for the NV16 and NV61 formats
David Trussel [Fri, 11 Oct 2019 08:14:49 +0000 (10:14 +0200)]
glcolorconvert: add support for the NV16 and NV61 formats

NV16/NV61 is basically the same as NV12/NV21 with a higher chroma resolution.
Since only the size of the UV plane/texture is different, the same shaders are used as for NV12/NV21.

4 years agoglimagesink: add support for Y410 format
Haihao Xiang [Fri, 11 Oct 2019 14:54:02 +0000 (22:54 +0800)]
glimagesink: add support for Y410 format

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y410 ! glimagesink

4 years agoglcolorconvert: merge shaders for AYUV and VUYA formats
Haihao Xiang [Mon, 14 Oct 2019 02:02:59 +0000 (10:02 +0800)]
glcolorconvert: merge shaders for AYUV and VUYA formats

The shaders can be used for AYUV and varieties.

4 years agoRemove autotools build system
Tim-Philipp Müller [Sat, 8 Jun 2019 23:57:47 +0000 (00:57 +0100)]
Remove autotools build system

4 years agobase: Avoid usage of deprecated API
Edward Hervey [Thu, 10 Oct 2019 15:18:34 +0000 (17:18 +0200)]
base: Avoid usage of deprecated API

GTimeval and related functions are now deprecated in glib.
Replacement APIs have been present since 2.26

4 years agocheck: Don't use real audio devices for tests
Edward Hervey [Thu, 10 Oct 2019 14:58:26 +0000 (16:58 +0200)]
check: Don't use real audio devices for tests

When checking the behaviour of live seeking on audiomixer or
adder we don't *really* need real audio devices. audiotestsrc
in live mode is enough to test the behaviour of those elements.

Also avoids people repeatedly wasting hours trying to figure out
whether that failing behaviour is due to their code or not.

4 years agopbutils: add description for CineForm codec
Tim-Philipp Müller [Tue, 8 Oct 2019 18:35:49 +0000 (19:35 +0100)]
pbutils: add description for CineForm codec

4 years agoriff: add mapping for CineForm codec
Tim-Philipp Müller [Tue, 8 Oct 2019 18:35:23 +0000 (19:35 +0100)]
riff: add mapping for CineForm codec

Makes CineForm-in-AVI work.

4 years agoexamples: add device provider example
Mathieu Duponchelle [Sat, 7 Sep 2019 02:28:46 +0000 (04:28 +0200)]
examples: add device provider example

4 years agoglfilters: Don't use static variables for storing per-element state
Sebastian Dröge [Wed, 2 Oct 2019 20:21:09 +0000 (23:21 +0300)]
glfilters: Don't use static variables for storing per-element state

4 years agoglupload: Add VideoMetas and GLSyncMeta to the raw uploaded buffers
Thibault Saunier [Fri, 27 Sep 2019 14:10:43 +0000 (11:10 -0300)]
glupload: Add VideoMetas and GLSyncMeta to the raw uploaded buffers

This is done by reusing `gst_gl_memory_setup_buffer` avoiding to
duplicate code.

Without a VideoMeta, mapping those buffers lead to GstBuffer mapping the
buffer in system memory even when specifying the GL flags (through the
buffer merging mechanism) making the result totally broken.

4 years agoexamples/gl/sdlshare: port to OpenGL 3.0 core profile
Matthew Waters [Wed, 2 Oct 2019 13:35:36 +0000 (23:35 +1000)]
examples/gl/sdlshare: port to OpenGL 3.0 core profile

4 years agobuild: fix werror build on windows
Matthew Waters [Mon, 30 Sep 2019 14:00:57 +0000 (00:00 +1000)]
build: fix werror build on windows

_isatty() is in the io.h header

4 years agodevice-monitor: fix device listing without --follow
Mathieu Duponchelle [Mon, 30 Sep 2019 14:11:18 +0000 (16:11 +0200)]
device-monitor: fix device listing without --follow

In !427, I removed the call to get_devices in order to always
print added devices from the bus handler, however this requires
the main loop to run until all pending messages have been consumed.

This commit achieves this by always running the main loop, and
simply adding an idle source to quit it in the non --follow case.

4 years agovideo-format: correct the pixel stride for Y410
Haihao Xiang [Mon, 30 Sep 2019 02:27:03 +0000 (10:27 +0800)]
video-format: correct the pixel stride for Y410

The stride for Y410 is 4 bytes, not 0 byte

4 years agoexamples/sdlshare: Map video frames as early as possible and wait via GL sync meta...
Sebastian Dröge [Thu, 14 Mar 2019 15:24:11 +0000 (16:24 +0100)]
examples/sdlshare: Map video frames as early as possible and wait via GL sync meta before using texture ids

4 years agoexamples/sdlshare: Initialize GL as part of the event loop
Sebastian Dröge [Wed, 13 Mar 2019 07:28:58 +0000 (08:28 +0100)]
examples/sdlshare: Initialize GL as part of the event loop

And unref additional buffers we never use for rendering directly instead
of going via the output queue.

4 years agoexamples/sdlshare: Activate and initialize our wrapped GL context
Sebastian Dröge [Wed, 13 Mar 2019 07:20:57 +0000 (08:20 +0100)]
examples/sdlshare: Activate and initialize our wrapped GL context

This allows us to e.g. use the GL functions vtable on it later.

4 years agoexamples/sdlshare: Call gst_init() a bit earlier in main()
Sebastian Dröge [Wed, 13 Mar 2019 06:31:43 +0000 (07:31 +0100)]
examples/sdlshare: Call gst_init() a bit earlier in main()

Let's not accidentally call other GStreamer API before that.

4 years agoexamples/sdlshare: Create an OpenGL context for OpenGL 2.0
Sebastian Dröge [Wed, 13 Mar 2019 06:21:12 +0000 (07:21 +0100)]
examples/sdlshare: Create an OpenGL context for OpenGL 2.0

4 years agoexamples/sdlshare: Switch from a GLib main loop to a normal SDL event loop
Sebastian Dröge [Tue, 12 Mar 2019 21:37:48 +0000 (22:37 +0100)]
examples/sdlshare: Switch from a GLib main loop to a normal SDL event loop

4 years agoexamples/sdlshare: Port to SDL2
Sebastian Dröge [Tue, 12 Mar 2019 21:09:18 +0000 (22:09 +0100)]
examples/sdlshare: Port to SDL2

4 years agoexamples/sdlshare: Move from a fakesink to an appsink
Sebastian Dröge [Tue, 12 Mar 2019 20:31:24 +0000 (21:31 +0100)]
examples/sdlshare: Move from a fakesink to an appsink

4 years agoexamples/sdlshare: Store buffer queues and loop in a global variable
Sebastian Dröge [Tue, 12 Mar 2019 20:29:07 +0000 (21:29 +0100)]
examples/sdlshare: Store buffer queues and loop in a global variable

There's no point storing them in GObject data, we already have other
global variables anyway.

4 years agoexamples/sdlshare: Bus sync handlers return no value
Sebastian Dröge [Tue, 12 Mar 2019 20:24:03 +0000 (21:24 +0100)]
examples/sdlshare: Bus sync handlers return no value

4 years agoexamples/sdlshare: Fix various memory leaks
Sebastian Dröge [Tue, 12 Mar 2019 20:20:24 +0000 (21:20 +0100)]
examples/sdlshare: Fix various memory leaks

4 years agoalsasink: pause/resume
Axel Mårtensson [Mon, 18 Jun 2018 08:49:28 +0000 (10:49 +0200)]
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

4 years agoaudiosink: fix resuming after pause
Axel Mårtensson [Mon, 18 Jun 2018 08:44:55 +0000 (10:44 +0200)]
audiosink: fix resuming after pause

For resuming after paused, gst_audio_sink_ring_buffer_start() needs to
be called to notify the ringbuffer to continue to play.

4 years agoaudiosink: expose more audioringbuffer vmethods to child sinks
Philippe Renon [Tue, 10 Oct 2017 18:41:31 +0000 (20:41 +0200)]
audiosink: expose more audioringbuffer vmethods to child sinks

The newly exposed vmethods are pause, resume, stop and clear_all.
The existing reset vmethod is deprecated.

The audio sink will fallback to calling reset if pause or stop
are not provided and will fallback to calling start if
resume is not provided. There is no default clear_all
implementation.
Existing audio sinks continue to work as before.

This change is useful for sinks that need to distinguish
between a pause and a stop (currently both are handled
by a reset) and is needed for https://bugzilla.gnome.org/show_bug.cgi?id=788362

https://bugzilla.gnome.org/show_bug.cgi?id=788361

4 years agogst-play: Add support for interacting console input on Windows
Seungha Yang [Tue, 24 Sep 2019 06:05:30 +0000 (15:05 +0900)]
gst-play: Add support for interacting console input on Windows

Add Windows keyboard input handler. This could make gst-play UX
consistent between *nix and Windows.

4 years agostreamsynchronizer: avoid pad destruction races.
Charlie Turner [Fri, 20 Sep 2019 08:48:30 +0000 (09:48 +0100)]
streamsynchronizer: avoid pad destruction races.

Due to the use of {set/get}-element_private methods being used to store
the GstSyncStream in the src and sink pads, and the racey nature of pad
destruction, there are numerous ways we can be bitten by race conditions
in the stream synchronizer. Fix that by tying the pads toghether with
references.

4 years agoaudio: Use LoadPackagedLibrary when building for UWP
Nirbheek Chauhan [Fri, 10 May 2019 02:02:21 +0000 (07:32 +0530)]
audio: Use LoadPackagedLibrary when building for UWP

Universal Windows Platform apps are not allowed to use LoadLibrary to
load arbitrary DLLs from the filesystem. They can only use
LoadPackagedLibrary to load DLLs that have been packaged with the app
as assets.

See also: https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/190