public class AVOptions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_BUFFER_TIME
The buffering time, default value: 3000
|
static java.lang.String |
KEY_CACHE_BUFFER_DURATION
Cache duration, the cached buffer can reduce the minibreak when network jitter
|
static java.lang.String |
KEY_DELAY_OPTIMIZATION
Whether enable the delay optimization
|
static java.lang.String |
KEY_FFLAGS
Deprecated.
no need to set this option
|
static java.lang.String |
KEY_GET_AV_FRAME_TIMEOUT
Timeout for read av frame, default value: 10 * 1000
|
static java.lang.String |
KEY_LIVE_STREAMING
Whether playing a live streaming
|
static java.lang.String |
KEY_MAX_CACHE_BUFFER_DURATION
Max cache duration, if cached duration greater than this, "delay optimization" will start.
|
static java.lang.String |
KEY_MEDIACODEC
Whether enable the hardware decode
|
static java.lang.String |
KEY_PREPARE_TIMEOUT
Timeout for the prepare procedure
|
static java.lang.String |
KEY_START_ON_PREPARED
If set 1, the play will start automatically after prepared
|
static java.lang.String |
VALUE_FFLAGS_NOBUFFER
Deprecated.
no need to set this option
|
Constructor and Description |
---|
AVOptions()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.String name)
Returns true if a key of the given name exists in the format.
|
float |
getFloat(java.lang.String name)
Returns the value of a float key.
|
int |
getInteger(java.lang.String name)
Returns the value of an integer key.
|
int |
getInteger(java.lang.String name,
int defaultValue)
Returns the value of an integer key, or the default value if the
key is missing or is for another type value.
|
long |
getLong(java.lang.String name)
Returns the value of a long key.
|
java.util.Map<java.lang.String,java.lang.Object> |
getMap()
Gets the params map.
|
java.lang.String |
getString(java.lang.String name)
Returns the value of a string key.
|
void |
setFloat(java.lang.String name,
float value)
Sets the value of a float key.
|
void |
setInteger(java.lang.String name,
int value)
Sets the value of an integer key.
|
void |
setLong(java.lang.String name,
long value)
Sets the value of a long key.
|
void |
setString(java.lang.String name,
java.lang.String value)
Sets the value of a string key.
|
public static final java.lang.String KEY_BUFFER_TIME
The buffering time, default value: 3000
take effect only if playing rtmp live stream
the unit of timeout is ms
public static final java.lang.String KEY_START_ON_PREPARED
If set 1, the play will start automatically after prepared
default value is 1
public static final java.lang.String KEY_PREPARE_TIMEOUT
Timeout for the prepare procedure
take effect only if playing live stream
the unit of timeout is ms
public static final java.lang.String KEY_GET_AV_FRAME_TIMEOUT
Timeout for read av frame, default value: 10 * 1000
take effect only if playing live stream
the unit of timeout is ms
public static final java.lang.String KEY_LIVE_STREAMING
Whether playing a live streaming
some optimization with buffering mechanism when be set to 1
take effect only if playing rtmp live stream
public static final java.lang.String KEY_MEDIACODEC
Whether enable the hardware decode
1 - HW decode enable, 0 - disable [default]
public static final java.lang.String KEY_DELAY_OPTIMIZATION
Take effect only if playing live stream
1 - enabled [default] , 0 - disabled
public static final java.lang.String KEY_CACHE_BUFFER_DURATION
Cache duration, the cached buffer can reduce the minibreak when network jitter
take effect only if playing live stream and the "delay optimization" enabled
default value: 2000, [1000, 60 * 1000]
the unit of timeout is ms
public static final java.lang.String KEY_MAX_CACHE_BUFFER_DURATION
Max cache duration, if cached duration greater than this, "delay optimization" will start.
take effect only if playing live stream and the "delay optimization" enabled
default value: 4000, [1000, 60 * 1000]
the unit of timeout is ms
public static final java.lang.String KEY_FFLAGS
public static final java.lang.String VALUE_FFLAGS_NOBUFFER
public final boolean containsKey(java.lang.String name)
name
- the namepublic final int getInteger(java.lang.String name)
name
- the namepublic final int getInteger(java.lang.String name, int defaultValue)
name
- the namedefaultValue
- the default valuepublic final long getLong(java.lang.String name)
name
- the namepublic final float getFloat(java.lang.String name)
name
- the namepublic final java.lang.String getString(java.lang.String name)
name
- the namepublic final void setInteger(java.lang.String name, int value)
name
- the namevalue
- the valuepublic final void setLong(java.lang.String name, long value)
name
- the namevalue
- the valuepublic final void setFloat(java.lang.String name, float value)
name
- the namevalue
- the valuepublic final void setString(java.lang.String name, java.lang.String value)
name
- the namevalue
- the valuepublic java.util.Map<java.lang.String,java.lang.Object> getMap()