@MarshalsPointer
 public static long toNative(List<CMVideoCodecType> l, long flags) {
   if (l == null) {
     return 0L;
   }
   NSMutableArray<NSString> array = new NSMutableArray<>();
   for (CMVideoCodecType i : l) {
     array.add(new NSString(i.asFourCharCode()));
   }
   return NSObject.Marshaler.toNative(array, flags);
 }
Exemple #2
0
 /** @since Available in iOS 4.0 and later. */
 @WeaklyLinked
 public CMVideoCodecType getCodec() {
   if (has(Keys.Codec())) {
     NSNumber val = (NSNumber) get(Keys.Codec());
     return CMVideoCodecType.valueOf(val.longValue());
   }
   return null;
 }
 @SuppressWarnings("unchecked")
 @MarshalsPointer
 public static List<CMVideoCodecType> toObject(
     Class<? extends NSObject> cls, long handle, long flags) {
   NSArray<NSString> o = (NSArray<NSString>) NSObject.Marshaler.toObject(cls, handle, flags);
   if (o == null) {
     return null;
   }
   List<CMVideoCodecType> list = new ArrayList<>();
   for (NSString str : o) {
     list.add(CMVideoCodecType.valueOf(str));
   }
   return list;
 }
Exemple #4
0
 /** @since Available in iOS 4.0 and later. */
 @WeaklyLinked
 public AVVideoSettings setCodec(CMVideoCodecType codec) {
   set(Keys.Codec(), NSNumber.valueOf(codec.value()));
   return this;
 }