public class AdjustFrameRateModify extends java.lang.Object implements IFrameRateModify
| Modifier and Type | Field and Description |
|---|---|
protected static int |
FRAMERATE_FLOOR |
protected int |
mConfigCodeRate |
protected int |
mConfigFrameRate |
protected ResolutionModifyConfig |
mCurrentConfig |
protected int |
mIdx |
protected long |
mLastTimestampNanos |
protected java.util.List<ResolutionModifyConfig> |
mModifyConfigList |
protected int |
mNetworkCodeRate |
protected float |
mNewFrameRate |
protected long |
mStepNanos |
protected static long |
ONE_SECOND |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
AdjustFrameRateModify() |
| Modifier and Type | Method and Description |
|---|---|
protected ResolutionModifyConfig |
findConfigFromIdx(int idx) |
protected ResolutionModifyConfig |
findConfigFromWH(int width,
int height,
int codeRate) |
int |
findConfigIdx(int width,
int height,
int codeRate) |
float |
getLastFrameRate() |
void |
init(int configFrameRate,
int configCodeRate,
int width,
int height,
java.util.List<ResolutionModifyConfig> modifyConfigList) |
boolean |
onInterceptDoFrame(long timeStampNanos)
是否拦截当前摄像头的帧
|
void |
publishCurrentFrameRate(int currentFrameRate)
当前帧率更新时调用
|
void |
publishCurrentResolution(int width,
int height,
int codeRate)
当前分辨率更新时调用
|
void |
publishNetworkCodeRate(int networkCodeRate)
网络码率通知时调用
|
void |
release()
开播结束/切换开播清晰度时调用
|
void |
setLastFrameRate(float newFrameRate) |
public static final java.lang.String TAG
protected static final long ONE_SECOND
protected static final int FRAMERATE_FLOOR
protected long mLastTimestampNanos
protected long mStepNanos
protected int mConfigFrameRate
protected int mConfigCodeRate
protected int mNetworkCodeRate
protected int mIdx
protected float mNewFrameRate
protected java.util.List<ResolutionModifyConfig> mModifyConfigList
protected ResolutionModifyConfig mCurrentConfig
public void init(int configFrameRate,
int configCodeRate,
int width,
int height,
java.util.List<ResolutionModifyConfig> modifyConfigList)
throws ResolutionModifyNotFoundException
configFrameRate - configCodeRate - modifyConfigList - ResolutionModifyNotFoundExceptionpublic boolean onInterceptDoFrame(long timeStampNanos)
IFrameRateModifyonInterceptDoFrame in interface IFrameRateModifypublic void publishNetworkCodeRate(int networkCodeRate)
IFrameRateModifypublishNetworkCodeRate in interface IFrameRateModifypublic void publishCurrentFrameRate(int currentFrameRate)
IFrameRateModifypublishCurrentFrameRate in interface IFrameRateModifypublic void publishCurrentResolution(int width,
int height,
int codeRate)
IFrameRateModifypublishCurrentResolution in interface IFrameRateModifyprotected ResolutionModifyConfig findConfigFromIdx(int idx)
protected ResolutionModifyConfig findConfigFromWH(int width, int height, int codeRate)
public int findConfigIdx(int width,
int height,
int codeRate)
throws ResolutionModifyNotFoundException
public void release()
IFrameRateModifyrelease in interface IFrameRateModifypublic float getLastFrameRate()
getLastFrameRate in interface IFrameRateModifypublic void setLastFrameRate(float newFrameRate)
setLastFrameRate in interface IFrameRateModify