Commit graph

122 commits

Author SHA1 Message Date
Matthew Waters
890de823e6 glimagesink: add missing handle-events/ignore-alpha property to the bin 2015-06-15 22:44:31 +10:00
Nicolas Dufresne
c72213ff8b glimagesink: Don't do pool caching
We now know that pool caching can cause renegotiation issues
when an element in the pipeline change from passthrough to not
passthrough. As it's not needed, don't cache existing pools.

https://bugzilla.gnome.org/show_bug.cgi?id=748344
2015-06-12 20:14:37 -04:00
Matthew Waters
cd2669fad1 gl: move basesink properties from glimagesinkbin to glsinkbin 2015-06-12 00:34:58 +10:00
Matthew Waters
fac0cdc7ac glwindow: handle gst_video_overlay_set_render_rectangle 2015-05-31 16:04:13 +10:00
Julien Isorce
b377112ee3 gl: add GstGLContextGPUProcess backend
It builds its GL vtable from a proc address provided
by the application.
2015-05-27 17:22:40 +01:00
Matthew Waters
6a2d12bf47 glimagesink: correctly use the sync meta across multiple contexts
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)

Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
2015-05-20 00:36:48 +10:00
Matthew Waters
c6abd1632f glimagesink: free the vertex buffer when done
fixes a memory leak
2015-05-14 21:21:01 +10:00
Matthew Waters
0870e8785e gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Matthew Waters
1f89d1dce2 glimagesink: cleanup properties
remove unused "display-name"
ensure defaults between the bin/element are the same
2015-05-14 15:10:59 +10:00
Matthew Waters
7f7a9dd3ec gl: element buffers are part of vao state
Use them as such.  They are also required for GL3 core profile support
with glDrawElements on OS X.
2015-05-14 14:58:07 +10:00
Matthew Waters
1853e455ac gl: don't deadlock on context creation failure
https://bugzilla.gnome.org/show_bug.cgi?id=749284
2015-05-13 23:56:48 +10:00
Sebastian Dröge
541c3049dc Revert "Revert "glimagesink: add pixel-aspect-ratio property on the bin""
This reverts commit d96e43b034.
2015-05-06 15:47:27 +02:00
Sebastian Dröge
8c28a51ee1 Revert "Revert "glimagesink: forward ALL the properties on the bin""
This reverts commit 59fb0f830f.
2015-05-06 15:47:20 +02:00
Sebastian Dröge
35d5c648c6 Revert "Revert "glimagesink: implement as a bin""
This reverts commit be938f92d9.
2015-05-06 15:47:04 +02:00
Sebastian Dröge
53c79cbf86 Revert "gl: readd glupload/download onto element pads"
This reverts commit 87d8270f30.
2015-05-06 15:46:49 +02:00
Matthew Waters
8ef4b12ab8 glimagesink: handle the local_context query
so that upstream elements can get the GL context from glimagesink
2015-05-04 23:44:17 +10:00
Matthew Waters
87d8270f30 gl: readd glupload/download onto element pads
Allows insertion of gl elements into non-gl pipelines without converter
(upload/download) elements.

https://bugzilla.gnome.org/show_bug.cgi?id=743974
2015-04-30 11:26:33 +10:00
Matthew Waters
be938f92d9 Revert "glimagesink: implement as a bin"
This reverts commit 8a0017e21d.
2015-04-30 11:26:33 +10:00
Matthew Waters
59fb0f830f Revert "glimagesink: forward ALL the properties on the bin"
This reverts commit 4be45e5f30.
2015-04-30 11:26:32 +10:00
Matthew Waters
d96e43b034 Revert "glimagesink: add pixel-aspect-ratio property on the bin"
This reverts commit 2ba6bb9b93.
2015-04-30 11:26:32 +10:00
Jan Schmidt
ff12434b9f glimagesink: Cache caps for passing to the client draw call
Don't convert the GstVideoInfo to caps on every draw call,
just cache the caps and pass them into the GstSample.
2015-04-29 02:52:40 +10:00
Matthieu Bouron
17d3a75583 glimagesink: Use gst_pad_get_pad_template_caps in ::get_caps() 2015-04-28 20:14:07 +10:00
Matthieu Bouron
4ca63b01ab glimagesink: Remove unused stop function 2015-04-27 18:27:48 +10:00
Matthew Waters
05109be4a0 glimagesink: unref the pool in the correct place
Otherwise we could hold a pool to a context that is never going to be used.

https://bugzilla.gnome.org/show_bug.cgi?id=748405
2015-04-27 18:21:01 +10:00
Matthew Waters
bd940327ef gl: unref display/other-context in the correct place
Otherwise state changes from PLAYING->READY->PAUSED will cause there to
to be no display configured on the element.

https://bugzilla.gnome.org/show_bug.cgi?id=748405
2015-04-27 15:20:56 +10:00
Matthew Waters
b216629941 glimagesink: balance change_state display ref/unref
the display was being unreffed on the incorrect state change causing
invalid state when changing from PLAYING/PAUSED->READY->PAUSED/PLAYING.
2015-04-24 17:16:18 +10:00
Matthew Waters
6cb6d8f9e8 gldisplay: synchronize the searching and creation of GstGLContext's
Ootherwise we could end up with multiple elements in different chains
each creating a context.  Fixes context creation with glvideomixer.
2015-04-21 12:55:24 +10:00
Sebastian Dröge
25561db099 glimagesink: Disconnect mouse/key event signal handlers from window when shutting down context 2015-04-06 20:28:22 -07:00
Sebastian Dröge
a72e204eae glimagesink: Guard against disconnecting invalid signal ids 2015-04-06 20:24:06 -07:00
Nicola Murino
0719c8c766 glimagesink: fix caps leak
https://bugzilla.gnome.org/show_bug.cgi?id=746541
2015-03-21 16:52:08 +00:00
Julien Isorce
f8fca66fb9 glimagesink: keep window invisible when sharing output
https://bugzilla.gnome.org/show_bug.cgi?id=739681
2015-03-14 17:56:39 +00:00
Julien Isorce
0150255a46 glimagesink: provide GstSample in client-draw signal
Instead of prividing texture and size directly.
And apply changes to examples.

https://bugzilla.gnome.org/show_bug.cgi?id=739681
2015-03-14 17:56:21 +00:00
Matthew Waters
fa61e8e4ce glsyncmeta: make context to wait and set sync explicit
otherwise we may wait on a sync object in same context by accident
2015-03-14 16:53:46 +00:00
Nicolas Dufresne
ac89e53173 glimagesink: Add NULL check in error case
Other context may be NULL if something went wrong. Avoid trying to unref
a NULL pointer.
2015-03-14 12:58:22 +00:00
Matthew Waters
2ba6bb9b93 glimagesink: add pixel-aspect-ratio property on the bin 2015-03-13 12:43:13 +00:00
Matthew Waters
4be45e5f30 glimagesink: forward ALL the properties on the bin 2015-03-13 12:30:20 +00:00
Matthew Waters
91b7642c48 gl: retreive the gldisplay/app gl context as soon as possible
fixes the usage of gst_gl_display_filter_gl_api
2015-03-13 12:30:20 +00:00
Matthew Waters
ef0bd30c87 gl: store the list of contexts within gldisplay
Removes the reliance on the allocation query to propogate GL contexts.

Allows thread safely getting a context for the a specific thread.
2015-03-12 16:45:51 +00:00
Matthew Waters
2f2470488b glimagesink: unset the current shader after rendering
fixes gltestsrc ! glimagesink when gltestsrc doesn't use a shader
2015-03-12 16:45:51 +00:00
Matthew Waters
8a0017e21d glimagesink: implement as a bin
glupload ! glcolorconvert ! sink

Some properties are manually forwarded.  The rest are available using
GstChildProxy.

The two signals are forwarded as well.
2015-03-12 16:45:50 +00:00
Nicolas Dufresne
fb4d769425 glimagesink: Only cache pool, don't manage it
GLImage does not use any kind of internal pool. There was some
remaining code and comment stating that it was managing the
pool, and it was in fact setting the active state when doing
to ready state.

* Only create the pool if requested and in propose_allocation
* Cache the pool to avoid reallocation on spurious reconfigure
* Don't try to deactivate the pool (we don't own it)

https://bugzilla.gnome.org/show_bug.cgi?id=745705
2015-03-06 19:25:16 -05:00
Sebastian Dröge
b81823e7db gl: Remove format info in glcolorconvert's transform_caps function instead of on every caller
... and let glmixer actually transform the caps it is supposed to transform
instead of inventing new caps.
2015-03-06 18:53:13 +01:00
Xavier Claessens
e25f4f1a60 glimagesink: cosmetic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=745105
2015-02-24 15:22:34 -05:00
Edward Hervey
43464aa204 glimagesink: Fix debug statement 2015-02-12 17:34:10 +01:00
Edward Hervey
638f99a37a glimagesink: Sprinkle more debug 2015-02-12 15:57:55 +01:00
Matthew Waters
4f15cc8d3c glimagesink: log the converted caps 2015-02-05 11:07:19 +11:00
Matthew Waters
e7a10a2d44 glcolorconvert: put GstGLSyncMeta on output buffers
allows thread safely using the provided output buffer in a separate
thread
2015-02-03 14:32:55 +11:00
Matthew Waters
c06715bde6 glupload/download/convert: provide transform_caps functions
Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.
2015-02-03 14:32:55 +11:00
Matthew Waters
c827d1f804 glimagesink: clobber the alpha channel by default
this can be disabled with the ignore-alpha property
2015-01-30 15:54:05 +11:00
Matthew Waters
6cf97eb221 glwindow: make showing a window explicit
Also fixes the cgl context always displaying a window to render to for
every GstGLContextCocoa created
2015-01-29 22:26:37 +11:00