IOSurface
The IOSurface library provides helpers for detecting and querying IOSurface-backed GstMemory.
The GST_CAPS_FEATURE_MEMORY_IOSURFACE caps feature can be used on
video/x-raw caps to negotiate IOSurface-backed buffers.
Functions
gst_iosurface_memory_peek_surface
gboolean gst_iosurface_memory_peek_surface (GstMemory * mem, IOSurfaceRef* surface, guint * plane)
Queries whether mem is backed by an IOSurface and, if so, returns the IOSurface and plane represented by this memory. surface and plane are only modified if this function returns TRUE.
The returned IOSurface is owned by mem and is valid for as long as mem is alive. Callers must call CFRetain if they want to keep the IOSurfaceRef beyond mem's lifetime.
Parameters:
mem
–
surface
(
[out][transfer: none][optional])
–
the IOSurfaceRef
plane
(
[out][optional])
–
the IOSurface plane index represented by mem
TRUE if mem exposes an IOSurface.
Since : 1.30
gst_iosurface_memory_register_query_function
gst_iosurface_memory_register_query_function (GType allocator_type, GstIOSurfaceMemoryQueryFunction query, gpointer user_data)
Registers query as the IOSurface query function for GstMemory objects allocated by allocator_type.
This function is intended for memory implementers rather than applications. query must remain valid for the lifetime of the process and must only return borrowed IOSurface references owned by the queried memory.
Parameters:
allocator_type
–
a GstAllocator type
query
(
[scope forever][closure])
–
function used to query IOSurface backing for memory allocated by allocator_type
user_data
–
user data to pass to query
Since : 1.30
gst_is_iosurface_buffer
gboolean gst_is_iosurface_buffer (GstBuffer * buffer)
Parameters:
buffer
–
TRUE if buffer is non-empty and every memory block in buffer exposes an IOSurface.
Since : 1.30
GstAllocators.prototype.is_iosurface_buffer
function GstAllocators.prototype.is_iosurface_buffer(buffer: Gst.Buffer): {
// javascript wrapper for 'gst_is_iosurface_buffer'
}
Parameters:
Since : 1.30
GstAllocators.is_iosurface_buffer
def GstAllocators.is_iosurface_buffer (buffer):
#python wrapper for 'gst_is_iosurface_buffer'
Parameters:
Since : 1.30
gst_is_iosurface_memory
gboolean gst_is_iosurface_memory (GstMemory * mem)
Parameters:
mem
–
TRUE if mem exposes an IOSurface.
Since : 1.30
GstAllocators.prototype.is_iosurface_memory
function GstAllocators.prototype.is_iosurface_memory(mem: Gst.Memory): {
// javascript wrapper for 'gst_is_iosurface_memory'
}
Parameters:
Since : 1.30
GstAllocators.is_iosurface_memory
def GstAllocators.is_iosurface_memory (mem):
#python wrapper for 'gst_is_iosurface_memory'
Parameters:
Since : 1.30
Constants
GST_CAPS_FEATURE_MEMORY_IOSURFACE
#define GST_CAPS_FEATURE_MEMORY_IOSURFACE "memory:IOSurface"
Name of the caps feature for indicating the use of IOSurface-backed memory.
Since : 1.30
GstAllocators.CAPS_FEATURE_MEMORY_IOSURFACE
Name of the caps feature for indicating the use of IOSurface-backed memory.
Since : 1.30
GstAllocators.CAPS_FEATURE_MEMORY_IOSURFACE
Name of the caps feature for indicating the use of IOSurface-backed memory.
Since : 1.30
Callbacks
GstIOSurfaceMemoryQueryFunction
gboolean (*GstIOSurfaceMemoryQueryFunction) (GstMemory * mem, IOSurfaceRef* surface, guint * plane, gpointer user_data)
Function used by memory implementations to expose IOSurface backing through gst_iosurface_memory_peek_surface.
Returning TRUE requires setting both surface and plane. surface must be a borrowed reference owned by mem and valid for as long as mem is alive.
Parameters:
mem
–
surface
(
[out][transfer: none])
–
location for the IOSurfaceRef
plane
(
[out])
–
location for the IOSurface plane index represented by mem
user_data
–
user data
TRUE if mem exposes an IOSurface.
Since : 1.30
The results of the search are