public class

StatsLogReport

extends Object
java.lang.Object
   ↳ org.opencdnunion.media.streamer.logstats.StatsLogReport

Class Overview

Stats log reporter.

Summary

Nested Classes
interface StatsLogReport.OnLogEventListener 日志上报回调  
Public Methods
void estBitrateRaise(int currentBitrate, long estimateBandWidth)
UNION_STREAMER_EST_BW_DROP
boolean getEnableDebugLog()
返回是否允许debuglog输出
static StatsLogReport getInstance()
void initLogReport(Context context)
初始化monitor的日志库 不调用这个接口日志模块无法完成初始化 若不使用kit类,需要在初始化时调用,
boolean isPermitLogReport()
返回是否允许上报
void setAudioEncodeProfile(int audioEncodeProfile)
void setAutoAdjustVideoBitrate(boolean adjustBitrate)
是否允许码率自适应,默认为true 相当于kit类的setVideoBitrate接口 如果不使用kit类,第三方开发者需要调用该类
void setBwEstStrategy(int bwEstStrategy)
synchronized void setContext(Context context)
ContextUtil.getContext()在非ui线程调用时,在某些Android系统版本,比如API15会返回null 构造函数里面,若构造函数中未拿到,则通过该方法设置Context
void setEnableDebugLog(boolean enableDebugLog)
设置是否允许debuglog输出
void setEncodeFormat(int encodeFormat)
void setIsFrontCameraMirror(boolean isFrontCameraMirror)
是否允许前置摄像头镜像,默认值是false 相当于kit类的setFrontCameraMirror接口 如果不使用kit类,第三方开发者需要调用该类
void setOnLogEventListener(StatsLogReport.OnLogEventListener logEventListener)
日志上报回调 用于给第三方开发者提供日志信息
void setTargetResolution(int presetWidth, int presetHeight)
推流分辨率,默认值是0 相当于kit类的setTargetResolution接口 如果不使用kit类,需要第三方开发者调用该接口
void setVideoEncodeProfile(int videoEncodeProfile)
void setVideoEncodeScence(int videoEncodeScence)
void startRecordSuccess()
void startStream(String url, String streamId)
推流开始时调用,初始化LogClient
void startStreamSuccess()
推流成功 该上报不受用户限制
void stopRecord()
void stopStream()
停止推流上报 被迫停止和主动停止都需要调用这个接口
void updateAudioFilterType(String... types)
void updateBeautyType(String... types)
void updateFunctionPoint(String type)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public void estBitrateRaise (int currentBitrate, long estimateBandWidth)

UNION_STREAMER_EST_BW_DROP

Parameters
currentBitrate 当前码率
estimateBandWidth 带宽

public boolean getEnableDebugLog ()

返回是否允许debuglog输出

Returns
  • true 允许 false 不允许

public static StatsLogReport getInstance ()

public void initLogReport (Context context)

初始化monitor的日志库 不调用这个接口日志模块无法完成初始化 若不使用kit类,需要在初始化时调用,

Parameters
context 用于初始化日志创建SQLiteOpenHelper、获取设备信息,SharedPreferences

public boolean isPermitLogReport ()

返回是否允许上报

Returns
  • true 允许 false 不允许

public void setAudioEncodeProfile (int audioEncodeProfile)

public void setAutoAdjustVideoBitrate (boolean adjustBitrate)

是否允许码率自适应,默认为true 相当于kit类的setVideoBitrate接口 如果不使用kit类,第三方开发者需要调用该类

public void setBwEstStrategy (int bwEstStrategy)

public synchronized void setContext (Context context)

ContextUtil.getContext()在非ui线程调用时,在某些Android系统版本,比如API15会返回null 构造函数里面,若构造函数中未拿到,则通过该方法设置Context

public void setEnableDebugLog (boolean enableDebugLog)

设置是否允许debuglog输出

public void setEncodeFormat (int encodeFormat)

public void setIsFrontCameraMirror (boolean isFrontCameraMirror)

是否允许前置摄像头镜像,默认值是false 相当于kit类的setFrontCameraMirror接口 如果不使用kit类,第三方开发者需要调用该类

public void setOnLogEventListener (StatsLogReport.OnLogEventListener logEventListener)

日志上报回调 用于给第三方开发者提供日志信息

public void setTargetResolution (int presetWidth, int presetHeight)

推流分辨率,默认值是0 相当于kit类的setTargetResolution接口 如果不使用kit类,需要第三方开发者调用该接口

public void setVideoEncodeProfile (int videoEncodeProfile)

public void setVideoEncodeScence (int videoEncodeScence)

public void startRecordSuccess ()

public void startStream (String url, String streamId)

推流开始时调用,初始化LogClient

public void startStreamSuccess ()

推流成功 该上报不受用户限制

public void stopRecord ()

public void stopStream ()

停止推流上报 被迫停止和主动停止都需要调用这个接口

public void updateAudioFilterType (String... types)

public void updateBeautyType (String... types)

public void updateFunctionPoint (String type)