Commit graph

149 commits

Author SHA1 Message Date
Matthew Waters
0602539f1b glimagesink: wait on the provided sync meta provided to glimagesink 2015-11-10 15:42:35 +11:00
Matthew Waters
e61d504556 glmemory: add support for rectangle textures
Add the various tokens/strings for the differnet texture types (2D, rect, oes)

Changes the GLmemory api to include the GstGLTextureTarget in all relevant
functions.

Update the relevant caps/templates for 2D only textures.
2015-10-30 14:24:53 +11:00
Matthew Waters
70be81ad92 glimagesink: create a context in NULL_READY
So that it's possible for decoders et al. to request the OpenGL context
in their READY_PAUSED transition with decodebin/playbin.
2015-10-21 04:28:59 +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
b25807c382 glshader: port to using GstGLSLStage objects for string management
A GstGLShader is now simply a collection of stages that are
compiled and linked together into a program.  The uniform/attribute
interface has remained the same.
2015-10-15 21:27:57 +11:00
Matthew Waters
609977a56b gl: chain up to the parent class for GstElement::set_context
https://bugzilla.gnome.org/show_bug.cgi?id=705579
2015-09-28 22:24:04 +10:00
Matthew Waters
2195dad288 gl: sprinkle some debug markers to ease debugging 2015-09-28 16:47:00 +10:00
Matthew Waters
557ca6fda5 glimagesink: request a resize on caps/3d mode changes
Fixes incorrect aspect ratio on OSX when changing caps or the 3d
output mode.

https://bugzilla.gnome.org/show_bug.cgi?id=755111
2015-09-17 20:26:23 +10:00
Matthew Waters
7ae0dd2361 glimagesink: avoid updating the viewport in the draw loop
Fixes flashes/incorrect aspect ratio when resizing glimagesink on OSX.
2015-09-16 18:04:51 +10:00
Nicolas Dufresne
88d7b22d40 glimagesink: update display size before sending event
This is minor issue, as the reconfigure event is asynchronous.
Basically, update width/height before sending the event.
2015-08-22 22:15:36 -07:00
Nicolas Dufresne
f935b2c547 glsink: Enable sync meta on pools we offer
As the upload is asynchronous, we need to enable the sync meta to
gain correct rendering. The buffer pool receiver don't know about
that.
2015-08-15 15:55:08 +02:00
Nicolas Dufresne
ea484fb968 glimagesink: Move overlay rendering after video rendering
This is mostly cosmetic, but heoretically it reduces the amount of
required object in the context at one point. It also avoids potential
conflicts.
2015-08-15 15:55:08 +02:00
Matthew Waters
b38f107bd3 glimagesink: take into account non 1/1 par for navigation
The current code was ignoring the par/dar aspect when transforming
from window coordinates to stream coordinates resulting in incorrect
coordinates being sent upstream in the navigation events.
2015-08-12 00:25:35 +02:00
Tim-Philipp Müller
2992ff98e5 glimagesink: fix allocation meta structure leak
gst_query_add_allocation_meta() does not take ownership
of the structure, for some reason.

CID 1312135
2015-07-23 11:23:41 +01:00
Nicolas Dufresne
17788157a1 composition-overlay: Positions are relative to texture
The coordinate are relative to the texture dimension and not
the window dimension now. There is no need to pass the window
dimension or to update the overlay if the dimension changes.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 13:17:18 -04:00
Lubosz Sarnecki
b155f5d73e gloverlaycompositor: Create own shader object
Make gloverlaycompositor independent of the shader used in the sink.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 13:16:39 -04:00
Nicolas Dufresne
e8c31619c4 glimagesink: Properly handle compsositor life time
Should be created in READY_TO_PAUSED, not PAUSED_TO_PLAYING.
Should be cleared in PAUSED_TO_READY.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-22 13:07:58 -04:00
Lubosz Sarnecki
2b7542400c glimagesink: Send reconfigure event when window size changes
https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:12 -04:00
Lubosz Sarnecki
2fb862b34f glimagesinkbin: Add allocation query for GstVideoOverlayComposition
Adds an GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE query to glupload
and glimagesink.  Detects the query from the downstream elements, so
it is executed only when downstream supports the overlay API.

This makes pipelines with textoverlay ! glupload ! gldownload ! xvimagesink possible.
Uses allocation meta struct for passing the window size upstream.

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
778ad10518 glimagesink: Upload and draw overlays with GstGLOverlayCompositor
Receives the GstOverlayComposition buffer in the glimagesink and draws them.

https://bugzilla.gnome.org/show_bug.cgi?id=745107
2015-07-20 14:41:11 -04:00
Vineeth TM
8ec2e0ad62 glimagesink: use g_clear_error instead of g_error_free
replace g_error_free with g_clear_error, as it internally
checks if error variable is valid or not.

https://bugzilla.gnome.org/show_bug.cgi?id=751823
2015-07-02 11:34:10 +01:00
Nicolas Dufresne
11150e3bea glimagesink: Don't leak pool
gst_query_add_allocation_pool is transfer none. Also unref
if there was a configuration error.
2015-06-26 14:59:15 -04: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
5b003b68ca Revert "gl: add GstGLContextGPUProcess backend"
This reverts commit b377112ee3.
2015-06-19 13:08:49 +01:00
Jan Schmidt
b973f9473e glimagesink: Remove duplicate, useless line of code 2015-06-19 14:37:24 +10:00
Jan Schmidt
00d6fe9068 glimagesink: Support multiview/stereoscopic video
Support video with multiview info in the caps, transform
it to mono anaglyph by default, but allow for configuring
other output modes and handoff to the app via
the draw signal.

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-19 01:49:33 +10:00
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