Package com.avpkit.core
Interface IConfigurable
-
- All Known Implementing Classes:
IContainer,IStreamCoder,IVideoResampler
public interface IConfigurable
Methods that implement this interface can be configuring using setProperty and getProperty methods, and exposeIPropertymeta data about their properties.You can use
Configuration.configure(java.util.Properties, IConfigurable)to easily configure these objects from Java properties or from a FFmpeg preset file.- Author:
- aclarke
- See Also:
Configuration.configure(java.util.Properties, IConfigurable)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetNumProperties()Returns the total number of settable properties on this objectbooleangetPropertyAsBoolean(java.lang.String name)Gets the value of this property, and returns as a booleandoublegetPropertyAsDouble(java.lang.String name)Gets the value of this property, and returns as a double;longgetPropertyAsLong(java.lang.String name)Gets the value of this property, and returns as an long;IRationalgetPropertyAsRational(java.lang.String name)Gets the value of this property, and returns as an IRational;java.lang.StringgetPropertyAsString(java.lang.String name)Gets a property on this Object.IPropertygetPropertyMetaData(int propertyNo)Returns the name of the numbered property.IPropertygetPropertyMetaData(java.lang.String name)Returns the name of the numbered property.java.util.Collection<java.lang.String>getPropertyNames()Gets a collection of all properties settable on this object.intsetProperty(IMetaData valuesToSet, IMetaData valuesNotFound)Sets all properties in valuesToSet on thisIConfigurableobject.intsetProperty(java.lang.String name, boolean value)Looks up the property 'name' and sets the value of the property to 'value'.intsetProperty(java.lang.String name, double value)Looks up the property 'name' and sets the value of the property to 'value'.intsetProperty(java.lang.String name, long value)Looks up the property 'name' and sets the value of the property to 'value'.intsetProperty(java.lang.String name, IRational value)Looks up the property 'name' and sets the value of the property to 'value'.intsetProperty(java.lang.String name, java.lang.String value)Sets a property on this Object.
-
-
-
Method Detail
-
getPropertyNames
java.util.Collection<java.lang.String> getPropertyNames()
Gets a collection of all properties settable on this object. You can then query current settings withgetPropertyAsString(String)and set properties withsetProperty(String, String).- Returns:
- a collection of all properties for this object.
-
getNumProperties
int getNumProperties()
Returns the total number of settable properties on this object- Returns:
- total number of options (not including constant definitions)
-
getPropertyMetaData
IProperty getPropertyMetaData(int propertyNo)
Returns the name of the numbered property.- Parameters:
propertyNo- The property number in the options list.- Returns:
- an IProperty value for this properties meta-data
-
getPropertyMetaData
IProperty getPropertyMetaData(java.lang.String name)
Returns the name of the numbered property.- Parameters:
name- The property name.- Returns:
- an IProperty value for this properties meta-data
-
setProperty
int setProperty(java.lang.String name, java.lang.String value)
Sets a property on this Object. All AVOptions supported by the underlying AVClass are supported.- Parameters:
name- The property name. For example "b" for bit-rate.value- The value of the property.- Returns:
- >= 0 if the property was successfully set; <0 on error
-
setProperty
int setProperty(java.lang.String name, double value)
Looks up the property 'name' and sets the value of the property to 'value'.- Parameters:
name- name of optionvalue- Value of option- Returns:
- >= 0 on success; <0 on error.
-
setProperty
int setProperty(java.lang.String name, long value)
Looks up the property 'name' and sets the value of the property to 'value'.- Parameters:
name- name of optionvalue- Value of option- Returns:
- >= 0 on success; <0 on error.
-
setProperty
int setProperty(java.lang.String name, boolean value)
Looks up the property 'name' and sets the value of the property to 'value'.- Parameters:
name- name of optionvalue- Value of option- Returns:
- >= 0 on success; <0 on error.
-
setProperty
int setProperty(java.lang.String name, IRational value)
Looks up the property 'name' and sets the value of the property to 'value'.- Parameters:
name- name of optionvalue- Value of option- Returns:
- >= 0 on success; <0 on error.
-
getPropertyAsString
java.lang.String getPropertyAsString(java.lang.String name)
Gets a property on this Object. Note for C++ callers; you must free the returned array with delete[] in order to avoid a memory leak. Other language folks need not worry.- Parameters:
name- property name- Returns:
- an string copy of the option value, or null if the option doesn't exist.
-
getPropertyAsDouble
double getPropertyAsDouble(java.lang.String name)
Gets the value of this property, and returns as a double;- Parameters:
name- name of option- Returns:
- double value of property, or 0 on error.
-
getPropertyAsLong
long getPropertyAsLong(java.lang.String name)
Gets the value of this property, and returns as an long;- Parameters:
name- name of option- Returns:
- long value of property, or 0 on error.
-
getPropertyAsRational
IRational getPropertyAsRational(java.lang.String name)
Gets the value of this property, and returns as an IRational;- Parameters:
name- name of option- Returns:
- long value of property, or 0 on error.
-
getPropertyAsBoolean
boolean getPropertyAsBoolean(java.lang.String name)
Gets the value of this property, and returns as a boolean- Parameters:
name- name of option- Returns:
- boolean value of property, or false on error.
-
setProperty
int setProperty(IMetaData valuesToSet, IMetaData valuesNotFound)
Sets all properties in valuesToSet on thisIConfigurableobject.- Parameters:
valuesToSet- The set of key-value pairs to try to setvaluesNotFound- If non null will contain all key-values pairs in valuesToSet that were not found in context.- Returns:
- 0 on success; <0 on failure
- Since:
- 5.0
-
-