summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl
Commit message (Collapse)AuthorAgeFilesLines
* gl/cocoa: reduce custom main loop latencyJulien Isorce2015-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | This fix a very slow rendering rate regression that only happens when using gst-launch, i.e. in the case where the main thread does not run any NSApp loop. Git bisect reported it has been introduced by the commit e10d2417e2fe7aa4733c076984339b0d61caa169: "move to CGL and CAOpenGLLayer for rendering". Then the commit 7d463576271e5a4cc1070780ba1a69c971e8be1d: "gstglwindow_cocoa: fix slow render rate" attempted to fix the slow rendering rate problem when using gst-launch. At least for me it does not work. I tried several combinations, for example to flush CA transactions in the custom app loop, as mentioned in the doc, but the only solution that fixes the slow rendering is by reducing the loop latency. From what I tested, no need to put less than 60ms, even if the framerate has an interval much lower (16.6ms for 60 fps).
* gstglmemory: Remove now unused transfer_upload function.Mathieu Duponchelle2015-02-211-39/+0
|
* glmemory: disable automatic pbo uploadMatthew Waters2015-02-211-7/+0
| | | | until we can track where the data is/or is going to be.
* glememory: only store and act on the map flags on first/last map/unmapMatthew Waters2015-02-202-4/+9
| | | | | | | | | | Anytime else, we have no idea how to match up map and unmaps. We also don't know exactly how the calling code is using us. Also fixes the case where we're trying to transfer while someone else is accessing our data pointer or texture resulting in mismatched video frames. https://bugzilla.gnome.org/show_bug.cgi?id=744839
* gl/cocoa: don't deadlock if the dispatch_sync is called from the main threadMatthew Waters2015-02-173-51/+70
| | | | | Provide a helper function to check whether we are being called from the main thread and act appropriately.
* gl/calayer: only start drawing if the parent gl context is readyMatthew Waters2015-02-172-0/+19
| | | | otherwise we may try to use GstGLFuncs * that hasn't been set yet
* gl/cocoa: small refactor of layer/view creation into the windowMatthew Waters2015-02-173-40/+17
|
* glwindow: Remove assertion in gst_gl_window_show() for subclasses not ↵Sebastian Dröge2015-02-171-1/+0
| | | | | | | implementing it On Android and iOS we can't create a window ourselves, so also can't just show one. That's not a problem and an assertion is not really needed here.
* gl: Add/Update more debug statementsEdward Hervey2015-02-128-61/+96
| | | | | | | | | Where possible, use the _OBJECT variants in order to track better from which object the debug statement is coming from Define (and use) GST_CAT_DEFAULT where applicable Use GST_PTR_FORMAT where applicable
* gl: Make glcontext debug category used in more placesEdward Hervey2015-02-122-1/+7
| | | | As a bonus it makes the egl context debug messages visible now :)
* libgstgl: set user data and GDestroyNotify for wrapped texturesAlessandro Decina2015-02-091-2/+2
|
* glproto/vao: only supported in core for ES 3.0+Matthew Waters2015-02-061-1/+1
| | | | Was causing horizontally flipped video for frame 2 onward on android
* glfilter: ensure that the input upload/colorconvert are always availableMatthew Waters2015-02-051-39/+58
|
* glupload: restrict EGL and UploadMeta to RGBAMatthew Waters2015-02-051-0/+2
| | | | other formats are highly untested.
* glcolorconvert: don't intersect with the input capsMatthew Waters2015-02-051-7/+4
| | | | that limits our formats to whatever is in the input caps
* gl: fix memory leakLuis de Bethencourt2015-02-041-0/+1
| | | | | | | In gst_gl_filter_fixate_caps () it can goto done without freeing the memory of the tmp GstStructure. This makes it go out of scope and leak. CID #1265765
* gl: remove the egl caps from the src padsMatthew Waters2015-02-031-10/+4
| | | | we don't actually support producing EGLImage buffers anywhere.
* glcolorconvert: put GstGLSyncMeta on output buffersMatthew Waters2015-02-031-0/+8
| | | | | allows thread safely using the provided output buffer in a separate thread
* glupload: only try the glmemory upload for sysmem/glmemory caps featuresMatthew Waters2015-02-031-0/+6
| | | | Allows selecting/testing the upload path with explicit caps features.
* glmemory: add missing initilisation of tex_target when copyingMatthew Waters2015-02-031-0/+2
| | | | | | | fixes: glcolorscale ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) ! glimagesink
* glupload: allow NULL buffer for accept vfuncMatthew Waters2015-02-031-29/+39
|
* glupload: remove unsed convert field in private structMatthew Waters2015-02-031-7/+0
|
* glupload/download/convert: provide transform_caps functionsMatthew Waters2015-02-039-171/+490
| | | | | | | 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.
* gstglwindow_cocoa: fix slow render rateAlessandro Decina2015-02-031-4/+6
| | | | | | | | | | In gst_gl_window_cocoa_draw we used to just call setNeedsDisplay:YES. That was creating an implicit CA transaction which was getting committed at the next runloop iteration. Since we don't know how often the main runloop is running, and when we run it implicitly (from gst_gl_window_cocoa_nsapp_iteration) we only do so every 200ms, use an explicit CA transaction instead and commit it immediately. CA transactions nest and debounce automatically so this will never result in extra work.
* gstglcaopengllayer: use the correct rectangle type for iOS and OS XMatthew Waters2015-02-021-1/+1
|
* glcolorconvert: use the correct caps feature for supported capsMatthew Waters2015-02-021-1/+3
| | | | | glcolorconvert currently only supports converting between GLMemory targets.
* glsyncmeta: don't use the gst debug object variantsMatthew Waters2015-02-021-3/+2
| | | | | We are not a GObject or any inferable GstMiniObject supported by the gst debug system. Also fixes a segfault.
* Revert "libgstgl: gstglcaopengllayer: set the layer as opaque"Alessandro Decina2015-01-301-1/+0
| | | | | | This reverts commit 6f152d381ca21595cdc823f32341c8f2fe71b9c7. The layer shouldn't be always opaque, it should be made a property.
* libgstgl: gstglcaopengllayer: set the layer as opaqueAlessandro Decina2015-01-301-0/+1
|
* glcolorconvert: Add FIXME comment about possibility of non-Apple YCbCr422 ↵Sebastian Dröge2015-01-291-0/+4
| | | | rectangular textures
* glcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGLSebastian Dröge2015-01-291-1/+4
| | | | It's not defined for GLES.
* libgstgl: run a custom shader to convert YUV to RGB on mac and iosAlessandro Decina2015-01-301-67/+104
| | | | | | | When GL_APPLE_ycbcr_422 is available, run a custom shader to convert GL_TEXTURE_RECTANGLE textures from YUV to RGB. See https://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt
* gl: initial support for texture targets other than GL_TEXTURE_2DAlessandro Decina2015-01-307-42/+67
| | | | | | | | | | | | | | | | | Make GstGLMemory hold the texture target (tex_target) the texture it represents (tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and gst_gl_download_perform_with_data to take the texture target as an argument. This change is needed to support wrapping textures created outside libgstgl, which might be bound to a target other than GL_TEXTURE_2D. For example on OSX textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE. With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the target of textures created with libgstgl. API: modify GstGLMemory API: modify gst_gl_memory_wrapped_texture API: gst_gl_download_perform_with_data
* gstglcolorconvert: micro optimizationAlessandro Decina2015-01-301-3/+0
| | | | | Don't call glClear && glClearColor at each draw since we're going to draw the whole viewport anyway. Gets rid of a glFlush triggered by glClear on OSX.
* gstglcolorconvert: relax caps features checkAlessandro Decina2015-01-301-8/+5
| | | | | Require caps to have the GST_CAPS_FEATURE_MEMORY_GL_MEMORY feature but allow them to have more features.
* gl/win32: fixup compilationMatthew Waters2015-01-291-2/+2
|
* glwindow: make showing a window explicitMatthew Waters2015-01-295-70/+131
| | | | | Also fixes the cgl context always displaying a window to render to for every GstGLContextCocoa created
* gl/calayer: add resize callback based on the bounds rectangleMatthew Waters2015-01-293-142/+136
|
* gl/caopengllayer: draw asynchronouslyMatthew Waters2015-01-291-1/+5
| | | | This essentially makes the CAOpenGLLayer draw every refresh cycle.
* gl/cocoa: don't segfault if we have a NULL draw/resize/close callbackMatthew Waters2015-01-291-3/+9
|
* cgl/calayer: use a callback instead of hardcoding the draw functionalityMatthew Waters2015-01-293-11/+23
|
* cgl: install the gl context and gl layer headersMatthew Waters2015-01-291-1/+5
|
* cgl: add a header for the CAOpenGLLayer supportMatthew Waters2015-01-293-12/+51
|
* gl/dispmanx: fix buildPhilippe Normand2015-01-271-2/+2
| | | | | Commit ab48bb6f0f55091662e595a001e178154ce60cdb changed the API of GstGLWindow.
* glmemory: more compatibility defines for gles2 systemsMatthew Waters2015-01-271-0/+12
|
* glmemory: add some thread safety for gl operationsMatthew Waters2015-01-272-0/+22
|
* glmemory: use pbo's for downloadMatthew Waters2015-01-273-17/+120
| | | | | | In order to use pbo's efficiently, the transfer operation has to be separated from the use of the downloaded data which requires some rearchitecturing around glcolorconvert/gldownload and elements
* glprototypes: add some (un)map buffer variants for GL/GLESMatthew Waters2015-01-271-1/+11
|
* gl/window/eagl: fix a couple of typosMatthew Waters2015-01-231-2/+2
|
* glwindow: cleanup/reorganize functions/members into logical groupsMatthew Waters2015-01-231-29/+59
|