@MarshalsPointer public static long toNative(List<CVImageBufferAttributes> l, long flags) { if (l == null) { return 0L; } CFArray array = CFMutableArray.create(); for (CVImageBufferAttributes i : l) { array.add(i.getDictionary()); } return CFType.Marshaler.toNative(array, flags); }
@MarshalsPointer public static List<CVImageBufferAttributes> toObject( Class<? extends CFType> cls, long handle, long flags) { CFArray o = (CFArray) CFType.Marshaler.toObject(cls, handle, flags); if (o == null) { return null; } List<CVImageBufferAttributes> list = new ArrayList<>(); for (int i = 0; i < o.size(); i++) { list.add(new CVImageBufferAttributes(o.get(i, CFDictionary.class))); } return list; }