Commit graph

229 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
d925e7fd19 glupload: move meta-data copy into gst-gl library
In some upload implementations the out buffer has more than one references,
turning the buffer not writable, so it won't be possible to modify its
meta-data.

This patch moves the meta-data copy before increasing the reference of the out
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=746173
2015-03-14 19:53:02 +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
0c8ede8565 glupload/colorconvert: only copy timestamps if the input buffer != output 2015-03-14 10:39:06 +00:00
Matthew Waters
a29a18cc3a glshader: attribute locations are -1 on error 2015-03-13 17:41:17 +00:00
Jan Schmidt
450dc5f697 GL: Remove annoying printf in the filterbin class_init 2015-03-14 02:54:18 +11: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
067d5c45d2 gluploadelement: properly unref buffers that are the same as the input
basetransform doesn't unref equal input and output buffers
2015-03-13 12:30:20 +00:00
Matthew Waters
34485c9976 gl: get the context from basemixer/basefilter 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
dbe8ae4d98 caopengllayersink: implement as a bin like glimagesink 2015-03-12 16:45:51 +00:00
Matthew Waters
66ccdab09a gl/cocoa: avoid deadlock when creating context on the main thread.
Make window/view creation async so that it is possible to
gst_gl_context_create from the main thread.
2015-03-12 16:45:51 +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
5495397c81 gltestsrc: remove usage of gldownload library object 2015-03-12 16:45:51 +00:00
Matthew Waters
776d190f59 gl: new glsrcbin element 2015-03-12 16:45:51 +00:00
Matthew Waters
0fb56738a1 glvideomixer: implement with glmixerbin
The relevant properties are forwarded to/from the containing bin
and sink pads.
2015-03-12 16:45:51 +00:00
Matthew Waters
d5a692bdb0 glmixer: remove usage of upload/download objects 2015-03-12 16:45:51 +00:00
Matthew Waters
9e605fca6c gl: new glmixerbin element 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
Matthew Waters
b0600aca97 gl: new glsinkbin element
similar to glfilterbin but for sinks
2015-03-12 16:45:50 +00:00
Matthew Waters
7fe908bc02 gl: new element glfilterbin
It encapsulates a confiurable GL processing element in the
upload/colorconvert/download dance required to transparently process
the majority of GstBuffer's.
2015-03-12 16:45:50 +00:00
Matthew Waters
a7cbc04aba gl: add new gldownloadelement
Simply transforms caps to/from raw/glmemory capsfeatures
2015-03-12 16:45:50 +00:00
Matthew Waters
3514600bf3 gl: add a new glcolorconvert element based on the glcolorconvert library object 2015-03-12 16:45:50 +00:00
Matthew Waters
efaca13d11 gl: add a new glupload element based on the glupload library object 2015-03-12 16:45:50 +00:00
Matthew Waters
45d85a0570 gl: add a new glbasemixer class below glmixer
It deals with propagating the gl display/contexts throughout the
application/pipeline
2015-03-12 16:45:50 +00:00
Nicolas Dufresne
2d5d2eabef glmixer: Don't share our downstream pool with upstream
Pool cannot have multiple owner. This can lead to spurious
pool was flushing error.

https://bugzilla.gnome.org/show_bug.cgi?id=74570
2015-03-06 20:12:09 -05: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
Nicolas Dufresne
eff94f929d gloverlay: Fix upside down and miss-aligned JPEG
LibJPEG uses macroblock of 8x8 sample. In this element we use RGB and
Y444, two 24bit formats that are stored in 32bit pixels. This mean we
have 32x32 bytes macroblocks. For this reason, we need to allocate
our buffer slightly larger. We also need to pass the line pointer in
the right order, otherwise the image endup upside-down.

https://bugzilla.gnome.org/show_bug.cgi?id=745109
2015-03-03 15:26:13 -05:00
Xavier Claessens
128c2a141a gltransformation: normalize translations
https://bugzilla.gnome.org/show_bug.cgi?id=744763

* Lubosz: use maxfloat for transformation range
2015-03-03 14:05:21 -05:00
Xavier Claessens
80f97eaee7 gltransformation: Fix doc typo
https://bugzilla.gnome.org/show_bug.cgi?id=744763
2015-03-03 14:05:21 -05:00
Nicolas Dufresne
b8f168cd65 glmemory: Add GstAllocationParams and alignment support
This implements support for GstAllocationParams and memory alignments.
The parameters where simply ignored which could lead to crash on
certain platform when used with libav and no luck.

https://bugzilla.gnome.org/show_bug.cgi?id=744246
2015-02-28 14:32:39 -05:00
Nicolas Dufresne
c20c6cfb92 opengl: Clean Makefile.am
+ Split headers from source
+ Remove uneeded AM_CFLAGS, AM_LDFLAGS
+ Always set OBJCFLAGS

Due to the presence of a .m and regardless of the conditional values,
automake will promote the link command to OBJC using OBJCFLAGS. Only
the basic flags (like warnings and optimization) are going to make a
difference though.

This cleanup builds up the makefile with less specific files first
toward more specific file. FLAGS are built with the basic that unused
flags will have empty variable.
2015-02-24 19:01:45 -05:00
Xavier Claessens
e25f4f1a60 glimagesink: cosmetic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=745105
2015-02-24 15:22:34 -05:00
Tim-Philipp Müller
004e910006 opengl: don't add --tag=CC twice to LIBTOOLFLAGS 2015-02-24 19:52:59 +00:00
Nicolas Dufresne
0feaeb38f9 opengl: Add --tag=CC to LIBTOOLCLFAGS
This is required for static build.
2015-02-24 14:35:37 -05:00
Matthew Waters
e3ec517838 caopengllayersink: render black when we don't have a texture to display
Like when the winsys asks us to redraw before the pipeline has started
2015-02-25 00:03:28 +11:00
Matthew Waters
021bfa99a1 new caopengllayersink element
renders gstreamer gl scene/video frames to a caopengllayer retreivable
from the "layer" property.
2015-02-24 19:12:10 +11:00
Julien Isorce
5fa0595046 glmixer: fix some compiler warnings
i686-apple-darwin11-llvm-gcc-4.2

gstglmixer.h:43: error: redefinition of typedef ‘GstGLMixer’
gstglmixerpad.h:32: error: previous declaration of ‘GstGLMixer’ was here
gstglmixer.h:46: error: redefinition of typedef ‘GstGLMixerFrameData’
gstglmixerpad.h:33: error: previous declaration of ‘GstGLMixerFrameData’ was here
2015-02-22 10:34:05 +00:00
Nicolas Dufresne
4ea15b1b3f gltransform: Fix includes of graphene headers
The graphene-1.0 part should not be in the source code. This directory
is part of the cflags include. This is similar to gstreamer-1.0/
directory. This break compilation if the include directory where
graphene is installed is not in your include path.
2015-02-18 17:15:01 -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
c1ad8d776a gl: remove the egl caps from the src pads
we don't actually support producing EGLImage buffers anywhere.
2015-02-03 15:30:08 +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