io.humble.video.Configurable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of humble-video-noarch Show documentation
Show all versions of humble-video-noarch Show documentation
This is the main Humble Video Java library. It contains no native code, but all Java runtime code.
It must be paired up with the correct humble-video-arch-*.jar library for your OS. For most
users, depending on humble-video-all will work better.
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.6
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package io.humble.video;
import io.humble.ferry.*;
/**
* Methods that implement this class can be configured
* using setProperty and getProperty methods, and expose
* IProperty meta data about their properties.
*
* You can use Configuration#configure(java.util.Properties, Configurable)
* to easily configure these objects from Java properties or
* from a FFmpeg preset file.
*
*
* @author aclarke
*/
public class Configurable extends RefCounted {
// JNIHelper.swg: Start generated code
// >>>>>>>>>>>>>>>>>>>>>>>>>>>
/**
* This method is only here to use some references and remove
* a Eclipse compiler warning.
*/
@SuppressWarnings("unused")
private void noop()
{
Buffer.make(null, 1);
}
private volatile long swigCPtr;
/**
* Internal Only.
*/
protected Configurable(long cPtr, boolean cMemoryOwn) {
super(VideoJNI.Configurable_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
/**
* Internal Only.
*/
protected Configurable(long cPtr, boolean cMemoryOwn,
java.util.concurrent.atomic.AtomicLong ref)
{
super(VideoJNI.Configurable_SWIGUpcast(cPtr),
cMemoryOwn, ref);
swigCPtr = cPtr;
}
/**
* Internal Only. Not part of public API.
*
* Get the raw value of the native object that obj is proxying for.
*
* @param obj The java proxy object for a native object.
* @return The raw pointer obj is proxying for.
*/
protected static long getCPtr(Configurable obj) {
if (obj == null) return 0;
return obj.getMyCPtr();
}
/**
* Internal Only. Not part of public API.
*
* Get the raw value of the native object that we're proxying for.
*
* @return The raw pointer we're proxying for.
*/
protected long getMyCPtr() {
if (swigCPtr == 0) throw new IllegalStateException("underlying native object already deleted");
return swigCPtr;
}
/**
* Create a new Configurable object that is actually referring to the
* exact same underlying native object.
*
* @return the new Java object.
*/
@Override
public Configurable copyReference() {
if (swigCPtr == 0)
return null;
else
return new Configurable(swigCPtr, swigCMemOwn, getJavaRefCount());
}
/**
* Compares two values, returning true if the underlying objects in native code are the same object.
*
* That means you can have two different Java objects, but when you do a comparison, you'll find out
* they are the EXACT same object.
*
* @return True if the underlying native object is the same. False otherwise.
*/
public boolean equals(Object obj) {
boolean equal = false;
if (obj instanceof Configurable)
equal = (((Configurable)obj).swigCPtr == this.swigCPtr);
return equal;
}
/**
* Get a hashable value for this object.
*
* @return the hashable value.
*/
public int hashCode() {
return (int)swigCPtr;
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<
// JNIHelper.swg: End generated code
/**
* Returns the total number of settable properties on this object
*
* @return total number of options (not including constant definitions)
*/
public int getNumProperties() {
return VideoJNI.Configurable_getNumProperties(swigCPtr, this);
}
/**
* Returns the name of the numbered property.
*
* @param propertyNo The property number in the options list.
*
* @return a Property value for this properties meta-data
*/
public Property getPropertyMetaData(int propertyNo) {
long cPtr = VideoJNI.Configurable_getPropertyMetaData__SWIG_0(swigCPtr, this, propertyNo);
return (cPtr == 0) ? null : new Property(cPtr, false);
}
/**
* Returns the name of the named property.
*
* @param name The property name.
*
* @return a Property value for this properties meta-data
* @throws PropertyNotFoundException if this property is not found.
*/
public Property getPropertyMetaData(String name) {
long cPtr = VideoJNI.Configurable_getPropertyMetaData__SWIG_1(swigCPtr, this, name);
return (cPtr == 0) ? null : new Property(cPtr, false);
}
/**
* Sets a property on this Object.
*
* All AVOptions supported by the underlying AVClass are supported.
*
* @param name The property name. For example "b" for bit-rate.
* @param value The value of the property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public void setProperty(String name, String value) {
VideoJNI.Configurable_setProperty__SWIG_0(swigCPtr, this, name, value);
}
/**
* Looks up the property 'name' and sets the
* value of the property to 'value'.
*
* @param name name of option
* @param value Value of option
*
* @throws PropertyNotFoundException if this property is not found.
*/
public void setProperty(String name, double value) {
VideoJNI.Configurable_setProperty__SWIG_1(swigCPtr, this, name, value);
}
/**
* Looks up the property 'name' and sets the
* value of the property to 'value'.
*
* @param name name of option
* @param value Value of option
*
* @throws PropertyNotFoundException if this property is not found.
*/
public void setProperty(String name, long value) {
VideoJNI.Configurable_setProperty__SWIG_2(swigCPtr, this, name, value);
}
/**
* Looks up the property 'name' and sets the
* value of the property to 'value'.
*
* @param name name of option
* @param value Value of option
*
* @throws PropertyNotFoundException if this property is not found.
*/
public void setProperty(String name, boolean value) {
VideoJNI.Configurable_setProperty__SWIG_3(swigCPtr, this, name, value);
}
/**
* Looks up the property 'name' and sets the
* value of the property to 'value'.
*
* @param name name of option
* @param value Value of option
*
* @throws PropertyNotFoundException if this property is not found.
*/
public void setProperty(String name, Rational value) {
VideoJNI.Configurable_setProperty__SWIG_4(swigCPtr, this, name, Rational.getCPtr(value), value);
}
/**
* Gets a property on this Object.
*
* @param name property name
*
* @return a string copy of the option value.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public String getPropertyAsString(String name) {
return VideoJNI.Configurable_getPropertyAsString(swigCPtr, this, name);
}
/**
* Gets the value of this property, and returns as a double;
*
* @param name name of option
*
* @return double value of property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public double getPropertyAsDouble(String name) {
return VideoJNI.Configurable_getPropertyAsDouble(swigCPtr, this, name);
}
/**
* Gets the value of this property, and returns as an long;
*
* @param name name of option
*
* @return long value of property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public long getPropertyAsLong(String name) {
return VideoJNI.Configurable_getPropertyAsLong(swigCPtr, this, name);
}
/**
* Gets the value of this property, and returns as an int;
*
* @param name name of option
*
* @return int value of property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public int getPropertyAsInt(String name) {
return VideoJNI.Configurable_getPropertyAsInt(swigCPtr, this, name);
}
/**
* Gets the value of this property, and returns as an Rational;
*
* @param name name of option
*
* @return long value of property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public Rational getPropertyAsRational(String name) {
long cPtr = VideoJNI.Configurable_getPropertyAsRational(swigCPtr, this, name);
return (cPtr == 0) ? null : new Rational(cPtr, false);
}
/**
* Gets the value of this property, and returns as a boolean
*
* @param name name of option
*
* @return boolean value of property.
*
* @throws PropertyNotFoundException if this property is not found.
*/
public boolean getPropertyAsBoolean(String name) {
return VideoJNI.Configurable_getPropertyAsBoolean(swigCPtr, this, name);
}
/**
* Sets all properties in valuesToSet on this Configurable object.
*
* @param valuesToSet The set of key-value pairs to try to set
* @param valuesNotFound If non null will contain all key-values pairs in valuesToSet
* that were not found in context.
*/
public void setProperty(KeyValueBag valuesToSet, KeyValueBag valuesNotFound) {
VideoJNI.Configurable_setProperty__SWIG_5(swigCPtr, this, KeyValueBag.getCPtr(valuesToSet), valuesToSet, KeyValueBag.getCPtr(valuesNotFound), valuesNotFound);
}
}