Commit graph

34 commits

Author SHA1 Message Date
Matthew Waters
0b7f65bbc3 glupload: provide the sink template caps that could be used
https://bugzilla.gnome.org/show_bug.cgi?id=746399
2015-04-28 20:13:48 +10: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
d5c3693791 gl: split glcolorconvert usage from glupload
the separation allows the transfer operation to occur in a separate
thread/time which may increase performance in specific circumstances.
2015-01-14 22:22:13 +11:00
Matthew Waters
810d38c29f glupload: rearchitecture for non GLMemory inputs/outputs
Allows other memory types to be implemented/returned/used by the caller.
2014-11-23 17:13:36 +11:00
Matthew Waters
5b8d7a443e glupload: provide the output buffer that is rendered into
Allows callers to properly reference count the buffers used for
rendering.

Fixes a redraw race in glimagesink where the previous buffer
(the one used for redraw operations) is freed as soon as the next
buffer is uploaded.

1. glimagesink uploads in _prepare() to texture n
1.1 glupload holds buffer n
2. glimagesink _render()s texture n
3. glimagesink uploads texture n+1
3.1 glupload free previous buffer which deletes texture n
3.2 glupload holds buffer n+1
4. glwindow resize/expose
5. glimagesink redraws with texture n

The race is that the buffer n (the one used for redrawing) is freed as soon as
the buffer n+1 arrives.  There could be any amount of time and number of
redraws between this event and when buffer n+1 is actually rendered and thus
replaces buffer n as the redraw source.

https://bugzilla.gnome.org/show_bug.cgi?id=736740
2014-09-21 21:36:49 +10:00
Matthew Waters
aa102d2660 gl/upload: use GstObject's lock instead of our own 2014-05-29 16:30:13 +10:00
Matthew Waters
f7f92e6d7a gl/colorconvert: allocate output buffers
Allows the nop optimisation by simply reffing the input buffer.
2014-05-29 16:30:13 +10:00
Matthew Waters
21b6ca75c3 gl/upload: fix incorrect type in macros 2014-05-28 14:43:43 +10:00
Matthew Waters
6ce3b82efe gl/upload: add GstGLUploadMeta object
That simply deals with the provider aspect of GstVideoGLTextureUploadMeta.
2014-05-28 14:41:35 +10:00
Matthew Waters
c247be334a gl: make all GObjects inherit from GstObject
Aids memory leak debugging with GST_TRACE=mem-live
2014-05-08 15:33:43 +10:00
Matthew Waters
a49a371710 gl/upload: implement lazy init
Rename init_format to set_format
2014-05-08 15:33:43 +10:00
Matthew Waters
5405273b0a gl/upload: add get_format method
Simply retreives the format set by init_format
2014-05-08 14:03:57 +10:00
Matthew Waters
15d0c04933 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2014-04-11 10:37:06 +10:00
Matthew Waters
95abfda139 gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
2014-04-11 10:37:05 +10:00
Matthew Waters
e01e2cce9f gl: pass video info's by reference 2014-04-02 23:05:47 +11:00
Matthew Waters
4386cc1c6b [873/906] upload: use GstVideoInfo for choosing the format 2014-03-15 18:37:05 +01:00
Wang Xin-yu (王昕宇)
30b9bfbf55 [867/906] glupload: Add GRAY8/GRAY16LE/BE upload support to glimagesink
the 16bit data is uploaded as LUMINANCE_ALPHA, then expanded, composed
in shader. value weight is a little complicate, high byte weight is
255*256/65535 (denormalize to [0~255] ,shift to high byte,then normalize
to [0~1]), low byte weight is 255/65535(similar)

https://bugzilla.gnome.org/show_bug.cgi?id=722670
2014-03-15 18:37:05 +01:00
Matthew Waters
83d27b9bc2 [866/906] upload: update some docs 2014-03-15 18:37:05 +01:00
Matthew Waters
f798d9c9b7 [855/906] upload: add support for GstVideoGLTextureUploadMeta 2014-03-15 18:37:04 +01:00
Matthew Waters
9b22b0e0ba [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2014-03-15 18:37:02 +01:00
Matthew Waters
01a4472b7f [778/906] upload: remove _thread variants of the API 2014-03-15 18:37:00 +01:00
Matthew Waters
a4445ea016 [777/906] upload: overhaul and addition of new video formats
use the shaders from eglglessink (adapted for Desktop GL)
error out properly
2014-03-15 18:37:00 +01:00
Sebastian Dröge
60aefacd32 [750/906] glupload: Add support for RGB reordering when using GLES2 2014-03-15 18:36:58 +01:00
Sebastian Dröge
a5a46aa833 [733/906] gl: Major header and include cleanup 2014-03-15 18:36:57 +01:00
Julien Isorce
dd7e054e2c [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2014-03-15 18:36:57 +01:00
Matthew Waters
96114e62cb [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2014-03-15 18:36:55 +01:00
Matthew Waters
fa3c3b8434 [642/906] add gstglconfig.h for apps to find out what our capabilites are
ie libgstgl can be compiled with any combination of opengl/gles2
2014-03-15 18:36:52 +01:00
Matthew Waters
cc8e54541b [624/906] OPENGL_ES2 => HAVE_GLES2 and add HAVE_OPENGL
use GstGLAPI to determine which code paths to execute.
perform some cleanups
2014-03-15 18:36:51 +01:00
Matthew Waters
93f7e993ad [603/906] update FSF address 2014-03-15 18:36:50 +01:00
Matthew Waters
12bf1cfa27 [600/906] docs: add docs for new objects and expand on some existing ones 2014-03-15 18:36:49 +01:00
Matthew Waters
4716682c55 [590/906] up/download: fix scaling on transfer
i.e. uploading from a 10x10 video frame to a 20x20 texture into another 30x30 videoframe
2014-03-15 18:36:49 +01:00
Matthew Waters
5aa048e53b [578/906] {up,down}load: add variants that can be called in the gl thread 2014-03-15 18:36:48 +01:00
Matthew Waters
8f4c270ae1 [576/906] remove uneeded GstGLMeta (use GstVideoMeta) 2014-03-15 18:36:48 +01:00
Matthew Waters
88cb7e3060 [573/906] add upload and download library objects
allows multiple upload pipelines that previously wasn't possible
 (i.e. upload RGB and I420 and ... on the same GstGLDisplay)
2014-03-15 18:36:48 +01:00