Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (C) 2013-2015 RoboVM AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bugvm.apple.corevideo;
/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
import com.bugvm.apple.corefoundation.*;
import com.bugvm.apple.coregraphics.*;
import com.bugvm.apple.opengles.*;
import com.bugvm.apple.metal.*;
/**/
/**/
/**/
/**/@Library("CoreVideo")/**/
@Marshaler(/**/CVImageBufferAttributes/**/.Marshaler.class)
/**/public/**/ class /**/CVImageBufferAttributes/**/
extends /**/CVBufferAttributes/**/
/**//**/ {
/**/
public static class Marshaler {
@MarshalsPointer
public static CVImageBufferAttributes toObject(Class cls, long handle, long flags) {
CFDictionary o = (CFDictionary) CFType.Marshaler.toObject(CFDictionary.class, handle, flags);
if (o == null) {
return null;
}
return new CVImageBufferAttributes(o);
}
@MarshalsPointer
public static long toNative(CVImageBufferAttributes o, long flags) {
if (o == null) {
return 0L;
}
return CFType.Marshaler.toNative(o.data, flags);
}
}
public static class AsListMarshaler {
@MarshalsPointer
public static List toObject(Class extends CFType> cls, long handle, long flags) {
CFArray o = (CFArray) CFType.Marshaler.toObject(CFArray.class, handle, flags);
if (o == null) {
return null;
}
List list = new ArrayList<>();
for (int i = 0; i < o.size(); i++) {
list.add(new CVImageBufferAttributes(o.get(i, CFDictionary.class)));
}
return list;
}
@MarshalsPointer
public static long toNative(List 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);
}
}
/**/
/**/
CVImageBufferAttributes(CFDictionary data) {
super(data);
}
public CVImageBufferAttributes() {}
/**/
/**/
public boolean has(CVImageBufferAttribute key) {
return data.containsKey(key.value());
}
public T get(CVImageBufferAttribute key, Class type) {
if (has(key)) {
return data.get(key.value(), type);
}
return null;
}
public CVImageBufferAttributes set(CVImageBufferAttribute key, NativeObject value) {
data.put(key.value(), value);
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CGColorSpace getCGColorSpace() {
if (has(CVImageBufferAttribute.CGColorSpace)) {
CGColorSpace val = get(CVImageBufferAttribute.CGColorSpace, CGColorSpace.class);
return val;
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setCGColorSpace(CGColorSpace cGColorSpace) {
set(CVImageBufferAttribute.CGColorSpace, cGColorSpace);
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferCleanAperture getCleanAperture() {
if (has(CVImageBufferAttribute.CleanAperture)) {
CFDictionary val = get(CVImageBufferAttribute.CleanAperture, CFDictionary.class);
return new CVImageBufferCleanAperture(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setCleanAperture(CVImageBufferCleanAperture cleanAperture) {
set(CVImageBufferAttribute.CleanAperture, cleanAperture.getDictionary());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferCleanAperture getPreferredCleanAperture() {
if (has(CVImageBufferAttribute.PreferredCleanAperture)) {
CFDictionary val = get(CVImageBufferAttribute.PreferredCleanAperture, CFDictionary.class);
return new CVImageBufferCleanAperture(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setPreferredCleanAperture(CVImageBufferCleanAperture preferredCleanAperture) {
set(CVImageBufferAttribute.PreferredCleanAperture, preferredCleanAperture.getDictionary());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public int getFieldCount() {
if (has(CVImageBufferAttribute.FieldCount)) {
CFNumber val = get(CVImageBufferAttribute.FieldCount, CFNumber.class);
return val.intValue();
}
return 0;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setFieldCount(int fieldCount) {
set(CVImageBufferAttribute.FieldCount, CFNumber.valueOf(fieldCount));
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferFieldDetail getFieldDetail() {
if (has(CVImageBufferAttribute.FieldDetail)) {
CFString val = get(CVImageBufferAttribute.FieldDetail, CFString.class);
return CVImageBufferFieldDetail.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setFieldDetail(CVImageBufferFieldDetail fieldDetail) {
set(CVImageBufferAttribute.FieldDetail, fieldDetail.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferPixelAspectRatio getPixelAspectRatio() {
if (has(CVImageBufferAttribute.PixelAspectRatio)) {
CFDictionary val = get(CVImageBufferAttribute.PixelAspectRatio, CFDictionary.class);
return new CVImageBufferPixelAspectRatio(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setPixelAspectRatio(CVImageBufferPixelAspectRatio pixelAspectRatio) {
set(CVImageBufferAttribute.PixelAspectRatio, pixelAspectRatio.getDictionary());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferDisplayDimensions getDisplayDimensions() {
if (has(CVImageBufferAttribute.DisplayDimensions)) {
CFDictionary val = get(CVImageBufferAttribute.DisplayDimensions, CFDictionary.class);
return new CVImageBufferDisplayDimensions(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setDisplayDimensions(CVImageBufferDisplayDimensions displayDimensions) {
set(CVImageBufferAttribute.DisplayDimensions, displayDimensions.getDictionary());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public double getGammaLevel() {
if (has(CVImageBufferAttribute.GammaLevel)) {
CFNumber val = get(CVImageBufferAttribute.GammaLevel, CFNumber.class);
return val.doubleValue();
}
return 0;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setGammaLevel(double gammaLevel) {
set(CVImageBufferAttribute.GammaLevel, CFNumber.valueOf(gammaLevel));
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public NSData getICCProfile() {
if (has(CVImageBufferAttribute.ICCProfile)) {
NSData val = get(CVImageBufferAttribute.ICCProfile, NSData.class);
return val;
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setICCProfile(NSData iCCProfile) {
set(CVImageBufferAttribute.ICCProfile, iCCProfile);
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferYCbCrMatrix getYCbCrMatrix() {
if (has(CVImageBufferAttribute.YCbCrMatrix)) {
CFString val = get(CVImageBufferAttribute.YCbCrMatrix, CFString.class);
return CVImageBufferYCbCrMatrix.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setYCbCrMatrix(CVImageBufferYCbCrMatrix yCbCrMatrix) {
set(CVImageBufferAttribute.YCbCrMatrix, yCbCrMatrix.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferColorPrimaries getColorPrimaries() {
if (has(CVImageBufferAttribute.ColorPrimaries)) {
CFString val = get(CVImageBufferAttribute.ColorPrimaries, CFString.class);
return CVImageBufferColorPrimaries.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setColorPrimaries(CVImageBufferColorPrimaries colorPrimaries) {
set(CVImageBufferAttribute.ColorPrimaries, colorPrimaries.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferTransferFunction getTransferFunction() {
if (has(CVImageBufferAttribute.TransferFunction)) {
CFString val = get(CVImageBufferAttribute.TransferFunction, CFString.class);
return CVImageBufferTransferFunction.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setTransferFunction(CVImageBufferTransferFunction transferFunction) {
set(CVImageBufferAttribute.TransferFunction, transferFunction.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferChromaLocation getChromaLocationTopField() {
if (has(CVImageBufferAttribute.ChromaLocationTopField)) {
CFString val = get(CVImageBufferAttribute.ChromaLocationTopField, CFString.class);
return CVImageBufferChromaLocation.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setChromaLocationTopField(CVImageBufferChromaLocation chromaLocationTopField) {
set(CVImageBufferAttribute.ChromaLocationTopField, chromaLocationTopField.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferChromaLocation getChromaLocationBottomField() {
if (has(CVImageBufferAttribute.ChromaLocationBottomField)) {
CFString val = get(CVImageBufferAttribute.ChromaLocationBottomField, CFString.class);
return CVImageBufferChromaLocation.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setChromaLocationBottomField(CVImageBufferChromaLocation chromaLocationBottomField) {
set(CVImageBufferAttribute.ChromaLocationBottomField, chromaLocationBottomField.value());
return this;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferChromaSubsampling getChromaSubsampling() {
if (has(CVImageBufferAttribute.ChromaSubsampling)) {
CFString val = get(CVImageBufferAttribute.ChromaSubsampling, CFString.class);
return CVImageBufferChromaSubsampling.valueOf(val);
}
return null;
}
/**
* @since Available in iOS 4.0 and later.
*/
public CVImageBufferAttributes setChromaSubsampling(CVImageBufferChromaSubsampling chromaSubsampling) {
set(CVImageBufferAttribute.ChromaSubsampling, chromaSubsampling.value());
return this;
}
/**
* @since Available in iOS 8.0 and later.
*/
public boolean isAlphaChannelOpaque() {
if (has(CVImageBufferAttribute.AlphaChannelIsOpaque)) {
CFBoolean val = get(CVImageBufferAttribute.AlphaChannelIsOpaque, CFBoolean.class);
return val.booleanValue();
}
return false;
}
/**
* @since Available in iOS 8.0 and later.
*/
public CVImageBufferAttributes setAlphaChannelOpaque(boolean alphaChannelOpaque) {
set(CVImageBufferAttribute.AlphaChannelIsOpaque, CFBoolean.valueOf(alphaChannelOpaque));
return this;
}
/**/
/**/
/**/
}