Commit graph

176 commits

Author SHA1 Message Date
Sebastian Dröge
8070b4e043 glimagesink: Check if context creation failed before trying to use it
Otherwise we will cause assertions everywhere by passing NULL to functions
and eventually crash when dereferencing a NULL pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=730069
2014-05-19 12:25:51 +02: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
a27589629d gl: advertise GstGLMemory usage in the caps as capsfeatures
https://bugzilla.gnome.org/show_bug.cgi?id=729658
2014-05-07 21:48:57 +10:00
Matthew Waters
6f4fd70867 gl/sink: make sure we always initialize the upload object
https://bugzilla.gnome.org/show_bug.cgi?id=729542
2014-05-07 09:12:23 +10:00
Matthew Waters
dfc6745143 gl: use the bufferpool's upload when available
Avoids duplicating GL resources

https://bugzilla.gnome.org/show_bug.cgi?id=728872
2014-05-02 15:59:28 +10:00
Julien Isorce
a20f17e29c glimagesink: use new helper function to avoid duplicating default shader text 2014-04-30 15:35:49 +01:00
Julien Isorce
3db1e3e1ed gl: fails glimagesink when shader compilation went wrong
Those shaders are fixed and very simple so it should not fail
but it's worth to handle a such case.
2014-04-24 16:57:01 +01:00
Julien Isorce
673b813ab3 gl: call glClearColor before glClear 2014-04-24 16:57:01 +01:00
Sebastian Dröge
e50f264411 glimagesink: Use the pixel-aspect-ratio adjusted width/height when centering the frame in the display area
Makes sure we actually keep the display aspect ratio
2014-04-23 11:10:28 +02:00
Sebastian Dröge
ebab5b0a43 glimagesink: By default keep the display aspect ratio
Also the default for the pixel-aspect-ratio should be 1/1, not 0/1.
2014-04-23 10:58:12 +02:00
Sebastian Dröge
89d2bb75d6 glimagesink: Call gst_object_unref() on the GstGL GObjects again
While they're plain GObjects it does not hurt to call gst_object_unref()
on them and potentially allows to debug reference leaks a bit easier.
2014-04-23 10:24:55 +02:00
Sebastian Dröge
38ebfb2da8 glimagesink: If creating a context or upload failed, destroy it
Fixes deadlocks in error cases when later code assumes the broken
context is actually usable.

https://bugzilla.gnome.org/show_bug.cgi?id=728761
2014-04-23 10:00:48 +02:00
Vincent Penquerc'h
467d9267a2 gl: a couple spelling/grammar fixes 2014-04-21 13:23:46 +01:00
Vincent Penquerc'h
7a3e141204 gl: guard against using a NULL window pointer
Coverity 1195145
2014-04-21 13:23:46 +01:00
Matthew Waters
364b01aca9 glimagesink: remove unused texture 2014-04-13 22:16:45 +10:00
Matthew Waters
d4a72b61c0 glimagesink: move upload into _prepare() 2014-04-13 22:14:52 +10:00
Sebastian Dröge
0bd53c9ccb glimagesink: First handle GL window setup, then create the context and its thread 2014-04-12 17:01:09 +02: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
Sebastian Dröge
82b7c915bb glimagesink: Create GL context and set up window from the streaming thread
gst_gl_context_create() might need to dispatch some operations to the
application's main thread, and calling this in the change_state function
can cause deadlocks.
2014-04-07 11:21:07 +02:00
Matthew Waters
e01e2cce9f gl: pass video info's by reference 2014-04-02 23:05:47 +11:00
Matthew Waters
e58cd96b96 gl: avoid adding a NULL pool to propose allocation 2014-04-02 22:42:50 +11:00
Julien Isorce
75c92dc915 gl: only set CAPS_FEATURE_MEMORY_EGL_IMAGE on egl platform 2014-03-27 07:07:01 +00:00
Julien Isorce
218244a040 gl: let the user includes itself our egl headers if needed
Forgot to address this change.

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 19:17:03 +00:00
Julien Isorce
0ae3c984aa gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 19:09:13 +00:00
Matthew Waters
4bdf5f336a move gl elements to ext subdirectory 2014-03-16 11:23:16 +01:00
Renamed from gst/gl/gstglimagesink.c (Browse further)