Matthew Waters
989af902fe
glmemory: use the correct size for the pbo
...
It was missing the GstVideoAlignment padding which could cause GL
errors related to overrunning the size of the pbo.
2015-01-17 10:56:20 +11:00
Matthew Waters
8fef381417
glmemory: remove spurious gst_video_info_align
...
That will be taken care of by the calling code (typically a bufferpool).
The GstVideoAlignment is purely informational to compute plane data sizes.
2015-01-15 09:50:02 +11:00
Matthew Waters
d5c3693791
gl: split glcolorconvert usage from glupload
...
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2015-01-14 22:22:13 +11:00
Matthew Waters
4ccf45823e
glmemory: offset the data pointer for upload for GstVideoAlignment
...
otherwise we attempt to read from the padding data
2015-01-14 22:22:13 +11:00
Matthew Waters
d1e923765b
glmemory: use pbo's for upload
2015-01-14 22:22:13 +11:00
Matthew Waters
8c2d5dac72
glupload: relax the GLMemory uploader check for input caps features
...
As there may be a sysmem caps features with GLMemory filled buffers.
e.g.
videotestsrc ! glimagesink
2015-01-14 22:22:13 +11:00
Nicola Murino
442451a30d
glcolorconvert: fix memleak
...
https://bugzilla.gnome.org/show_bug.cgi?id=741943
2015-01-13 15:20:34 +11:00
Nicola Murino
3c6d775766
glupload: fix some memory leaks
...
https://bugzilla.gnome.org/show_bug.cgi?id=741943
2015-01-13 15:19:39 +11:00
Matthew Waters
4c73e20553
glcontext: allow wrapped contexts to be utilised like non-wrapped contexts
...
Fill in the missing pieces like get_proc_address, the gl function vtable
2015-01-13 15:18:41 +11:00
Sebastian Dröge
fa5c433e7e
gl/cocoa: Disable hack for NSApp iteration with a special #define
...
The hack causes deadlocks and other interesting problems and it really
can only be fixed properly inside GLib. We will include a patch for
GLib in our builds for now that handles this, and hopefully at some
point GLib will also merge a proper solution.
A proper solution would first require to refactor the polling in
GMainContext to only provide a single fd, e.g. via epoll/kqueue
or a thread like the one added by our patch. Then this single
fd could be retrieved from the GMainContext and directly integrated
into a NSRunLoop.
https://bugzilla.gnome.org/show_bug.cgi?id=741450
https://bugzilla.gnome.org/show_bug.cgi?id=704374
2015-01-10 15:54:30 +01:00
Sebastian Dröge
1b2de14000
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.
2015-01-08 09:36:24 +01:00
Luis de Bethencourt
75cc750efc
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
2015-01-07 16:53:41 +00:00
Nicolas Dufresne
207308446b
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
2014-12-19 12:25:41 -05:00
Nicolas Dufresne
170a49f901
glmemory: No need for padding
...
A memory object cannot be put on stack, so no need for padding.
2014-12-19 12:12:08 -05:00
Nicolas Dufresne
9954de1ccd
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
2014-12-19 12:11:08 -05:00
Nicolas Dufresne
da3ae06cd1
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
2014-12-19 11:45:35 -05:00
Nicolas Dufresne
4f3c33af3a
glmemory: Handle custom stride with OPENGL3
...
https://bugzilla.gnome.org/show_bug.cgi?id=740900
2014-12-19 11:45:35 -05:00
Wang Xin-yu (王昕宇)
15eab1ed01
glfilter: fix position/texcoord attrib index usage
...
https://bugzilla.gnome.org/show_bug.cgi?id=741231
2014-12-11 19:41:23 +11:00
Matthew Waters
f021549294
gl: fixup vao and vbo usage for legacy GL
2014-12-11 19:41:23 +11:00
Philippe Normand
c4ba73e39b
glsyncmeta: add G_END_DECLS
2014-12-04 01:36:38 +11:00
Julien Isorce
230022fe62
glcontext: try cgl before glx
...
It was already done by commit
f506e80686
but it has been broken by commit
45ec777cea
2014-12-03 08:02:58 +00:00
Matthew Waters
90a2477b9e
glcontext: require GL_ARB_ES2_compatibility for opengl3
...
until we generate gl3 compliant shaders
https://bugzilla.gnome.org/show_bug.cgi?id=740012
2014-11-30 00:44:46 +11:00
Matthew Waters
e653ae9fc2
gl: fixup compat definition for GLuint64 for OS X
2014-11-28 13:04:21 +11:00
Matthew Waters
b0faa2dd77
gl: add compat definition for GLuint64 for android
...
../../../../gst-libs/gst/gl/glprototypes/sync.h:41:23: error: unknown type name 'GLuint64'
GLuint64 timeout))
2014-11-28 11:57:25 +11:00
Matthew Waters
3e92a8ef53
glsync: fix build with desktop gl
2014-11-28 11:11:43 +11:00
Matthew Waters
57898fec2a
gl: fix various build errors without desktop gl
2014-11-28 10:59:46 +11:00
Matthew Waters
f67190d3ca
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));
2014-11-28 10:03:18 +11:00
Matthew Waters
3c1e77eb31
gldisplay: implement runtime GL api filtering
...
Needed so that the pipeline/application can limit the choice of GL api
to what it supports
2014-11-28 09:14:26 +11:00
Matthew Waters
6bd1150ca8
gl: remove the use of glu
2014-11-28 09:14:26 +11:00
Matthew Waters
f2af65ee2d
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.
2014-11-28 09:14:25 +11:00
Matthew Waters
480d3f97eb
glprototypes: add sync function definitions
2014-11-28 09:14:25 +11:00
Matthew Waters
6d39e04992
glfilter: add a gl3 code path using vao's and vbo's
2014-11-28 09:14:25 +11:00
Matthew Waters
5ff5f8c1ee
glframebuffer: add support for gl3
2014-11-28 09:14:25 +11:00
Matthew Waters
a32f29f2ce
glcolorconvert: add support for gl3
2014-11-28 09:14:25 +11:00
Matthew Waters
fca0bc97a4
glshader add support for gl3
2014-11-28 09:14:25 +11:00
Matthew Waters
2c24b97cf0
glx: ask for a GL3 core context
2014-11-28 09:14:25 +11:00
Sebastian Dröge
082c12b8e2
glcolorconvert: Unref buffer with the correct function
2014-11-27 18:09:58 +01:00
Sebastian Dröge
b6ba579fa0
glmemory: Handle failure of memory allocation gracefully
2014-11-27 18:09:14 +01:00
Sebastian Dröge
f2dc9b2b8f
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.
2014-11-27 18:06:26 +01:00
Wang Xin-yu (王昕宇)
15c0d5c21b
glcolorconvert: support RGB16/BGR16 video format download
...
https://bugzilla.gnome.org/show_bug.cgi?id=740801
2014-11-27 10:08:11 +01:00
Matthew Waters
2d97e03c54
gl/wayland: implement resizing the window using the right mouse button
2014-11-27 13:03:21 +11:00
Matthew Waters
1d7c4f4344
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
2014-11-27 01:32:21 +11:00
Ramprakash Jelari
aea08e86a5
glcontext: Fix unused variable warning by moving declaration where it is actually used
2014-11-24 14:16:58 +01:00
Sebastian Dröge
0f753b7099
glupload: Fix valid compiler warning
...
gstglupload.c:442:32: error: if statement has empty body [-Werror,-Wempty-body]
if (upload->texture_ids[i]);
^
2014-11-24 11:32:33 +01:00
Philippe Normand
c08a461fa4
gl: ship the gstglcontext_egl.h header
...
It is required by gsteglimagememory.h.
https://bugzilla.gnome.org/show_bug.cgi?id=740611
2014-11-24 21:24:27 +11:00
Tim-Philipp Müller
1a613c5d4e
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.
2014-11-24 10:02:33 +00:00
Matthew Waters
59085936b8
glshadervariables: also trim \r as well as \n
2014-11-24 02:52:24 +11:00
Matthew Waters
810d38c29f
glupload: rearchitecture for non GLMemory inputs/outputs
...
Allows other memory types to be implemented/returned/used by the caller.
2014-11-23 17:13:36 +11:00
Vineeth T M
aafc0d509c
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
2014-11-17 22:39:07 +11:00
Matthew Waters
4afad4ecd3
glfilter: add read-only context property
2014-11-17 18:50:28 +11:00