Sebastian Dröge
c3f86ece48
gl/cocoa: Don't init and clear static GMutex / GCond
...
We would potentially use it from the main loop later in
gst_gl_window_cocoa_init_nsapp() if it timed out before.
2017-12-09 19:31:52 +00:00
Luis de Bethencourt
9d9d07168f
glfilter: remove logically dead code
...
Soon after setting two variables to 1, the code checks if their values are
different from each other. This would never be true. Removing this.
CID 1226443
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
eeda7a29ce
glbufferpool: Always recalculate buffer size
...
Actually we should always recalculate buffer size since our buffer size
even when not-padded is smaller for many sub-sampled formats. This is
because we don't add padding between the planes.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
04cd97ae59
glmemory: No need for padding
...
A memory object cannot be put on stack, so no need for padding.
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
a1e02726ee
gl: Add support for GstVideoAlignment
...
This allow saving a copy with libav video decoders or decoders with
similar padding requirement.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
45ac36ca26
glmemory: Handle upload/download flags from map
...
Problem was that if buffer was mapped READWRITE (state of buffers from
libav right now), mapping it READ/GL will not upload. This is because the
flag is only set when the buffer is unmapped. We can fix this by setting
the flags in map. This result in already mapped buffer that get mapped
to be read in GL will be uploaded. The problem is that if the write
mapper makes modification afterward, the modification will never get
uploaded.
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Nicolas Dufresne
197e8de6e6
glmemory: Handle custom stride with OPENGL3
...
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2017-12-09 19:31:52 +00:00
Wang Xin-yu (王昕宇)
fc09b8b93c
glfilter: fix position/texcoord attrib index usage
...
https://bugzilla.gnome.org/show_bug.cgi?id=741231
2017-12-09 19:31:52 +00:00
Matthew Waters
ba3a3cd783
gl: fixup vao and vbo usage for legacy GL
2017-12-09 19:31:52 +00:00
Philippe Normand
7c6d9b4c59
glsyncmeta: add G_END_DECLS
2017-12-09 19:31:51 +00:00
Julien Isorce
690b20b9f4
glcontext: try cgl before glx
...
It was already done by commit
f506e80686
but it has been broken by commit
45ec777cea
2017-12-09 19:31:51 +00:00
Matthew Waters
bbac8bf8d0
glcontext: require GL_ARB_ES2_compatibility for opengl3
...
until we generate gl3 compliant shaders
https://bugzilla.gnome.org/show_bug.cgi?id=740012
2017-12-09 19:31:51 +00:00
Matthew Waters
0af6dcfa23
gl: fixup compat definition for GLuint64 for OS X
2017-12-09 19:31:51 +00:00
Matthew Waters
462a202427
gl: add compat definition for GLuint64 for android
...
../../../../gst-libs/gst/gl/glprototypes/sync.h:41:23: error: unknown type name 'GLuint64'
GLuint64 timeout))
2017-12-09 19:31:51 +00:00
Matthew Waters
81a470905b
glsync: fix build with desktop gl
2017-12-09 19:31:51 +00:00
Matthew Waters
3be1edc634
gl: fix various build errors without desktop gl
2017-12-09 19:31:51 +00:00
Matthew Waters
a2a8059daf
gldisplay: fix build error
...
gstgldisplay.c:234:541: error: 'return' with no value, in function returning non-void [-Werror]
g_return_if_fail (GST_IS_GL_DISPLAY (display));
2017-12-09 19:31:51 +00:00
Matthew Waters
4bd62ebb03
gldisplay: implement runtime GL api filtering
...
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2017-12-09 19:31:51 +00:00
Matthew Waters
892d056a44
gl: remove the use of glu
2017-12-09 19:31:51 +00:00
Matthew Waters
6bb113f685
gl: add a sync meta for synchronizing across GL contexts
...
A context can create a GLsync object that can be waited on in order
to ensure that GL resources created in one context are able to be
used in another shared context without any chance of reading invalid
data.
This meta would be placed on buffers that are known to cross from
one context to another. The receiving element would then wait
on the sync object to ensure that the data to be used is complete.
2017-12-09 19:31:51 +00:00
Matthew Waters
f4dbfec17b
glprototypes: add sync function definitions
2017-12-09 19:31:51 +00:00
Matthew Waters
8e98591153
glfilter: add a gl3 code path using vao's and vbo's
2017-12-09 19:31:51 +00:00
Matthew Waters
414a319f03
glframebuffer: add support for gl3
2017-12-09 19:31:50 +00:00
Matthew Waters
b6fc74c9b8
glcolorconvert: add support for gl3
2017-12-09 19:31:50 +00:00
Matthew Waters
dcd5fce8fb
glshader add support for gl3
2017-12-09 19:31:50 +00:00
Matthew Waters
86c084f1af
glx: ask for a GL3 core context
2017-12-09 19:31:50 +00:00
Sebastian Dröge
a6f02d4b29
glcolorconvert: Unref buffer with the correct function
2017-12-09 19:31:50 +00:00
Sebastian Dröge
5b13dca0ce
glmemory: Handle failure of memory allocation gracefully
2017-12-09 19:31:50 +00:00
Sebastian Dröge
47a8242399
glmemory: Use g_try_malloc() in the appropriate places
...
g_malloc() aborts if allocation fails, it's pointless to check against NULL
afterwards. That's why g_try_malloc() exists.
2017-12-09 19:31:50 +00:00
Wang Xin-yu (王昕宇)
45db2931c8
glcolorconvert: support RGB16/BGR16 video format download
...
https://bugzilla.gnome.org/show_bug.cgi?id=740801
2017-12-09 19:31:50 +00:00
Matthew Waters
e32c4a62c2
gl/wayland: implement resizing the window using the right mouse button
2017-12-09 19:31:50 +00:00
Matthew Waters
e252c908e7
glfilter: support fixed dimensions on both sides of the element
...
Fixes:
width=320,height=240 ! glfilter ! width=800,height=600
width=230,height=240 ! glfilter ! width=600
... ! glfilter ! width=800
2017-12-09 19:31:50 +00:00
Ramprakash Jelari
c5804b9af5
glcontext: Fix unused variable warning by moving declaration where it is actually used
2017-12-09 19:31:50 +00:00
Sebastian Dröge
3c7095e5ad
glupload: Fix valid compiler warning
...
gstglupload.c:442:32: error: if statement has empty body [-Werror,-Wempty-body]
if (upload->texture_ids[i]);
^
2017-12-09 19:31:50 +00:00
Philippe Normand
ce58219124
gl: ship the gstglcontext_egl.h header
...
It is required by gsteglimagememory.h.
https://bugzilla.gnome.org/show_bug.cgi?id=740611
2017-12-09 19:31:50 +00:00
Tim-Philipp Müller
13706c2c05
gl: shadervariables: make parsing of floats locale-independent
...
Floating point numbers are written differently in different
locales, e.g. in many countries 1/2 = 0,5 instead of 0.5, and
strtod will not be able to parse "0.5" correctly in such a
locale.
2017-12-09 19:31:50 +00:00
Matthew Waters
97607a0d50
glshadervariables: also trim \r as well as \n
2017-12-09 19:31:50 +00:00
Matthew Waters
00506bf183
glupload: rearchitecture for non GLMemory inputs/outputs
...
Allows other memory types to be implemented/returned/used by the caller.
2017-12-09 19:31:50 +00:00
Vineeth T M
d747c65d4c
glcontext: build errors when GST_GL_HAVE_OPENGL is 0
...
Moving variables within #if GST_GL_HAVE_OPENGL, which are not going to be used otherwise.
and which are needed only when OpenGl is present
https://bugzilla.gnome.org/show_bug.cgi?id=740235
2017-12-09 19:31:50 +00:00
Matthew Waters
e731762984
glfilter: add read-only context property
2017-12-09 19:31:50 +00:00
Sebastian Dröge
8f5faa3872
gl/cocoa: Only use convertRectToBacking on OSX >= 10.7
...
It does not exist before and older versions also don't have
support for HiDPI displays anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=740201
2017-12-09 19:31:50 +00:00
Sebastian Dröge
d70f6a9b5e
gl: Use numeric OSX version instead of the macro
...
The macro is not defined on older OSX versions and evaluates to 0.
https://bugzilla.gnome.org/show_bug.cgi?id=740201
2017-12-09 19:31:50 +00:00
Sebastian Dröge
3fe5be7c9a
gl/cocoa: Don't override the application delegate
...
Otherwise interesting things will happen in Cocoa applications, like
infinite event loops that block the NSApplication loop forever.
This was only needed for GNUStep and thus can safely be removed now.
2017-12-09 19:31:50 +00:00
Sebastian Dröge
673b0190af
gl/cocoa: Remove GNUStep support
...
Until gcc and GNUStep properly support Objective-C blocks and other
"new" features of Objective-C we can't properly support them without
making the code much more ugly.
https://bugzilla.gnome.org/show_bug.cgi?id=739152
2017-12-09 19:31:50 +00:00
Hyunjun Ko
db6ea1b3bd
gl: Correct invalid comment text
2017-12-09 19:31:49 +00:00
Julien Isorce
af59b771fd
gl: do not raise a critical msg if the backend does not handle window events
...
Fix "assertion 'window_class->handle_events != NULL' failed"
if not using a X11 window.
2017-12-09 19:31:49 +00:00
Matthew Waters
af9b73043e
gl: remove the width/height fields from the caps to support frame resizing
...
It was previously only occuring with sysmem caps features
https://bugzilla.gnome.org/show_bug.cgi?id=739334
2017-12-09 19:31:49 +00:00
Sebastian Dröge
90022c451c
gstglconfig: Put gstglconfig.h into $(libdir)/gstreamer-1.0/include
...
It's architecture dependent and should not be placed into the include
directory as the assumption is that all those headers are architecture
independent.
https://bugzilla.gnome.org/show_bug.cgi?id=739767
2017-12-09 19:31:49 +00:00
Matthew Waters
d738b78229
glutils: only attempt getting the app context when we don't already have a display
...
avoids querying/messaging the world on each frame
2017-12-09 19:31:49 +00:00
Matthew Waters
e2f61d20a2
glcontext: fail context creation if glGetString returns NULL
2017-12-09 19:31:49 +00:00