Commit graph

6965 commits

Author SHA1 Message Date
Alexey Chernov 595dd27ede videoencoder: Release STREAM_LOCK during gst_pad_push()
Release STREAM_LOCK before calling gst_pad_push() and take it
back afterward so that upstream isn't blocked while output
buffer is being pushed downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=715192
2018-08-31 16:11:04 -04:00
Alexey Chernov fb49674a39 videodecoder: Release STREAM_LOCK during gst_pad_push()
Release STREAM_LOCK before calling gst_pad_push() and take it
back afterward so that upstream isn't blocked while output
buffer is being pushed downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=715192
2018-08-31 16:10:57 -04:00
Nirbheek Chauhan a9cab426d0 meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:40:43 +05:30
Matthew Waters 0c85af51d8 gl/meson: fix gbm option to enable rather than disable
This change matches what the other winsys/platforms are doing
2018-08-31 18:14:13 +10:00
Matthew Waters dddd2e4a07 gl/meson: add Android build definitions 2018-08-31 18:09:53 +10:00
Matthew Waters 43f0b75e55 gl/meson: add build for iOS 2018-08-31 12:23:40 +10:00
Zeeshan Ali 3880eb819a video: Add GST_VIDEO_INFO_FIELD_RATE_N() macro
Add a new macro that gives you the rate of the fields, which is the
numerator of the field-rate for ALTERNATE interlacing video and FPS for
progressive and other interlacing formats.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali be6c8400b0 video: Add gst_video_decoder_set_interlaced_output_state()
Add a variant of gst_video_decoder_set_output_state() that allows the user
to pass an interlacing mode as well. This is needed to ensure that
gst_video_info_set_interlaced_format() is used instead so that
GstVideoInfo.size is correctly initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali 4879983253 video: Add GST_VIDEO_INFO_FIELD_HEIGHT() macro
Add a new macro that gives you the height of a field. It returns the
height of the full frame unless split-field (alternate) interlacing is
in use. Also GST_VIDEO_INFO_COMP_HEIGHT macro now uses this new macro to
get the height for its calculation.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali 0fbe4634a6 video: Add gst_video_info_set_interlaced_format()
Add a helper to set the interlacing mode while creating the GstVideoInfo
in addition to format and resolution. Using this helper will ensure that
size is correctly calculated for split-field interlacing mode.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali bd9c7b36d8 video: Add GST_VIDEO_INTERLACE_MODE_ALTERNATE
Add a new interlace mode enum to represent buffers containing a single
field of an interlaced video in a buffer. The name is based on the
equivalent video format in the V4L2 API, V4L2_FIELD_ALTERNATE:

https://01.org/linuxgraphics/gfx-docs/drm/media/uapi/v4l/field-order.html

Since caps fields are optional, we also introduce a new caps feature,
"format:Interlaced" that always goes with "alternate" interlace mode to ensure
that caps for this incompatible format are incompatible with other interlaced
and progressive video caps.

https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Zeeshan Ali 8fa9fda226 video: Add format for single fields of interlaced video in a buffer
https://bugzilla.gnome.org/show_bug.cgi?id=796106
2018-08-29 12:14:38 -04:00
Nicolas Dufresne 63e602c63e doc: glbasefilter: Add missing Since for gst_gl_base_filter_find_gl_context() 2018-08-29 10:38:32 -04:00
Nirbheek Chauhan 12236671c7 meson: Always define gstgl_dep to a valid dependency object
Fixes configure error when gl support was auto-detected as not being
available:

ext/gl/meson.build:50:20: ERROR:  Unknown variable "gstgl_dep".
2018-08-28 13:43:36 +05:30
Yuji Kuwabara c537b2e2bb gl/dispmanx: fix removing foreign window handle
gst_gl_window_dispmanx_egl_set_window_handle() removes native window handle
(dispmanx element), regardless it was foreign window handle
(set via gst_video_overlay_set_window_handle()) or not.

This problem prevents glimagesink reusable.
(PAUSED -> READY -> PAUSED does not work)

This patch corrects it comparing the native window handle with foreign window
handle. This behavior is same as gst_gl_window_dispmanx_egl_close().

https://bugzilla.gnome.org/show_bug.cgi?id=785199
2018-08-28 14:54:40 +10:00
Matthew Waters 090bbd0721 gl/wayland: correctly use the set_render_rectangle size first
https://bugzilla.gnome.org/show_bug.cgi?id=789384
2018-08-28 14:31:43 +10:00
memeka 08ebb8264d gl/wayland: add preferred window size, and set it according to video size
The glimagesink wayland backend lacks the implementation of
gst_gl_window_wayland_egl_set_preferred_size. Because of this, glimagesink windows on
wayland are created with a fixed window size of 320x240.

[Matthew Waters]: gst-indent sources

https://bugzilla.gnome.org/show_bug.cgi?id=789384
2018-08-28 14:30:19 +10:00
Tim-Philipp Müller 4fe65c1633 gl: use right export decorator 2018-08-26 11:16:18 +02:00
Tim-Philipp Müller 4906ec8c13 audio: use right export decorator 2018-08-26 11:16:10 +02:00
Tim-Philipp Müller f1272e547d meson: gl: return not-found dependency instead of disabler if opengl is disabled
This allows consumers of the gstgl dependency where gstgl is optional
to do things like:

  config_data.set('HAVE_GST_GL', gstgl_dep.found())
  deps = [gstvideo_dep, gstgl_dep]

meaning they can still use the dep unconditionally. With the
disabler we would just disable the whole target even if the
gstgl part was an optional extra. We can add an option to
dependency() later to let users/consumers of the dep decide
if they want a not-found dependency or a disabler instead.
2018-08-18 12:37:48 +01:00
Nirbheek Chauhan b5aa5fa308 meson: host_system is 'ios' when building for iOS
The cross file sets this value, and we use 'ios' in Cerbero.
2018-08-17 04:14:15 +05:30
Sebastian Dröge 0bf207aa53 audioaggregator: Also run the audio-specific caps fixation for audio aggregator subclasses that can't convert 2018-08-16 18:03:37 +03:00
Sebastian Dröge 320243050b audioaggregator: Fixate to some meaningful values if no sinkpad is configured yet
The default caps fixation code would select a rate of 1 for example,
which is not really ideal.
2018-08-16 18:00:24 +03:00
Tim-Philipp Müller 73828a1a5c meson: move gmodule check to top-level
It's also needed by the generic/states test and the variable
is currently checked as part of the opengl lib tests so wouldn't
be available if opengl was disabled.
2018-08-16 10:58:47 +01:00
Tim-Philipp Müller 4ec1ba433d meson: add option for opengl and the misc optional gl plugin deps
Finer control over the opengl integration library dependencies
is already implemented via the gl_api, gl_platform, and gl_winsys
options.

https://bugzilla.gnome.org/show_bug.cgi?id=796947
2018-08-16 10:56:58 +01:00
Sebastian Dröge 1b6eed694c audioaggregator: Properly propagate caps negotiation failures
Otherwise we'll end up doing a division by zero when clipping buffers,
and might even accept buffers for which we don't know the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=796951
2018-08-14 10:24:33 +03:00
Tim-Philipp Müller ca15315565 gst-libs: include config.h in all source files
This will be needed later when we get our export define from config.h
2018-08-13 09:23:34 +01:00
Tim-Philipp Müller f548546d41 pbutils, rtsp: fix deprecation guards
Function body must only be removed if compiling with
GST_REMOVE_DEPRECATED. Function declaration must not
be skipped if GST_DISABLE_DEPRECATED is defined, since
it contains our export decorator and we wouldn't export
the symbol as public API any more then since we compile
with GST_DISABLE_DEPRECATED.
2018-08-13 00:24:50 +01:00
Tim-Philipp Müller 4b68e3e658 tag: add license to generated backup language name table and update
It's LGPL same as iso-codes
2018-08-12 13:24:39 +01:00
Tim-Philipp Müller 6eb6140969 meson: use iso-codes in gsttag if available 2018-08-12 12:55:00 +01:00
Tim-Philipp Müller 553de4906f meson: tag: check for zlib and support compressed id3v2 tag if found
https://bugzilla.gnome.org/show_bug.cgi?id=793995
2018-08-11 18:51:33 +01:00
Matthew Waters 91bc6f63f6 glviewconvert: fix output when a transformation matrix is used
If we have a transformation matrix, we have no idea where in the output
the video is going to endup.  It might also be different and not cover
the entire output.

We need to clear the output to remove any previous data in the backing
texture.

Found from
https://stackoverflow.com/questions/51707229/python-gstreamer-for-dynamic-control-of-element-properties
2018-08-10 22:46:34 +10:00
Bastian Köcher efa9bdccf9 meson: fix install dir for generated header files
Nixos installs into a non-standard includedir, so need
to take account of the 'includedir' option instead of
just hard-coding 'include' here.

https://bugzilla.gnome.org/show_bug.cgi?id=794856
2018-08-10 12:43:38 +01:00
Sebastian Dröge 0340c7e1f8 tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
Instead of considering every failed typefinding as an error, even in
case of e.g. GST_FLOW_FLUSHING.
2018-08-08 12:46:43 +02:00
Thibault Saunier 7757e07f68 rtsp: Include gstreamer-base gir dir in autotools 2018-08-06 14:18:12 -04:00
Matthew Waters 3d22e7d9da gl/meson: fix macos additions for non-macos platforms
"gst-libs/gst/gl/meson.build:655:20: ERROR:  Unknown variable "quartzcore_dep"."
2018-08-03 19:06:00 +10:00
Alessandro Decina 06b8792a5f gl/meson: OSX support (CGL and Cocoa)
[Matthew Waters]: minor additions such as -fobjc-arc and relying on
dependency rather than cc.find_library()
2018-08-03 12:53:10 +10:00
Norbert Wesp 574607702b Add GBM_CFLAGS and define EGL_PLATFORM_GBM_MESA
Building an image with yocto for an 'am335x' processor will fail,
because 'gbm.h' can not be found and 'EGL_PLATFORM_GBM_MESA' is not defined.

So simply adding define of 'EGL_PLATFORM_GBM_MESA' in 'gstgldisplay_egl.c'
and adding 'GBM_CFLAGS' in 'gst-gl.m4' to get rid of this errors and complete
a full build process.

ERRORs were:
-----------
gst-plugins-base-1.14.1/gst-libs/gst/gl/gbm/gstglwindow_gbm_egl.h:24:10:
fatal error: gbm.h: No such file or directory
  #include <gbm.h>
           ^~~~~~~

gst-plugins-base-1.14.1/gst-libs/gst/gl/egl/gstgldisplay_egl.c:157:39:
error: 'EGL_PLATFORM_GBM_MESA' undeclared (first use in this function);
did you mean 'EGL_PLATFORM_WAYLAND'?
  ret = _gst_eglGetPlatformDisplay (EGL_PLATFORM_GBM_MESA, (gpointer) display,
                                    ^~~~~~~~~~~~~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=796885
2018-08-02 12:17:56 +10:00
freyr 810d560a2f gl/gbm: allow headless mode
Don't require an output for the GBM backend.

https://bugzilla.gnome.org/show_bug.cgi?id=794716
2018-08-01 14:50:10 +10:00
Sebastian Dröge 2f497ed217 tagdemux: Properly propagate gst_pad_pull_range() errors
And don't consider FLUSHING an actual error, just stop in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796883
2018-07-27 16:23:09 +03:00
Nirbheek Chauhan eadedc68f8 meson: Add feature options for all plugins
GL dependency detection is still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:42:11 +05:30
George Kiagiadakis ab2548d78d audio-buffer: fix typo in assignment that causes buggy behavior 2018-07-24 15:09:25 +03:00
George Kiagiadakis 0ce20cef4f gstaudiodecoder: take into account GstAudioMeta::samples on the output buffers
This is useful if the output buffers are planar and have extra padding
on each plane, in which case size/bpf does not represent the number of
valid samples.

https://bugzilla.gnome.org/show_bug.cgi?id=705977
2018-07-23 15:27:08 +03:00
George Kiagiadakis 2d38d2f1d3 gstaudiodecoder: do not aggregate output if buffers are planar
Aggregation will break the layout, as it concatenates buffers,
and fixing it here would be much more inefficient than configuring
the actual decoder implementation to output larger buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=705977
2018-07-23 15:27:08 +03:00
Nicolas Dufresne 63cf6b4203 glupload: Only offer DMABuf caps feature if using EGL
This was miss-leading VAAPI which was not forcing linear back buffers,
would still export DMABuf. That caused bad rendering as the buffers are
tiled and most likely compressed.

https://bugzilla.gnome.org/show_bug.cgi?id=796822
2018-07-18 09:04:35 -04:00
Iñigo Huguet 48a0178857 gl/build: fixed failed compilation due to missing EGLuint64KHR typedef
[Matthew Waters]: add meson differences

https://bugzilla.gnome.org/show_bug.cgi?id=796820
2018-07-18 14:02:01 +10:00
Nicolas Dufresne ae5120a489 Revert "glupload: Only offer DMABuf caps feature if using EGL"
This reverts commit bc9afe7243.
2018-07-17 11:51:49 -04:00
Nicolas Dufresne bc9afe7243 glupload: Only offer DMABuf caps feature if using EGL
This was miss-leading VAAPI which was not forcing linear back buffers,
would still export DMABuf. That caused bad rendering as the buffers are
tiled and most likely compressed.
2018-07-17 11:43:40 -04:00
Nicolas Dufresne 62cb08404b videodecoder: Don't always drain on gaps/discont
V4L2 and OMX decoder don't support draining and keeping reference
frames. As a side effect, these decoder just stops working on
gaps/discont. When this drain was introduced, the commit stated that
this was for TRICKMODE_KEY_UNITS, so only drain if running in this mode.

https://bugzilla.gnome.org/show_bug.cgi?id=796771
2018-07-12 15:25:51 -04:00
George Kiagiadakis e1bc49923f libs: audio: implement planar buffer support in gst_audio_buffer_reorder_channels()
https://bugzilla.gnome.org/show_bug.cgi?id=796743
2018-07-12 13:38:27 +03:00