public static CMBufferQueue FromCallbacks(int count, CMBufferGetTime getDecodeTimeStamp, CMBufferGetTime getPresentationTimeStamp, CMBufferGetTime getDuration, CMBufferGetBool isDataReady, CMBufferCompare compare, NSString dataBecameReadyNotification, CMBufferGetSize getTotalSize) { var bq = new CMBufferQueue(count); var cbacks = new CMBufferCallbacks() { version = (uint)(getTotalSize == null ? 0 : 1), refcon = GCHandle.ToIntPtr(bq.gch), XgetDecodeTimeStamp = getDecodeTimeStamp == null ? (BufferGetTimeCallback)null : GetDecodeTimeStamp, XgetPresentationTimeStamp = getPresentationTimeStamp == null ? (BufferGetTimeCallback)null : GetPresentationTimeStamp, XgetDuration = getDuration == null ? (BufferGetTimeCallback)null : GetDuration, XisDataReady = isDataReady == null ? (BufferGetBooleanCallback)null : GetDataReady, Xcompare = compare == null ? (BufferCompareCallback)null : Compare, cfStringPtr_dataBecameReadyNotification = dataBecameReadyNotification == null ? IntPtr.Zero : dataBecameReadyNotification.Handle, XgetSize = getTotalSize == null ? (BufferGetSizeCallback)null : GetTotalSize }; bq.getDecodeTimeStamp = getDecodeTimeStamp; bq.getPresentationTimeStamp = getPresentationTimeStamp; bq.getDuration = getDuration; bq.isDataReady = isDataReady; bq.compare = compare; bq.getTotalSize = getTotalSize; if (CMBufferQueueCreate(IntPtr.Zero, count, cbacks, out bq.handle) == 0) { return(bq); } bq.Dispose(); return(null); }
extern static OSStatus CMBufferQueueCreate(/* CFAllocatorRef */ IntPtr allocator, /* CMItemCount */ nint capacity, CMBufferCallbacks cbacks, /* CMBufferQueueRef* */ out IntPtr result);
public static CMBufferQueue FromCallbacks (int count, CMBufferGetTime getDecodeTimeStamp, CMBufferGetTime getPresentationTimeStamp, CMBufferGetTime getDuration, CMBufferGetBool isDataReady, CMBufferCompare compare, NSString dataBecameReadyNotification, CMBufferGetSize getTotalSize) { var bq = new CMBufferQueue (count); var cbacks = new CMBufferCallbacks () { version = (uint) (getTotalSize == null ? 0 : 1), refcon = GCHandle.ToIntPtr (bq.gch), XgetDecodeTimeStamp = getDecodeTimeStamp == null ? (BufferGetTimeCallback) null : GetDecodeTimeStamp, XgetPresentationTimeStamp = getPresentationTimeStamp == null ? (BufferGetTimeCallback) null : GetPresentationTimeStamp, XgetDuration = getDuration == null ? (BufferGetTimeCallback) null : GetDuration, XisDataReady = isDataReady == null ? (BufferGetBooleanCallback) null : GetDataReady, Xcompare = compare == null ? (BufferCompareCallback) null : Compare, cfStringPtr_dataBecameReadyNotification = dataBecameReadyNotification == null ? IntPtr.Zero : dataBecameReadyNotification.Handle, XgetSize = getTotalSize == null ? (BufferGetSizeCallback) null : GetTotalSize }; bq.getDecodeTimeStamp = getDecodeTimeStamp; bq.getPresentationTimeStamp = getPresentationTimeStamp; bq.getDuration = getDuration; bq.isDataReady = isDataReady; bq.compare = compare; bq.getTotalSize = getTotalSize; if (CMBufferQueueCreate (IntPtr.Zero, count, cbacks, out bq.handle) == 0) return bq; bq.Dispose (); return null; }
extern static OSStatus CMBufferQueueCreate (/* CFAllocatorRef */ IntPtr allocator, /* CMItemCount */ nint capacity, CMBufferCallbacks cbacks, /* CMBufferQueueRef* */ out IntPtr result);
extern static OSStatus CMBufferQueueCreate(IntPtr allocator, CMItemCount capacity, CMBufferCallbacks cbacks, out IntPtr result);
extern static OSStatus CMBufferQueueCreate (IntPtr allocator, CMItemCount capacity, CMBufferCallbacks cbacks, out IntPtr result);