diff options
author | Ilya Konstantinov <ilya.konstantinov@gmail.com> | 2015-04-02 20:04:18 +0300 |
---|---|---|
committer | Alessandro Decina <alessandro.d@gmail.com> | 2016-01-19 12:58:43 +1100 |
commit | 936b2fdfbc71dfda8c3f51caba84daa20d56732f (patch) | |
tree | aa497cc6b8f62f72e3e224a483cd025153741679 /sys/applemedia/plugin.m | |
parent | ed7df2da3c007655af5abb109778e81a5d0d8aed (diff) | |
download | gstreamer-plugins-bad-936b2fdfbc71dfda8c3f51caba84daa20d56732f.tar.gz |
applemedia: implement GstAppleCoreVideoMemory
Implement a new memory type wrapping CVPixelBuffer.
There are two immediate advantages:
a) Make the GstMemory itself retain the CVPixelBuffer. Previously,
the containing GstBuffer was solely responsible for the lifetime of
the backing CVPixelBuffer.
With this change, we remove the GST_MEMORY_FLAG_NO_SHARE so that
GstMemory objects be referenced by multiple GstBuffers (doing away
with the need to copy.)
b) Delay locking CVPixelBuffer into CPU memory until it's actually
mapped -- possibly never.
The CVPixelBuffer object is shared among references, shares and
(in planar formats) planes, so a wrapper GstAppleCoreVideoPixelBuffer
structure was introduced to manage locking.
https://bugzilla.gnome.org/show_bug.cgi?id=747216
Diffstat (limited to 'sys/applemedia/plugin.m')
-rw-r--r-- | sys/applemedia/plugin.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/applemedia/plugin.m b/sys/applemedia/plugin.m index c17c38b60..0ff4ec1a5 100644 --- a/sys/applemedia/plugin.m +++ b/sys/applemedia/plugin.m @@ -22,6 +22,7 @@ #endif #include <Foundation/Foundation.h> +#include "corevideomemory.h" #ifdef HAVE_IOS #include "iosassetsrc.h" #else @@ -63,6 +64,8 @@ plugin_init (GstPlugin * plugin) { gboolean res = TRUE; + gst_apple_core_video_memory_init (); + #ifdef HAVE_IOS res &= gst_element_register (plugin, "iosassetsrc", GST_RANK_SECONDARY, GST_TYPE_IOS_ASSET_SRC); |