Matthew Waters
15e13bd44e
glcontext: add public swap_buffers function
...
That simply calls the implementation
2017-05-21 12:12:02 +02:00
Sebastian Dröge
634cd87c76
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-05-17 10:40:23 +03:00
Nicolas Dufresne
4261692187
Remove plugin specific static build option
...
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:05:52 -04:00
Sebastian Dröge
2392ac7446
gl/eagl: It's -fobjc-arc not -fobj-arc
2017-03-08 15:13:45 +02:00
Nick Kallen
46bbc60d24
applemedia/gl: Update code to use ARC
...
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.
https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-03-07 13:37:07 +02:00
Matthew Waters
41a6448918
gl: GST_GL_TYPE -> GST_TYPE_GL
...
Some deprecated symbols are kept for backwards compatibility
2016-11-03 16:16:12 +11:00
Matthew Waters
5592a966c6
Revert "Revert "gl/eagl: try getting a gles3 context""
...
This reverts commit eb14273631
.
vtdec now successfully outputs textures that can be converted by
glcolorconvert in GLES3 contexts.
2016-06-29 18:04:28 +10:00
Matthew Waters
b3b73d39a0
gl/cocoa/eagl: don't leak GThread's when dispatching messages
...
gst_gl_context_get_thread() returns a refed pointer, we need to unref it.
2016-04-13 01:03:20 +10:00
Alessandro Decina
b73d2586ce
libgstgl: cocoa, eagl: use libdispatch to schedule GL calls
...
Use libdispatch instead of GMainLoop to dispatch GL calls. libdispatch is more
optimized and cuts a lot of poll()/pthread_* overhead.
2016-04-11 08:40:03 +10:00
Sebastian Dröge
5f925a1580
Revert "libgstgl: cocoa, eagl: don't marshal GL calls to the context thread"
...
This reverts commit 797d6415df
.
We're frozen for 1.8.0 release and this change might have bigger impact.
2016-03-07 08:54:47 +02:00
Alessandro Decina
797d6415df
libgstgl: cocoa, eagl: don't marshal GL calls to the context thread
...
Execute GL calls without marshalling them to the context thread. In the cocoa
and eagl backends calling gst_gl_context_activate is cheap and therefore calling
it on the current thread and serializing GL calls with a per-context lock is
more efficient (faster and has less overhead) than marshalling everything to the
context thread.
This optimization cuts a large overhead in g_poll (continuously waking up the
context thread) and in g_mutex_*/g_cond_* (waiting for results from the context
thread).
2016-03-07 16:20:17 +11:00
Matthew Waters
eb14273631
Revert "gl/eagl: try getting a gles3 context"
...
This reverts commit 96b9666d59
.
This reverts commit d11385d167
.
This breaks the texture sharing with the applemedia elements as
CVOpenGLESTextureCache seems to have an arbitrary restriction on GLES2 only.
2016-02-02 18:37:44 +11:00
Tim-Philipp Müller
d11385d167
gl: eagl: fix build
...
gstglcontext_eagl.m:238:45: error: too few arguments to function call,
expected at least 4, have 3
2016-02-01 09:26:37 +00:00
Matthew Waters
96b9666d59
gl/eagl: try getting a gles3 context
...
Fallback to a gles2 context if that fails
2016-02-01 14:26:37 +11:00
Matthew Waters
3dfc6899ad
gl: be consistent in gobject boilerpate
...
GST_GL_IS_* vs GST_IS_GL_*
git grep -l 'GST_GL_IS_' | xargs sed -i 's/GST_GL_IS_/GST_IS_GL_/g'
2015-10-19 15:15:30 +11:00
Matthew Waters
b7aed13e71
gl/eagl: use the default GL context debug category
2015-09-29 15:38:38 +10:00
Matthew Waters
27422da056
glwindow: remove unused draw_unlocked function
...
The functionality is provided by draw anyway and is leftover from
X11's specific threading requirements that no longer apply.
2015-09-28 16:44:05 +10:00
Matthew Waters
3addb6bbf4
glwindow: add API to request a resize event on the next draw
...
- glimagesink needs to be able to resize the viewport on aspect ratio
changes resulting from either caps changes or 3d output mode changes.
- Performing a glViewport outside the GstGLWindow::resize callback
will not have the winsys' stack of viewports required to correctly
place the output frame.
Provide a function to request a resize on the next draw event from the
winsys.
Also track size changes inside the base GstGLWindow class rather
than in each subclass.
https://bugzilla.gnome.org/show_bug.cgi?id=755111
2015-09-17 20:26:23 +10:00
Sebastian Dröge
bab55828ae
gl/eagl: Also unbind renderbuffer after setting up framebuffer
...
https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:47 +03:00
Sebastian Dröge
c97144b23b
gl/eagl: Don't make context uncurrent just to make it current again in the next line
...
Also binding the framebuffer again is unnecessary then as it was just bound a
few lines before while the context was current.
https://bugzilla.gnome.org/show_bug.cgi?id=754757
2015-09-09 10:10:46 +03:00
Sebastian Dröge
5c106c0c2a
gl/eagl: Unref context after setting a window handle
...
gst_gl_window_get_context() returns a new reference.
Hopefully fixes https://bugzilla.gnome.org/show_bug.cgi?id=753758
2015-08-25 10:09:14 +03:00
Matthew Waters
3b89d8a23c
glwindow: pass display to implementation's _new()
...
So they have to opportunity to fail if they cannot handle the
display connection.
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:29 +10:00
Matthew Waters
dbcae77e02
glcontext: pass display to implentation's _new()
...
This allows the context to fail creation based on incompatible
display type's. e.g. glx context with an wayland display handle.
https://bugzilla.gnome.org/show_bug.cgi?id=752743
2015-07-27 18:23:17 +10:00
Sebastian Dröge
34622c3961
gl/eagl: Don't call anything synchronously from the main thread
...
This will deadlock if the main thread is the one who creates the GstGLContext.
All things we call from the main thread should be possible from any thread.
https://bugzilla.gnome.org/show_bug.cgi?id=751101
2015-07-08 22:29:27 +10:00
Sebastian Dröge
ad579b73e6
Revert "eagl: Don't dispatch_sync() to the main thread if we are on the main thread"
...
This reverts commit 0bff481011
.
It wasn't supposed to be merged and also doesn't fix the problem.
2015-06-23 14:16:39 +02:00
Sebastian Dröge
0bff481011
eagl: Don't dispatch_sync() to the main thread if we are on the main thread
...
This will otherwise deadlock.
https://bugzilla.gnome.org/show_bug.cgi?id=751101
2015-06-23 11:05:06 +02:00
Matthew Waters
fbbf1ac324
gl/window: use the default main loop implementation for all backends
...
fixes glimagsink being unable to display.
https://bugzilla.gnome.org/show_bug.cgi?id=750337
2015-06-04 12:16:35 +10:00
Alessandro Decina
6981a8d15b
libgstgl: fix rendering on iOS
...
Stop assuming that the handle has been set by the time ->create_context is
called. After bc7a7259f3
set_window_handle always
happens after ->create_context in fact.
See also https://bugzilla.gnome.org/show_bug.cgi?id=745090
2015-04-02 18:29:39 +11:00
Matthew Waters
efe0564f22
gl/window: hopefully fixup compile warnings on android/ios
2015-03-11 14:51:15 +00:00
Matthew Waters
bc7a7259f3
gl/window: create the main loop/context on init/finalize
...
Avoids races setting the window handle from the main thread.
https://bugzilla.gnome.org/show_bug.cgi?id=745633
2015-03-11 13:52:15 +00:00
Alessandro Decina
2a430872ed
libgstgl: eagl: handle CALayer resize
2015-02-24 14:23:49 +11:00
Matthew Waters
27e5e0c2df
gl/window/eagl: fix a couple of typos
2015-01-23 16:52:25 +11:00
Matthew Waters
ab48bb6f0f
glwindow: remove width/height from _draw()
...
Depending on the platform, it was only ever implemented to 1) set a
default surface size, 2) resize based on the video frame or 3) nothing.
Instead, provide a set_preferred_size () that elements/applications
can use to request a certain size which may be ignored for
videooverlay/other cases.
2015-01-23 16:11:31 +11:00
Matthew Waters
81ceca1aea
glcontext: add api for retreiving the current context and api
...
that is current in the calling thread.
2014-10-28 17:33:20 +11:00
Sebastian Dröge
e5d96d052b
gl/eagl: Fix compilation
2014-04-13 19:20:32 +02:00
Sebastian Dröge
d3d1b5a5e2
gl/eagl: Notify the window's resize callback about surface dimension changes
...
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2014-04-13 16:55:26 +02:00
Sebastian Dröge
ef509077db
gl/eagl: Remove spurious private struct pointer
2014-04-13 16:55:26 +02:00
Sebastian Dröge
47f7bf269a
gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions
2014-04-12 22:45:30 +02:00
Sebastian Dröge
ae81268565
gl: Add support for iOS EAGL platform
...
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2014-04-12 22:25:13 +02:00