Commit graph

17 commits

Author SHA1 Message Date
Haihua Hu 2ea98270b4 viv-fb: fix build break for GST_GL_API
Need include config.h in gstglwindow_viv_fb_egl.c
2019-06-11 18:55:00 +08:00
Matthew Waters 51f2d05ff6 gl/docs: add to new docs system 2019-05-21 01:49:48 +00:00
Matthew Waters 6a37bf9bb9 gl: Don't restore the viewport on function exit
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.

This means that the various sinks need to reset the viewport on draw.

In the process, fix resizing on cocoa.
2019-03-08 17:49:05 +11:00
Tim-Philipp Müller dc29bc4e13 libs: fix API export/import and 'inconsistent linkage' on MSVC
For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

While we're at it, add new GST_API_EXPORT in config.h and use
that for GST_*_API decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 08:45:34 +01:00
Haihua Hu e7700f20fd viv-fb: export viv-fb display api
qmlgl plugin will use this api

https://bugzilla.gnome.org/show_bug.cgi?id=795562
2018-04-26 09:29:41 +03:00
Haihua Hu 3c8368129a viv-fb: install gstgldisplay_viv_fb.h into build result
gstgldisplay_viv_fb.h is need by qmlgl plugin in gst-good package

https://bugzilla.gnome.org/show_bug.cgi?id=795499
2018-04-26 09:29:21 +03:00
Carlos Rafael Giani 9ce1e4e712 viv-fb: Include gstglfuncs.h to fix cross compilation errors
https://bugzilla.gnome.org/show_bug.cgi?id=794589
2018-03-22 09:51:58 +02: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
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
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
Haihua Hu 8ef4a7ddaf gl/viv-fb: fix wrong pos (x,y) calculate in queue_resize
queue_resize viewport coordinate calculate is wrong and
force queue_resize when do _set_render_rectangle in case
user input pos changed

https://bugzilla.gnome.org/show_bug.cgi?id=787394
2017-12-09 19:32:30 +00:00
Tim-Philipp Müller b6e65172fe gl: fix build
Include private headers for parent class debug categories.
2017-12-09 19:32:29 +00:00
Matthew Waters 4c75bab70d glcontext: add public swap_buffers function
That simply calls the implementation
2017-12-09 19:32:28 +00:00
Sebastian Dröge a9a05c01a9 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-12-09 19:32:28 +00:00
Sebastian Dröge dde95e8270 gl/viv-fb: Don't use deprecated symbols and make macros more consistent
https://bugzilla.gnome.org/show_bug.cgi?id=778825
2017-12-09 19:32:26 +00:00
Sebastian Dröge ed7c9f70d9 gl: Add support for Vivante EGL FB windowing system
This is very similar to how dispmanx on the Raspberry Pi works.

Based on a patch by Haihua Hu <b55597@freescale.com> from
https://github.com/Freescale/meta-freescale/tree/master/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad

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