Esempio n. 1
0
 @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);
 }
Esempio n. 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;
 }
Esempio n. 3
0
 @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;
 }
Esempio n. 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;
 }