public class DefaultCodeRateByFrame extends java.lang.Object implements ICodeRateByFrame
| Modifier and Type | Field and Description |
|---|---|
protected int |
mConfigCodeRate |
protected int |
mConfigFrameRate |
protected int |
mCurrentCodeRate |
protected int |
mCurrentCodeRatePerFrame |
protected int |
mCurrentFrameRate |
protected int |
mLastSuggestCodeRate |
protected int |
mNotifyStep |
protected float |
mRatio |
protected int |
mSuggestCodeRate |
| Constructor and Description |
|---|
DefaultCodeRateByFrame() |
| Modifier and Type | Method and Description |
|---|---|
int |
getSuggestCodeRate()
建议的码率
|
void |
init(int configCodeRate,
int configFrameRate,
int notifyStep,
android.os.Handler handler)
初始化参数,设置新的编码器后要重新初始化
|
void |
publishCurrentFrameRate(int currentFrameRate,
int currentCodeRate)
设置当前码率帧率
|
void |
publishNetworkCodeRate(int networkCodeRate)
设置sdk网络计算预测的码率
|
void |
release()
开播结束/切换开播清晰度时调用
|
protected int mConfigCodeRate
protected int mConfigFrameRate
protected int mNotifyStep
protected int mSuggestCodeRate
protected int mCurrentFrameRate
protected int mCurrentCodeRate
protected int mCurrentCodeRatePerFrame
protected int mLastSuggestCodeRate
protected float mRatio
public void init(int configCodeRate,
int configFrameRate,
int notifyStep,
android.os.Handler handler)
ICodeRateByFrameinit in interface ICodeRateByFramepublic void publishCurrentFrameRate(int currentFrameRate,
int currentCodeRate)
ICodeRateByFramepublishCurrentFrameRate in interface ICodeRateByFramepublic void publishNetworkCodeRate(int networkCodeRate)
ICodeRateByFramepublishNetworkCodeRate in interface ICodeRateByFramepublic int getSuggestCodeRate()
ICodeRateByFramegetSuggestCodeRate in interface ICodeRateByFramepublic void release()
ICodeRateByFramerelease in interface ICodeRateByFrame