Commit graph

18430 commits

Author SHA1 Message Date
Tim-Philipp Müller e9b740d8a5 meson: set info variables in gstreamer-gl .pc file 2017-12-19 12:02:09 +00:00
Tim-Philipp Müller 656886e781 docs: plugins: add opengl plugin to docs 2017-12-19 12:02:06 +00:00
Tim-Philipp Müller 3cd97e975f docs: update for git master 2017-12-19 12:02:01 +00:00
Tim-Philipp Müller 666bbb1550 docs: add moved gl lib to documentation 2017-12-19 12:01:56 +00:00
Tim-Philipp Müller d85a7a9b2e gl: hook up tests
Also move over simple gl launch line test.
2017-12-19 12:01:51 +00:00
Tim-Philipp Müller 8227135f3b gl: hook up to build system
Tests and documentation will follow separately.

The mixer elements in the opengl plugin need to stay
in -bad for now since they use GstVideoAggregator.

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:01:48 +00:00
Tim-Philipp Müller 0eefcb23b4 gl: examples: fix c++ code for -Wreturn-aggregate
.. and use #ifdef instead of #if
2017-12-19 12:01:44 +00:00
Tim-Philipp Müller 26b3955aba gl: use #ifdef HAVE_* instead of #if HAVE_FOO 2017-12-19 12:01:41 +00:00
Tim-Philipp Müller 59fe9c9122 gl: remove GST_USE_UNSTABLE_API bits 2017-12-19 12:01:37 +00:00
Tim-Philipp Müller 729b500208 opus: remove unused build variable and define 2017-12-19 12:01:32 +00:00
Sebastian Dröge 1aec533d21 allocators: move GstPhysMemoryAllocator abstraction from -bad to -base
This can be used in a generic way as common interface by all platforms
that, in one way or another, pass around physical memory addresses.

This is used by the gl lib and seems useful enough, so might just as
well move it next to the other allocators.

https://bugzilla.gnome.org/show_bug.cgi?id=779067
2017-12-19 12:01:26 +00:00
Tim-Philipp Müller cdbb261d9c Move OpenGL library and plugin from -bad
Merge branch 'opengl-move'

https://bugzilla.gnome.org/show_bug.cgi?id=754094
2017-12-19 12:00:43 +00:00
Nicolas Dufresne 5affe09c48 videoconvert: Filter-out crop meta
To passthrough crop-meta, the converter would need to allocate and
convert buffers of the size of the originating buffer. This is currently
made difficult by GstBaseTransform since we cannot alter the caps passed
though the allocation query. We would also need to wait for the first
input buffer to be received in order to make the decision around that
size.

So the short and safe solution is just to stop pretending we can
passthrought that meta.

https://bugzilla.gnome.org/show_bug.cgi?id=791412
2017-12-17 15:50:00 -05:00
Dongil Park a8a5905ec6 playbin3: Fix accessing invalid index in GstStream when received select-stream event
If select-stream event was send to playbin3 as missing any GstStream of ES type
(V or A or TEX) of collection then, playbin will access to invalid address of
GstStream due to invalid index limit. This caused SIGSEGV.

https://bugzilla.gnome.org/show_bug.cgi?id=791638
2017-12-15 09:03:12 +01:00
Matthew Waters ae3fc49eaf Automatic update of common submodule
From e8c7a71 to 3fa2c9e
2017-12-14 14:48:54 +11:00
Jun Xie e0846de5b9 xvimagesink: fix inaccurate error message
It's about not being able to calculate the display size, not the display
ratio.

https://bugzilla.gnome.org/show_bug.cgi?id=791463
2017-12-11 10:29:12 +02:00
Víctor Manuel Jáquez Leal 8f0bf85cfe gldownload: fix wrong enum
When compiling with clang, an enum conversion error is triggered
since GstVideoFrameFlags are not GstVideoFlags.

This patch sets GST_VIDEO_FRAME_FLAG_NONE to the added video meta.

https://bugzilla.gnome.org/show_bug.cgi?id=791251
2017-12-09 19:32:31 +00:00
Nicolas Dufresne dc5dd864e6 gldownload: Add missing ifdef for dmabuf and egl
This fixes the build for platforms that don't support one or the other.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne b769f02261 gldisplay: Prefer wayland over X11
As most Wayland compositors supports XWayland, X11 backend get
selected. This also realign better GStreamer decision to what
happens with GTK and other stack out there.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne 4cb1a1ca97 gldisplay: Add missing GL API to the doc 2017-12-09 19:32:31 +00:00
Matt Fischer c98f92ee03 gldownload: Add dmabuf exporting
This patch adds code to gldownload to export the image as a
dmabuf if requested.  The element now exposes memory:DMABuf as
a cap feature, and if it is selected, the element exports the
texture to an EGL image and then a dmabuf. It also implements a
fallback to system memory download in case the exportation failed.

https://bugzilla.gnome.org/show_bug.cgi?id=776927
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller b5dee0fe5b Remove GstAggregator from -bad, moved to core
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-09 19:32:31 +00:00
Matthew Waters 1abd0804f4 gl/caopengllayer: use public GstGLContext instead of Cocoa-specific one
Allows keeping the GstGLCAOpenGLLayer public but not the winsys-specific
context/display/window.
2017-12-09 19:32:31 +00:00
Matthew Waters 6533e25e9c Revert "gl: cocoa: sprinkle some GST_EXPORT"
This reverts commit 94d798c333.

cocoac headers don't need to be public as all the functionality can be
provided by the base class
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller 84249c6f55 gl: cocoa: sprinkle some GST_EXPORT
Undefined symbols for architecture x86_64:
  "_gst_gl_context_cocoa_get_type", referenced from:
      __create_layer in libgstopengl_la-caopengllayersink.o

Might need some more in other headers, but first need to
clarify what exactly should be exported, there are some
inconsistencies (installed header files vs. funcs in docs).
2017-12-09 19:32:31 +00:00
Nicolas Dufresne ecab99a7a9 sdlshare: Destroy GL backend buffer before the GL Context
This was otherwise leading to a deadlock in the GL library.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne 9e208ba0b6 sdlshare2: Fix race conditions
The client-draw callback is running on the GL Thread, which will
be required to map the buffer. Map early, and pass the mapped
frame instead. On top of that, make sure to signal any pending
draw before trying to push EOS, as some pad locks might be taken.
This is the cost of using the same thread to control GStreamer and
to render GL.
2017-12-09 19:32:31 +00:00
Nicolas Dufresne dea918a835 meson: Build gl/sdl examples 2017-12-09 19:32:31 +00:00
Jan Schmidt a4834c4352 viv-fb: Don't destroy the native FB display
It causes crashes in applications because the result of
fbGetDisplay() might be in use elsewhere in the application
and Vivante doesn't seem to do any refcounting
2017-12-09 19:32:31 +00:00
Jan Schmidt 7d1f3db884 Revert "gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass"
This reverts commit 47fd4d391e.

This patch is incorrect. It doesn't actually compile, and causes a crash
because the viv-fb window implementation needs a native EGL handle
to pass to fbCreateWindow, but the GstGLDisplayEGL handleis actually
an EGLDisplay now (and gets cast to the wrong type)
2017-12-09 19:32:31 +00:00
Jan Schmidt bbe084de9d 3dvideo example: Correct video overlay for HiDPI
Use the GTK scaling factor to scale the video allocation
so video displays correctly on hi-dpi screens
2017-12-09 19:32:31 +00:00
Tim-Philipp Müller 4e2ede5e6d meson: remove outdated comment in build file 2017-12-09 19:32:31 +00:00
Mathieu Duponchelle d5addcb352 aggregator: Remove klass->sinkpads_type
This posed problems for the python bindings (and possibly others).

Instead, subclasses now use add_pad_template_with_gtype.

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-12-09 19:32:31 +00:00
Edward Hervey 5915f45e27 all: Fix left-shift undefined behaviour
Cast to the target type before shifting (or use macro if available)
2017-12-09 19:32:31 +00:00
Matthew Waters d7f43bb06b gl/tests: add some simple shader testing
Making sure that the default shaders compile and are usable
2017-12-09 19:32:31 +00:00
Matthew Waters 0063e63fe3 gltestsrc: guard stop in gl thread
So we don't result in a critical when we've never created the GL context:

gst_gl_context_thread_add: assertion 'GST_IS_GL_CONTEXT (context)' failed
2017-12-09 19:32:31 +00:00
Matthew Waters 5345acac54 glbasefilter: actually indicate start internally
Otherwise when we stop, the necessary stop functions will not be called
and things may be leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=788280
2017-12-09 19:32:30 +00:00
Matthew Waters 5793dfe881 gltestsrc: free in the GL thread on stop
Calling GL functions not on the GL thread may crash in some GL
implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=789665
2017-12-09 19:32:30 +00:00
Tim-Philipp Müller 77277c46f9 gl: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-12-09 19:32:30 +00:00
Matthew Waters a534d8d74c gl/shader: allow setting non-square matrices as uniforms on gles platforms
It is possible with GLES3
2017-12-09 19:32:30 +00:00
Matthew Waters fab729c61f gl/query: split tests and fix some corresponding issues in usage 2017-12-09 19:32:30 +00:00
Jérôme Laheurte 247e232ec4 Use value instead of version macro when testing for mac OS version
https://bugzilla.gnome.org/show_bug.cgi?id=788404
2017-12-09 19:32:30 +00:00
Cassandra Rommel 2ed379c732 gl: Use GstGLDisplayEGL directly instead of creating a GstGLDisplayVIVFb subclass
This simplifies the code a lot without any functional changes apart from
not closing the display connection. Closing the display connection is
not safe to do as it is shared between all other code in the same
process and no reference counting or anything happens at the platform
layer.
2017-12-09 19:32:30 +00:00
Justin Kim 5b35e2339a glcontext_egl: Add gstglwindow header
Otherwise, compiler complains implicit function declaration warning.

https://bugzilla.gnome.org/show_bug.cgi?id=788413
2017-12-09 19:32:30 +00:00
Ponnam Srinivas e686f1b628 glfilter: Unmap video frame in error case
https://bugzilla.gnome.org/show_bug.cgi?id=788194
2017-12-09 19:32:30 +00:00
Ponnam Srinivas 601e274c95 glmixer: Unmap video frame in error case
https://bugzilla.gnome.org/show_bug.cgi?id=788127
2017-12-09 19:32:30 +00:00
Haihua Hu 29973b7d6c glvidemixer: need reconfigure output gemotry after caps renegotiated 2017-12-09 19:32:30 +00:00
Matthew Waters 9fbd1930b7 Revert "glvideomixer: need update output geometry after src caps reconfigure"
This reverts commit d6e538dc56.
2017-12-09 19:32:30 +00:00
Haihua Hu 60eeef12a0 glvideomixer: need update output geometry after src caps reconfigure
Need update output geometry when sink caps changed and use
gst_structure_set to update caps if structure is fixed

https://bugzilla.gnome.org/show_bug.cgi?id=787820
2017-12-09 19:32:30 +00:00
Haihua Hu c33fc416b2 gl/viv-fb: transform screen coordinate to viewport coordinate
In y direction, screen coordinate are opposite to viewport coordinate.

https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00