cvapi: add a few extra bits of wrapping
authorOle André Vadla Ravnås <oravnas@cisco.com>
Mon, 8 Nov 2010 17:56:52 +0000 (18:56 +0100)
committerOle André Vadla Ravnås <oravnas@cisco.com>
Mon, 8 Nov 2010 22:58:25 +0000 (23:58 +0100)
sys/applemedia/cvapi.c
sys/applemedia/cvapi.h

index 96f83f85333a0476bf8cd7b876fffc50f97e8182..518548eea3cdbd0561c453fa62f3477ed51754e0 100644 (file)
@@ -46,6 +46,7 @@ gst_cv_api_obtain (GError ** error)
     SYM_SPEC (CVBufferRetain),
 
     SYM_SPEC (CVPixelBufferCreateWithBytes),
+    SYM_SPEC (CVPixelBufferCreateWithPlanarBytes),
     SYM_SPEC (CVPixelBufferGetBaseAddress),
     SYM_SPEC (CVPixelBufferGetBaseAddressOfPlane),
     SYM_SPEC (CVPixelBufferGetBytesPerRow),
@@ -64,6 +65,7 @@ gst_cv_api_obtain (GError ** error)
     SYM_SPEC (kCVPixelBufferWidthKey),
     SYM_SPEC (kCVPixelBufferHeightKey),
     SYM_SPEC (kCVPixelBufferBytesPerRowAlignmentKey),
+    SYM_SPEC (kCVPixelBufferPlaneAlignmentKey),
 
     {NULL, 0},
   };
index 444ded06fb541f653b54ce8055a106f84f3f41ec..4a2cfc8d74013c5ce231d5258f52b56ecda745a6 100644 (file)
@@ -47,6 +47,7 @@ enum _CVReturn
 
 enum _CVPixelFormatType
 {
+  kCVPixelFormatType_420YpCbCr8Planar             = 'y420',
   kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange = '420v',
   kCVPixelFormatType_422YpCbCr8Deprecated         = 'yuvs',
   kCVPixelFormatType_422YpCbCr8                   = '2vuy'
@@ -70,6 +71,15 @@ struct _GstCVApi
       CVPixelBufferReleaseBytesCallback releaseCallback,
       void * releaseRefCon, CFDictionaryRef pixelBufferAttributes,
       CVPixelBufferRef * pixelBufferOut);
+  CVReturn (* CVPixelBufferCreateWithPlanarBytes)
+      (CFAllocatorRef allocator, size_t width, size_t height,
+      OSType pixelFormatType, void * dataPtr, size_t dataSize,
+      size_t numberOfPlanes, void *planeBaseAddress[],
+      size_t planeWidth[], size_t planeHeight[],
+      size_t planeBytesPerRow[],
+      CVPixelBufferReleaseBytesCallback releaseCallback,
+      void * releaseRefCon, CFDictionaryRef pixelBufferAttributes,
+      CVPixelBufferRef * pixelBufferOut);
   void * (* CVPixelBufferGetBaseAddress)
       (CVPixelBufferRef pixelBuffer);
   void * (* CVPixelBufferGetBaseAddressOfPlane)
@@ -97,6 +107,7 @@ struct _GstCVApi
   CFStringRef * kCVPixelBufferWidthKey;
   CFStringRef * kCVPixelBufferHeightKey;
   CFStringRef * kCVPixelBufferBytesPerRowAlignmentKey;
+  CFStringRef * kCVPixelBufferPlaneAlignmentKey;
 };
 
 struct _GstCVApiClass