Commit graph

24 commits

Author SHA1 Message Date
Matthew Waters
0560946c82 videotexturecache: implement GL specifics as a subclass 2019-12-09 01:49:30 +00:00
Matthew Waters
ff5ba2f126 applemedia/videocache: make a GObject subclass 2019-12-09 01:49:30 +00:00
Tim-Philipp Müller
f4b9d8c299 applemedia: don't include private cocoa gl header 2017-12-19 21:35:31 +00:00
Matthew Waters
63c582d685 gl: fix build for ios/win32/android after 2fd84a6c
Some missing GL includes.
2017-08-28 12:57:47 +10:00
Matthew Waters
956c4d0bde gl/format: use our own GL format enum's instead of gstvideo's
They can describe in more detail (such as component sizes) the requested format.
2017-03-13 21:10:58 +11:00
Nick Kallen
46bbc60d24 applemedia/gl: Update code to use ARC
All code interacting with Objective-C objects should now use Automated
Reference Counting rather than manual memory management or Garbage
Collection. Because ARC prohibits C-structs from containing
references to Objective-C objects, all such fields are now typed
'gpointer'. Setting and gettings Objective-C fields on such a
struct now uses explicit __bridge_* calls to tell ARC about
object lifetimes.

https://bugzilla.gnome.org/show_bug.cgi?id=777847
2017-03-07 13:37:07 +02:00
Nick Kallen
6e4354600d applemedia: Fix video texture cache build issue on MacOS
https://bugzilla.gnome.org/show_bug.cgi?id=779247
2017-03-04 17:35:23 +02:00
Nick Kallen
e557e93f3b applemedia: ensure all textures are released before texturecache is released
It was previously possible for videotexturecache to be finalized before all of
its textures. Finalizing outstanding textures in this circumstance leads
to a crash. This patch ensure resources are freed in the proper order.

https://bugzilla.gnome.org/show_bug.cgi?id=779247
2017-03-04 11:59:57 +02:00
Nick Kallen
2f676d61a7 Builds for MacOS
https://bugzilla.gnome.org/show_bug.cgi?id=778434
2017-02-14 14:50:34 +01:00
Nick Kallen
487e57f1b7 applemedia: free videotexturecache texture in gl thread
The cached texture was treated as user_data passed to GstGLBaseMemory
and freed with a GDestroyNotify function. However, this data must
be treated specially: it must be destroyed in the GL thread.

https://bugzilla.gnome.org/show_bug.cgi?id=778434
2017-02-14 12:25:55 +02:00
Alessandro Decina
7898bc5810 applemedia: changes to make GL memory mappable on CPU on iOS
This commit introduces IOSGLMemory which is a GLMemory that falls back to
GstAppleCoreVideoMemory for CPU access. This is a temporary solution until
IOSurface gets exposed as a public framework on iOS and so we can use
IOSurfaceMemory on both MacOS and iOS.

https://bugzilla.gnome.org/show_bug.cgi?id=769210
2016-08-26 17:44:48 +10:00
Matthew Waters
19a00b17ab vtdec: use L/LA textures on GLES2 as well 2016-06-29 20:39:26 +10:00
Matthew Waters
9a325f4a09 vtdec: add support for zerocopy decoding with GLES 3.x
It seems that Red/RG textures aren't supported anymore for zerocopy decoding
with GLES 3.x.  Instead use Luminance/Luminance Alpha textures which are.
2016-06-29 18:04:28 +10:00
Matthew Waters
989200820d glmemory: add the texture type to allocate to parameters
Rather than assuming something.  e.g. zerocopy on iOS with GLES3 requires
the use of Luminance/Luminance Alpha formats and does not work with
Red/RG textures.
2016-06-29 18:04:28 +10:00
Alessandro Decina
4aaaf23868 applemedia: videotesturecache: let CVOpenGLESTextureCache flush every 1s
Leave kCVOpenGLESTextureCacheMaximumTextureAgeKey to the default (1s). We used
to set it to 0 and flush manually, but apparently (looking at the GLES profiler)
0 means "disable the cache entirely".
2016-02-10 15:40:02 +11:00
Alessandro Decina
c2a57f3555 applemedia: texture cache: copy the input metas
Copy the input metas so avfvideosrc and vtenc can fast path to using
CVPixelBuffer(s) even when using GLMemory.
2016-01-22 13:53:32 +11:00
Alessandro Decina
f6154b4cc0 applemedia: always fill GstBuffers with GstMemory
Always fill buffers with our custom memory. The custom memory will avoid
mapping CV/CM buffers unless necessary.
2016-01-19 16:13:04 +11:00
Alessandro Decina
6961945110 glmemory: add gst_gl_memory_allocator_get_default
Add gst_gl_memory_allocator_get_default to get the default allocator based on
the opengl version. Allows us to stop hardcoding the PBO allocator which isn't
supported on gles2.

Fixes GL upload on iOS9 among other things.
2015-12-18 14:25:32 +11:00
Matthew Waters
5dcd500257 gl*memory*: reverse the parameter order of user_data and destroy notify
The convention is to have the destroy notify last after any user data
2015-12-17 15:44:22 +11:00
Alessandro Decina
491e2eefcb applemedia: fix build on iOS
Fix build after 779dc3132c
2015-12-17 15:07:33 +11:00
Matthew Waters
779dc3132c glmemorypbo: remove our own alloc()/wrapped()/etc functions
replaced by equivalent functionality within gst_gl_base_memory_alloc()
2015-12-17 13:49:56 +11:00
Alessandro Decina
9981cd8327 applemedia: vtdec: remove the internal GstGLColorConvert
It was added back in the day to make texture sharing work by default with
glimagesink inside playbin. These days glimagesink accepts (and converts) YUV
internally so it's no longer needed.
2015-12-16 17:03:03 +11:00
Alessandro Decina
8ae0033261 applemedia: vtdec: switch to IOSurface on Mac
Switch to using IOSurface instead of CVOpenGLTextureCache on OSX. The latter can't be
used anymore to do YUV => RGB with opengl3 on El Capitan as GL_YCBCR_422_APPLE
has been removed from the opengl3 driver. Also switch to NV12 from UYVY, which
was the only YUV format supported by CVOpenGLTextureCache.
2015-12-16 17:03:03 +11:00
Alessandro Decina
e730b0a8ab applemedia: rename GstCoreVideoTextureCache to GstVideoTextureCache
First of a few commits to stop using CVOpenGLTextureCache on OSX and use
IOSurfaces directly instead. CVOpenGLTextureCache hasn't been updated for OpenGL
3 which is why texture sharing is currently disabled on OSX.
2015-12-16 17:03:03 +11:00
Renamed from sys/applemedia/corevideotexturecache.m (Browse further)