Commit graph

1147 commits

Author SHA1 Message Date
Lubosz Sarnecki
6eaeefc6a9 glupload: Detect overlay meta buffers correctly
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:12 -04:00
Lubosz Sarnecki
a7d1b7fcad glimagesinkbin: Add GstVideoOverlayCompositionMeta caps features
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:12 -04:00
Lubosz Sarnecki
b2601a7b43 gloverlaycompositor: Add GstGLOverlayCompositor class
Manages the GstGLCompositionOverlay objects,
caches already uploaded overlays and draws them.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:11 -04:00
Lubosz Sarnecki
b4a4999bb2 glcompositionoverlay: Add compatibility for GL contexts without glGenVertexArrays
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:11 -04:00
Lubosz Sarnecki
7c7f84c603 glcompositionoverlay: Add class for managing GstVideoOverlayCompositionOverlay buffers
Add a class to store and manage the OpenGL texture,
vertex buffer and GstVideoOverlayRectangle.
Transforms overlay coordinate space to vertex buffer space with aspect ratios in mind.

= Example Pipelines =

Simple pipeline

gst-launch-1.0 videotestsrc ! \
  textoverlay text="Hello World" font-desc="sans bold 30" ! \
  glimagesink

Display 3 static overlays at different positions

gst-launch-1.0 videotestsrc ! \
  textoverlay text="text1" valignment="top" font-desc="sans bold 30" ! \
  textoverlay text="text2" halignment="right" font-desc="sans bold 30" ! \
  textoverlay text="text3" halignment="left" font-desc="sans bold 30" ! \
  glimagesink

Display subtitle file over testsrc

gst-launch-1.0 videotestsrc ! \
  textoverlay name=foo filesrc location=foo.srt ! subparse ! queue ! foo. foo. ! \
  glimagesink

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:11 -04:00
Lubosz Sarnecki
60c8b73cf5 glupload: Move debug init to top of the file
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:06:29 -04:00
Matthew Waters
d13201fedb glmemory: check for pbo availability before attempting pbo download
https://bugzilla.gnome.org/show_bug.cgi?id=751165
2015-07-20 18:19:02 +10:00
Matthew Waters
d5996de5d7 glcontext: fix get_current_gl_api on x11/nvidia drivers
They require to get_proc_address some functions through the
platform specific {glX,egl}GetProcAddress rather than the default
GL library symbol lookup.
2015-07-18 18:18:22 +10:00
Matthew Waters
74711c214d glcontext: consolidate get_proc_address function definition
Pass the GstGLAPI directly.
2015-07-18 17:10:04 +10:00
Matthew Waters
e96431e9b1 glcontext/glx: try creating a context with the highest version
nvidia drivers return the exact version in glGstString (GL_VERSION)
we request on creation so start with the highest known version and
work our way down.
2015-07-18 16:31:43 +10:00
Matthew Waters
be9ad5eeb2 glcontext: track sharedness with a cookie
The previous approach of traversing the other_context weak ref tree was
1. Less performant
2. Incorrect for context destruction removing a link in the tree

Example of 2:
c1 = context_create (NULL)
c2 = context_create (c1)
c3 = context_create (c2)
context_can_share (c1, c3) == TRUE
context_destroy (c2)
unref (c2)
context_can_share (c1, c3) returns FALSE when it should be TRUE!

This does not remove the restriction that context sharedness can only
be tracked between GstGLContext's.
2015-07-18 15:34:55 +10:00
Matthew Waters
b679cc2238 glcontext: use the debug object variant for completeness 2015-07-18 15:34:55 +10:00
Matthew Waters
82c0189b28 glupload: memcpy on raw data upload
Anything else requires keeping track of the GstVideoFrame mapping
across possible multiple buffers to ensure correct data pointer
usage.
2015-07-14 17:49:17 +10:00
Matthew Waters
19f2b3b882 glbasebuffer: add some debug and zero the data pointers on init 2015-07-14 17:47:29 +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
Matthew Waters
d5a39896dc download: only start a download transfer for sysmem caps features 2015-07-07 22:38:08 +10:00
Hyunjun Ko
ba18bc5398 glsyncmeta: transform func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 13:39:08 +03:00
Matthew Waters
7f44ee0514 android: add missing egl.h include 2015-07-07 16:39:09 +10:00
Matthew Waters
26df88cd24 gl: consolidate egl header includes to egl-only headers
They may conflict with other headers.
2015-07-07 13:12:49 +10:00
Julien Isorce
f037b28a7b gl: initialize output params to 0 before calling gl functions
The client side API of the Chromium's GPU Process has asserts
in debug mode that check that output params are initialized to 0.
2015-07-02 15:16:56 +01:00
Nicolas Dufresne
fe283a9aeb gl: Don't leak pool if set_config failed 2015-07-02 09:40:05 -04:00
Nicolas Dufresne
38abd7f019 glfilter: Don't cache buffer pool
Caching and sharing to multiple element the same pool prevents
renegotiation from passthrough to not passthrough.
2015-07-02 09:40:05 -04:00
Sebastian Dröge
cb01fbfc27 Revert "gl/window/x11: don't create our own X11 display"
This reverts commit 5697b6b89b.

https://bugzilla.gnome.org/show_bug.cgi?id=751003
2015-06-23 16:46:39 +02: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
John Ludwig
1ece34af2c gl: Include texParameterf in the GL function table
https://bugzilla.gnome.org/show_bug.cgi?id=751228
2015-06-23 10:31:44 +02:00
Julien Isorce
2d62f1c479 glmemory: fix consistency about pbo availability.
https://bugzilla.gnome.org/show_bug.cgi?id=751165
2015-06-22 15:12:11 +01:00
Julien Isorce
66d833fcf2 gldisplay: add gst_gl_display_create_context
It also emits a create-context signal so that an application
can provide an external GstGLContext backend.

https://bugzilla.gnome.org/show_bug.cgi?id=750310
2015-06-19 13:10:30 +01:00
Julien Isorce
b0995fcca0 glcontext: move display from priv
https://bugzilla.gnome.org/show_bug.cgi?id=750310
2015-06-19 13:09:53 +01:00
Julien Isorce
5c23b98e27 Revert "glcontext: add gst_gl_context_set_display helper"
This reverts commit 71b8103cbd.
2015-06-19 13:09:46 +01:00
Julien Isorce
5b003b68ca Revert "gl: add GstGLContextGPUProcess backend"
This reverts commit b377112ee3.
2015-06-19 13:08:49 +01:00
Nicolas Dufresne
ca950fef14 glviewconvert: Fix GLES2 compatibility 2015-06-18 18:09:55 -04:00
Nicolas Dufresne
0e1303a294 glviewconvert: Fix broken validity check 2015-06-18 18:02:21 -04:00
Jan Schmidt
1aa3911d40 gl libs: Add glviewconvert helper object
Add API for a helper object that can convert between different
stereoscopic video representations, and later do filtering
of multiple view streams.

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-19 01:49:32 +10:00
Matthew Waters
c3a47c910d glmemory: separate pbo transfer from texture transfers
When supported, the potentially longer pbo upload/download can be
initiated before the texture upload/download, potentially increasing
throughput.
2015-06-12 16:59:20 +10:00
Matthew Waters
7d8d1f8206 glmemory: implement on top of glbasebuffer
Provides convenient access to PBO usage.

Currently texture updates are coupled tightly to data transfers.
2015-06-12 16:59:20 +10:00
Matthew Waters
6e88b07cc5 gl: new glbasebuffer GstMemory object
Provides generic handling of GL buffer objects accessible using
the GL bind points (GL_ARRAY_BUFFER, GL_PIXEL_*_BUFFER).

Implementation based off the current GstGLMemory.
2015-06-12 16:59:20 +10:00
Matthew Waters
2741093c97 gl/prototypes: add some buffer function prototypes 2015-06-12 16:09:49 +10:00
Matthew Waters
ea4867dfa7 gl/window/x11: only listen on the X Display when needed
5697b6b89b causes us to possibly listen
on a toolkit provided Display connection.  We thus could eat their
precious winsys events.  Only listen if we need to
(!foreign_display or videooverlay).
2015-06-12 13:14:57 +10:00
Jan Schmidt
e2ce1eff36 gl: Add support for multiple views in upload, colour convert and download
Support multiple attached views on input/output buffers
by processing each one, not just the first.
2015-06-12 00:39:15 +10:00
Matthew Waters
5697b6b89b gl/window/x11: don't create our own X11 display
It's not needed anymore with most window operations occuring in the
GL thread.
2015-06-12 00:34:58 +10:00
Matthew Waters
e2adfb8bf2 gl/window/x11: handle_events() may be called before the window has been created
Fixes an XIO fatal error
2015-06-12 00:34:58 +10:00
Sebastian Dröge
e7ca427ddb gl: OES_vertex_array_object is improperly implemented on PowerVR SGX 544MP
https://bugzilla.gnome.org/show_bug.cgi?id=750185
2015-06-10 13:31:16 +02:00
Thiago Santos
045bfa10fe Fix a common typo: retreive -> retrieve
Seems to have been copy pasted around a few places
2015-06-05 09:43:35 -03:00
Philippe Normand
53a149f5d4 gl/dispmanx: Fix build 2015-06-04 09:42:01 +02:00
Matthew Waters
050e12c62a gl/window/dispmanx: fix compiler warning 2015-06-04 15:01:16 +10: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
Julien Isorce
b7808270ca glwindow_cocoa: use parent default implementation
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=750337
2015-06-03 21:24:59 +01:00
Jan Schmidt
840f63896f glsyncmeta: Set new sync point when copying
Set a new sync point when copying instead of
transferring the (non-refcounted) GL sync object
from the source meta.

https://bugzilla.gnome.org/show_bug.cgi?id=750279
2015-06-03 00:50:29 +10:00
Jan Schmidt
0ce8d77e54 glsyncmeta: Add some debug output 2015-06-03 00:50:28 +10:00