Commit graph

19215 commits

Author SHA1 Message Date
Carlos Rafael Giani
08ea7d676e gl/gbm: Add GST_GL_GBM_DRM_CONNECTOR environment variable
If multiple DRM connectors are connected, currently the first one is
picked. Improve this by adding an environment variable that allows for
choosing a connector by name. The connector name has been made so they
are compatible with modetest/modeprint DRM utilities.

Related to #490
2018-12-01 13:44:26 -05:00
Carlos Rafael Giani
3663ad787d gl/gbm: Improve logging output
* List all connectors, modes, and encoders, even after picking one
* Add missing DRM_MODE_CONNECTOR_DPI string for logging and improve
  existing strings
* Make sure the names matches modetest/modeprint from DRM utilities

Related to #490
2018-12-01 13:36:17 -05:00
Sebastian Dröge
48460f5ace video: convertframe: Shut down pipeline asynchronously via the thread pool
If we use the main loop it might happen that the caller (e.g. our unit
test) already shut down the loop once the result was received and in
that case the pipeline would never ever be shut down (and our unit test
would hang).
2018-11-30 12:40:19 +02:00
Sebastian Dröge
70d8c174ac video: Split the success and error convert_frame_async() test into two tests
To make it more obvious which of the two is actually failing.
2018-11-30 12:39:43 +02:00
Marouen Ghodhbane
0f3efc4b84 audio-convert: Fix endianness conversion function init
Endianness conversion should be based on the sample width instead of the
sample depth.

Fixes #510
2018-11-30 09:14:33 +00:00
Matthew Waters
694e30f858 glformat: return sized formats in from_video_info
Fixes green output on e.g. Android when converting between YUV->RGBA
2018-11-30 18:05:58 +11:00
Freyr666
7e92aa5bca opengl: gldeinterlace: remove interlace-mode from srcpad's caps
This fixes output caps format, so the output frames are not interlaced anymore
2018-11-30 02:09:50 +00:00
Philippe Normand
d5f2b5dcfa gltestsrc: Run context query only during decide_allocation
Running the context query in _start and during the NULL->READY state transition
can fail because downstream elements might not be able to answer and thus the
source element would not be able to reuse downstream GLContext and GLDisplay.

This issue happened specifically when trying to use gltestsrc in playbin.
2018-11-30 01:55:34 +00:00
Tim-Philipp Müller
179409e9b3 video: fix typo in GstVideoCaptionType docs 2018-11-29 20:51:18 +00:00
Matthew Waters
9bd8da6ed4 gl/meson: Allow for the use of libGL as well as OpenGL
OpenGL.framework and libGL are two different providers of a GL
implementation that can be linked into an application together.
2018-11-29 04:53:50 +00:00
Sebastian Dröge
db1722c9cb video-anc: G_GNUC_CHECK_VERSION was added in GLib 2.42
Define our own version if compiling with older versions. We currently
only require GLib 2.40.
2018-11-28 13:06:35 +00:00
Maciej Wolny
f1556c1660 gst-gl: Remove duplicate declarations
This causes 'redefinition of typedef ...' errors on GCC 4.5.3
2018-11-28 11:59:25 +00:00
Jordan Petridis
2229d53f60
Run gst-indent through the files
This is required before we enabled an indent test in the CI.

https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/33
2018-11-28 05:51:53 +02:00
Freyr666
5d7ceeae61 opengl: gbm: Adds missing unrefs for gl context and drm node release in finalizer
This adds a few missing gst_object_unref calls for the opengl context in
gstglwindow_gbm_egl.c, as well as the missing close call for the
drm node fd in gst_gl_display_gbm_finalize.
2018-11-23 15:41:01 +00:00
Sebastian Dröge
de69fc148d convertframe: Error out directly in the sync variant if the state change to PAUSED failed 2018-11-23 11:52:16 +00:00
Sebastian Dröge
963a318c86 convertframe: Only go to PAUSED state for the async variant
We only care for the pre-roll sample.
2018-11-23 11:52:16 +00:00
Sebastian Dröge
d9cf2973da convertframe: Error out directly if changing the pipeline state to PLAYING failed 2018-11-23 11:52:16 +00:00
Sebastian Dröge
98109bd5de convertframe: Use refcounting for the context
While this creates a circular reference between the pipeline and the
context, this ensures that the context stays alive for as long as any
callbacks could be called on it. The circular reference is broken once
the conversion is finished (or error, or timeout), which will then cause
everything to be freed.

Previously it was possible that a callback could be called on the
context right after it was freed already.

Also use only a single context structure, the second structure does not
simplify anything and duplicates storage.
2018-11-23 11:52:16 +00:00
Víctor Manuel Jáquez Leal
9be278d4f5 gl: libs: glib might not define G_HAVE_ISO_VARARGS
This will fix the compiler warning
"G_HAVE_ISO_VARARGS" is not defined, evaluates to 0 [-Wundef]
2018-11-23 11:20:36 +00:00
Xavier Claessens
d3f9daf07c Check for zlib header 2018-11-22 20:03:33 -05:00
Xavier Claessens
a907ed226c Disable gl examples when we don't have OpenGL 2018-11-21 22:17:35 -05:00
Xavier Claessens
7298139ba1 Fix zlib detection when there is no pkg-config file 2018-11-21 14:56:56 +00:00
Tomasz Andrzejak
e0268c02ab audiodecoder: add API for setting caps on the source pad
This patch adds API in the audio decoder base class for setting the arbitrary
caps on the source pad.  Previously only caps converted from audio info were
possible.  This is particularly useful when subclass wants to set caps features
for audio decoder producing metadata.
2018-11-21 10:11:40 +00:00
Xavier Claessens
720e9ec2cc gl: Fix subclassing of GstGLContextEGL 2018-11-15 13:49:39 -05:00
Philippe Normand
94e3a1af2a video-format: Move Y210 format declaration to avoid ABI break
The Y210 format was added in the middle of the formats enum and list,
introducing an ABI break.

This issue was detected thanks to the gstreamer-rs test harness.
2018-11-15 11:28:11 +02:00
Linus Svensson
72ecbe2aef rtpbasepayload: Update current seqnum for buffer lists
The current sequence number will be the one from the first RTP buffer
when a buffer list is pushed, but should be the last one.

Fixes #495
2018-11-14 12:30:06 +00:00
Nirbheek Chauhan
998749d2a6 meson: Cleanup old FIXMEs that relied on meson bugfixes 2018-11-13 10:04:21 +05:30
Sebastian Dröge
71427eb0f4 video-anc: Add test for VBI encoder 2018-11-12 14:09:28 +00:00
Sebastian Dröge
6e9c71e6c1 video-anc: Implement a VBI encoder
This allows writing out data from caption meta and similar to VBI
2018-11-12 14:09:28 +00:00
Sebastian Dröge
369c79abd3 video-anc: Add comment about our assumption of the ADF user data format
We assume here the same data format for the user data as for the
DID/SDID: 10 bits with parity in the upper 2 bits. In theory some
standards could define this differently and even have full 10 bits of
user data but there does not seem to be a single such standard after
all these years.
2018-11-12 13:14:57 +00:00
Sebastian Dröge
932e9f5eee video-anc: Add support for parsing composite ADF and check the packets' checksum
And add the checksum to the data we test in the unit test.
2018-11-12 13:14:57 +00:00
Sebastian Dröge
ca702a9190 video-anc: Fix documentation about SDID_block_number field
It was giving type 2 for both variants.
2018-11-12 13:14:57 +00:00
Sebastian Dröge
eac38b47d4 video-anc: Add invalid-argument guards to public GstVideoVBIParser API 2018-11-12 13:14:57 +00:00
Jordan Petridis
11b9695b88
Add Gitlab CI configuration
This commit adds a .gitlab-ci.yml file, which uses a feature
to fetch the config from a centralized repository. The intent is
to have all the gstreamer modules use the same configuration.

The configuration is currently hosted at the gst-ci repository
under the gitlab/ci_template.yml path.

Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/29
2018-11-12 13:55:24 +02:00
Sebastian Dröge
d05d52e0ad gl: Make sure that GST_GLSL_PROFILE_ANY gets the correct value in introspection
Currently in Python it would become a signed 64 bit value but should
actually be an unsigned 32 bit value with all bits set.

This is the same problem as with GST_MESSAGE_TYPE_ANY.

See https://bugzilla.gnome.org/show_bug.cgi?id=732633
2018-11-12 05:30:38 +00:00
Sjoerd Simons
989f53383b glupload: dmabuf: be explicit about gl formats used
Rather then letting gst_gl_memory_setup_buffer guess the GL format used
for an eglimage after importing a dmabuf be explicit about it. This
fixes issues where dmabuf import may have used another format then
gst_gl_format_from_video_info would guess on the basis of the available
GL extensions.

In particular on etnaviv the gst_gl_format_from_video_info would
assuming a luminance + alpha GL format is used for YUY2, but the dmabuf
import will always use RG88. Which causes images to end up somewhat pink when
displayed on the screen.
2018-11-11 16:15:59 -05:00
Sjoerd Simons
99ac4e6600 gl/egl: Determine correct format on dmabuf import
When importing an egl image from dmabuf gst_gl_format_from_video_info
was used to work what the result GL format will be. Unfortunately that
will only work if the conventional format and the choosen DRM fourcc for
the format match up.

On etnaviv platforms there is no support for GL_EXT_texture_rg, so the
GL format chosen for YUY2 ends up being GST_GL_LUMINANCE_ALPHA. However
DRM does not do luminance + alpha as it's a legacy GL thing, so the
dmabuf import ends up using DRM_FORMAT_GR88.

To fix this, tie the DRM_FORMAT and the GL format together so they
always match up.
2018-11-11 16:15:54 -05:00
Edward Hervey
23d1440a60 urisourcebin: Avoid potential unitialized/wrong bitrate value
Only calculate and set the bitrate if all conditions are met.
2018-11-09 12:22:31 +01:00
Edward Hervey
18942d7875 urisourcebin: Fix previous commit
rebase wasn't correct :)
2018-11-07 16:28:28 +01:00
Matthew Waters
5a53e89c1a tests/urisourcebin: add get/set watermark test
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters
af166b5b22 urisourcebin: add a statistics property for queueing
It contains the minimum/maximum/average byte and time levels of the
queues inside this urisourcebin

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters
81e00791bf uisourcebin: update forwarded properties on change
Allows changing queueing properties at runtime

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters
784e621b54 urisourcebin: add low/high-watermark properties
These are forwarded to the contained queues.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters
8b69b689c0 urisourcebin: limit the byte size of the queue based on the buffer-size
Use the bitrate advertised by queue2 to determine the limits to
set across possibly multiple queue2/downloadbuffer elements.  e.g.
with two queue2's and a max-bytes based on the ratio of the
bitrate/cumulative_bitrate multiplied by the buffer_size set on urisourcebin.

This allows finer grained control over the buffer used by all the queue
elements inside urisourcebin.  Instead of a maximum of
n_streams*buffer_size being used, only buffer_size will be used however
we will fallback to n_streams*buffer_size if one of the queue2's does
not have bitrate information.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/60
2018-11-07 15:10:05 +00:00
Matthew Waters
a8e2f76731 urisourcebin: remove unused instance variable streams 2018-11-07 15:10:05 +00:00
Edward Hervey
8367d7e6f4 examples: Fix libgstvideo linking
Use the local libgstvideo (and not the system wide one)
2018-11-05 12:00:55 +01:00
Sebastian Dröge
d3a35870a2 audio: const gpointer is not the same as gconstpointer/const void *
See https://bugzilla.gnome.org/show_bug.cgi?id=664491
2018-11-05 08:16:16 +00:00
Matthew Waters
e466226d46 Update common submodule location without /git/ directory 2018-11-05 05:35:12 +00:00
Haihao Xiang
7a96f3a9b5 Clone the code from gitlab
This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/503
2018-11-05 12:39:03 +08:00
Sebastian Dröge
a1c14959d6 video-anc: Add unit tests for VBI parsing
https://bugzilla.gnome.org/show_bug.cgi?id=797363
2018-11-01 19:30:41 +02:00