AliVCSDK 6.17.0
阿里云音视频SDK,为视频开发者提供一站式接入服务
 
Loading...
Searching...
No Matches
com.alivc.live.pusher.AlivcLivePushConfig Class Reference

「Main API」Live push config More...

Inheritance diagram for com.alivc.live.pusher.AlivcLivePushConfig:

Public Member Functions

int getVideoFormat ()
 
void setVideoFormat (int videoFormat)
 
int getAudioFormat ()
 
void setAudioFormat (int audioFormat)
 
void setLivePushMode (AlivcLiveMode pushMode)
 
AlivcLiveMode getLivePushMode ()
 
AlivcLivePushVideoConfig getVideoConfig ()
 
void setVideoConfig (AlivcLivePushVideoConfig videoConfig)
 
AlivcResolutionEnum getResolution ()
 
void setResolution (AlivcResolutionEnum resolution)
 
String getExtraInfo ()
 
void setExtraInfo (String extraInfo)
 
String getUserName ()
 
void setUserName (String userName)
 
HashMap< String, String > getExtras ()
 
void setExtras (HashMap< String, String > extras)
 
boolean isH5CompatibleMode ()
 
void setH5CompatibleMode (boolean h5CompatibleMode)
 
boolean isEnableDataChannelMessage ()
 
void setEnableDataChannelMessage (boolean enableDataChannelMessage)
 
boolean isEnableRemoteVideoFrameCallback ()
 
void setEnableRemoteVideoFrameCallback (boolean enable)
 
AlivcLiveCameraCaptureOutputPreference getCameraCaptureOutputPreference ()
 
void setCameraCaptureOutputPreference (AlivcLiveCameraCaptureOutputPreference cameraCaptureOutputPreference)
 
AlivcLivePushMonitorLevel getMonitorLevel ()
 
void setMonitorLevel (AlivcLivePushMonitorLevel monitorLevel)
 
int getFps ()
 
void setFps (AlivcFpsEnum fps)
 
int getTargetVideoBitrate ()
 
void setTargetVideoBitrate (int targetBitRate)
 
int getMinVideoBitrate ()
 
void setMinVideoBitrate (int minBitrate)
 
int getBFrames ()
 
void setBFrames (int bFrame)
 
AlivcAudioSampleRateEnum getAudioSampleRate ()
 
void setAudioSampleRate (AlivcAudioSampleRateEnum audioSample)
 
int getPreviewOrientation ()
 
void setPreviewOrientation (AlivcPreviewOrientationEnum previewOrientation)
 
int getPreviewRotation ()
 
void setPreviewRotation (AlivcPreviewRotationEnum rotation)
 
int getCameraType ()
 
void setCameraType (AlivcLivePushCameraTypeEnum cameraType)
 
boolean isPreviewMirror ()
 
void setPreviewMirror (boolean mirror)
 
boolean isAudioOnly ()
 
void setAudioOnly (boolean audioOnly)
 
boolean isVideoOnly ()
 
void setVideoOnly (boolean videoOnly)
 
boolean isAutoFocus ()
 
void setAutoFocus (boolean autoFocus)
 
boolean isFocusBySensor ()
 
void setFocusBySensor (boolean focusBySensor)
 
boolean isFlash ()
 
void setFlash (boolean flash)
 
int getSendDataTimeout ()
 
void setSendDataTimeout (int sendDataTimeout)
 
String getPausePushImage ()
 
void setPausePushImage (String path)
 
String getNetworkPoorPushImage ()
 
void setNetworkPoorPushImage (String path)
 
int getInitialVideoBitrate ()
 
void setInitialVideoBitrate (int initialVideoBitrate)
 
int getConnectRetryCount ()
 
void setConnectRetryCount (int connectRetryCount)
 
int getConnectRetryInterval ()
 
void setConnectRetryInterval (int connectRetryInterval)
 
boolean isPushMirror ()
 
void setPushMirror (boolean pushMirror)
 
AlivcEncodeModeEnum getVideoEncodeMode ()
 
void setVideoEncodeMode (AlivcEncodeModeEnum videoEncodeMode)
 
AlivcEncodeType getVideoEncodeType ()
 
void setVideoEncodeType (AlivcEncodeType videoEncodeType)
 
AlivcEncodeModeEnum getAudioEncodeMode ()
 
void setAudioEncodeMode (AlivcEncodeModeEnum audioEncodeMode)
 
int getWidth ()
 
int getHeight ()
 
int getAudioChannels ()
 
void setAudioChannels (AlivcAudioChannelEnum audioChannels)
 
int getVideoEncodeGop ()
 
void setVideoEncodeGop (AlivcVideoEncodeGopEnum videoEncodeGop)
 
boolean isEnableVideoCodecDowngrade ()
 
void setEnableVideoCodecDowngrade (boolean enableVideoCodecDowngrade)
 
int getExposure ()
 
void setExposure (int exposure)
 
void setUseAliPlayerForBGM (boolean useAliPlayerForBGM)
 
boolean useAliPlayerForBGM ()
 
void setEnableNarrowbandHDForScreenPusher (boolean enable)
 
boolean isEnableNarrowbandHDForScreenPusher ()
 
boolean isEnableRTSForInteractiveMode ()
 
void setEnableRTSForInteractiveMode (boolean enableRTSForInteractiveMode)
 
int getMinFps ()
 
void setMinFps (AlivcFpsEnum minFps)
 
AlivcLiveAudioCodecType getAudioCodecType ()
 
void setAudioCodecType (AlivcLiveAudioCodecType audioCodecType)
 
AlivcAudioAACProfileEnum getAudioProfile ()
 
void setAudioProfile (AlivcAudioAACProfileEnum audioProfile)
 
int getAudioBitRate ()
 
void setAudioBitRate (int audioBitRate)
 
AlivcAudioSceneModeEnum getAudioSceneMode ()
 
void setAudioSceneMode (AlivcAudioSceneModeEnum audioSceneMode)
 
void setQualityMode (AlivcQualityModeEnum quality)
 
AlivcQualityModeEnum getQualityMode ()
 
Intent getMediaProjectionPermissionResultData ()
 
boolean isEnableBitrateControl ()
 
void setEnableBitrateControl (boolean enableBitrateControl)
 
boolean isEnableAutoResolution ()
 
void setEnableAutoResolution (boolean enableAutoResolution)
 
boolean isExternMainStream ()
 
void setExternMainStream (boolean externMainStream)
 
void setExternMainStream (boolean externMainStream, AlivcImageFormat imageFormat, AlivcSoundFormat soundFormat)
 
AlivcImageFormat getAlivcExternMainImageFormat ()
 
void setAlivcExternMainImageFormat (AlivcImageFormat alivcExternMainImageFormat)
 
AlivcSoundFormat getAlivcExternMainSoundFormat ()
 
void setAlivcExternMainSoundFormat (AlivcSoundFormat soundFormat)
 
AlivcPreviewDisplayMode getPreviewDisplayMode ()
 
void setPreviewDisplayMode (AlivcPreviewDisplayMode displayMode)
 
void setRequireRenderContextNotify (boolean enable)
 
boolean getRequireRenderContextNotify ()
 
void setAudioCaptureWithoutMix (boolean on)
 
boolean getAudioCaptureWithoutMix ()
 
void addWaterMark (String path, float x, float y, float width)
 
void clearWaterMark ()
 
void removeWaterMark (String path)
 
ArrayList< WaterMarkInfogetWaterMarkInfos ()
 
String toString ()
 

Static Public Member Functions

static void setMediaProjectionPermissionResultData (Intent mediaProjectionPermissionResultData)
 

Static Public Attributes

static final String CONFIG = "AlivcLivePushConfig"
 

Detailed Description

「Main API」Live push config

Author
aliyun live push sdk
Call Example
mAlivcLivePusher.init(context, mAlivcLivePushConfig);
See also
com.alivc.live.pusher.AlivcLivePusher::init(android.content.Context, com.alivc.live.pusher.AlivcLivePushConfig)

Definition at line 46 of file AlivcLivePushConfig.java.

Constructor & Destructor Documentation

◆ AlivcLivePushConfig()

com.alivc.live.pusher.AlivcLivePushConfig.AlivcLivePushConfig ( )

Definition at line 144 of file AlivcLivePushConfig.java.

Member Function Documentation

◆ addWaterMark()

void com.alivc.live.pusher.AlivcLivePushConfig.addWaterMark ( String  path,
float  x,
float  y,
float  width 
)

Add water mark

start position: [0,width) y[0,height),w(0,width], max count: 3

Parameters
pathwater mark path
xx 0~1
yy 0~1
widthwidth 0~1
Deprecated:

use com.alivc.live.pusher.AlivcLivePusher#addWaterMark(String, float, float, float) instead

use com.alivc.live.pusher.AlivcLivePusher#addWaterMark(Bitmap, float, float, float) instead

Definition at line 1572 of file AlivcLivePushConfig.java.

◆ clearWaterMark()

void com.alivc.live.pusher.AlivcLivePushConfig.clearWaterMark ( )

Remove all the water marks

Definition at line 1587 of file AlivcLivePushConfig.java.

◆ getAlivcExternMainImageFormat()

AlivcImageFormat com.alivc.live.pusher.AlivcLivePushConfig.getAlivcExternMainImageFormat ( )

Get image format of external stream push

Default: IMAGE_FORMAT_YUV420P

Returns
image format
See also
com.alivc.live.pusher.AlivcImageFormat

Definition at line 1450 of file AlivcLivePushConfig.java.

◆ getAlivcExternMainSoundFormat()

AlivcSoundFormat com.alivc.live.pusher.AlivcLivePushConfig.getAlivcExternMainSoundFormat ( )

Get audio format of external stream push

Default: SOUND_FORMAT_S16

Returns
audio format
See also
com.alivc.live.pusher.AlivcSoundFormat

Definition at line 1473 of file AlivcLivePushConfig.java.

◆ getAudioBitRate()

int com.alivc.live.pusher.AlivcLivePushConfig.getAudioBitRate ( )

Get audio bitrate

Returns
audio bitrate
Note
Default: 64 * 1000, unit: bps

Definition at line 1269 of file AlivcLivePushConfig.java.

◆ getAudioCaptureWithoutMix()

boolean com.alivc.live.pusher.AlivcLivePushConfig.getAudioCaptureWithoutMix ( )

The status of audio capture without mix

Default: false, turn off

Returns
turn on or off

Definition at line 1555 of file AlivcLivePushConfig.java.

◆ getAudioChannels()

int com.alivc.live.pusher.AlivcLivePushConfig.getAudioChannels ( )

Get audio channels

Returns
audio channels
Attention
defaults to mono

Definition at line 1027 of file AlivcLivePushConfig.java.

◆ getAudioCodecType()

AlivcLiveAudioCodecType com.alivc.live.pusher.AlivcLivePushConfig.getAudioCodecType ( )

Get audio codec type

Returns
audio codec type
Note
Now can only support interactive mode

Definition at line 1225 of file AlivcLivePushConfig.java.

◆ getAudioEncodeMode()

AlivcEncodeModeEnum com.alivc.live.pusher.AlivcLivePushConfig.getAudioEncodeMode ( )

Get audio encode mode

Default: software encode

Returns
audio encode mode
See also
com.alivc.live.pusher.AlivcEncodeModeEnum

Definition at line 987 of file AlivcLivePushConfig.java.

◆ getAudioFormat()

int com.alivc.live.pusher.AlivcLivePushConfig.getAudioFormat ( )

Definition at line 161 of file AlivcLivePushConfig.java.

◆ getAudioProfile()

AlivcAudioAACProfileEnum com.alivc.live.pusher.AlivcLivePushConfig.getAudioProfile ( )

Get audio profile

Default: AAC_LC

Returns
audio profile
See also
com.alivc.live.pusher.AlivcAudioAACProfileEnum

Definition at line 1247 of file AlivcLivePushConfig.java.

◆ getAudioSampleRate()

AlivcAudioSampleRateEnum com.alivc.live.pusher.AlivcLivePushConfig.getAudioSampleRate ( )

Get push audio sample rate

Default: 48k

Returns
audio sample rate
See also
com.alivc.live.pusher.AlivcAudioSampleRateEnum

Definition at line 554 of file AlivcLivePushConfig.java.

◆ getAudioSceneMode()

AlivcAudioSceneModeEnum com.alivc.live.pusher.AlivcLivePushConfig.getAudioSceneMode ( )

Get audio scene mode

Default: MUSIC_MODE MEDIA_MODE: Optimization of media sound scene and noise reduction MUSIC_MODE: Set the background sound scene, high fidelity optimization

Returns
audio scene mode
See also
com.alivc.live.pusher.AlivcAudioSceneModeEnum

Definition at line 1293 of file AlivcLivePushConfig.java.

◆ getBFrames()

int com.alivc.live.pusher.AlivcLivePushConfig.getBFrames ( )

Get the number of B-Frames

Default: 0

Returns
B-Frames number

Definition at line 531 of file AlivcLivePushConfig.java.

◆ getCameraCaptureOutputPreference()

AlivcLiveCameraCaptureOutputPreference com.alivc.live.pusher.AlivcLivePushConfig.getCameraCaptureOutputPreference ( )

Get camera capture output preference

Returns
camera capture output preference
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.
Note
Default: PREVIEW
The live streaming connected microphone scene is different from the default call scene of RTC SDK. The live streaming connected microphone defaults to high-definition preview

Definition at line 403 of file AlivcLivePushConfig.java.

◆ getCameraType()

int com.alivc.live.pusher.AlivcLivePushConfig.getCameraType ( )

Get push camera type

Default: front

Returns
push camera type

Definition at line 627 of file AlivcLivePushConfig.java.

◆ getConnectRetryCount()

int com.alivc.live.pusher.AlivcLivePushConfig.getConnectRetryCount ( )

Get connect retry count

Default: 5

Returns
connect retry count

Definition at line 872 of file AlivcLivePushConfig.java.

◆ getConnectRetryInterval()

int com.alivc.live.pusher.AlivcLivePushConfig.getConnectRetryInterval ( )

Get connect retry interval

Default: 1000ms

Returns
connect retry interval, millisecond

Definition at line 894 of file AlivcLivePushConfig.java.

◆ getExposure()

int com.alivc.live.pusher.AlivcLivePushConfig.getExposure ( )

Get camera exposure

Range: [0,100]

Default: 0

Returns
camera exposure

Definition at line 1102 of file AlivcLivePushConfig.java.

◆ getExtraInfo()

String com.alivc.live.pusher.AlivcLivePushConfig.getExtraInfo ( )

Get extra info

Returns
extra info

Definition at line 285 of file AlivcLivePushConfig.java.

◆ getExtras()

HashMap< String, String > com.alivc.live.pusher.AlivcLivePushConfig.getExtras ( )

Obtain the RTC extra information field for RTC engine initialization

Returns
RTC extra information field
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 314 of file AlivcLivePushConfig.java.

◆ getFps()

int com.alivc.live.pusher.AlivcLivePushConfig.getFps ( )

Get push video capture fps

Returns
video capture fps

Definition at line 449 of file AlivcLivePushConfig.java.

◆ getHeight()

int com.alivc.live.pusher.AlivcLivePushConfig.getHeight ( )

Get video height

Returns
video height

Definition at line 1017 of file AlivcLivePushConfig.java.

◆ getInitialVideoBitrate()

int com.alivc.live.pusher.AlivcLivePushConfig.getInitialVideoBitrate ( )

Get initial video encode bitrate

Returns
initial video encode bitrate

Definition at line 846 of file AlivcLivePushConfig.java.

◆ getLivePushMode()

AlivcLiveMode com.alivc.live.pusher.AlivcLivePushConfig.getLivePushMode ( )

Get push mode

Returns
push mode
See also
com.alivc.live.annotations.AlivcLiveMode

Definition at line 193 of file AlivcLivePushConfig.java.

◆ getMediaProjectionPermissionResultData()

Intent com.alivc.live.pusher.AlivcLivePushConfig.getMediaProjectionPermissionResultData ( )

Get screen capture intent from system

Returns
screen capture intent from system
Note
Can not support internal recording currently

Definition at line 1341 of file AlivcLivePushConfig.java.

◆ getMinFps()

int com.alivc.live.pusher.AlivcLivePushConfig.getMinFps ( )

Get min fps

Default: 8

Returns
min fps
See also
com.alivc.live.pusher.AlivcFpsEnum

Definition at line 1203 of file AlivcLivePushConfig.java.

◆ getMinVideoBitrate()

int com.alivc.live.pusher.AlivcLivePushConfig.getMinVideoBitrate ( )

Get min video encode bitrate

Returns
min video encode bitrate

Definition at line 502 of file AlivcLivePushConfig.java.

◆ getMonitorLevel()

AlivcLivePushMonitorLevel com.alivc.live.pusher.AlivcLivePushConfig.getMonitorLevel ( )

Get SDK monitor level

Returns
monitor level
Note
Default: ALL
See also
com.alivc.live.pusher.AlivcLivePushMonitorLevel

Definition at line 426 of file AlivcLivePushConfig.java.

◆ getNetworkPoorPushImage()

String com.alivc.live.pusher.AlivcLivePushConfig.getNetworkPoorPushImage ( )

Get path for the network poor image

Returns
network poor image path(sdcard path)
Note
recommend: png

Definition at line 826 of file AlivcLivePushConfig.java.

◆ getPausePushImage()

String com.alivc.live.pusher.AlivcLivePushConfig.getPausePushImage ( )

Get path for the pause push image

Returns
pause push image path(sdcard path)
Note
recommend: png

Definition at line 805 of file AlivcLivePushConfig.java.

◆ getPreviewDisplayMode()

AlivcPreviewDisplayMode com.alivc.live.pusher.AlivcLivePushConfig.getPreviewDisplayMode ( )

Get preview display mode

Default: ASPECT_FILL

Returns
preview display mode
See also
com.alivc.live.pusher.AlivcPreviewDisplayMode

Definition at line 1497 of file AlivcLivePushConfig.java.

◆ getPreviewOrientation()

int com.alivc.live.pusher.AlivcLivePushConfig.getPreviewOrientation ( )

Get push preview orientation

Default: portrait

Returns
push preview orientation

Definition at line 577 of file AlivcLivePushConfig.java.

◆ getPreviewRotation()

int com.alivc.live.pusher.AlivcLivePushConfig.getPreviewRotation ( )

Get preview rotation

This api is provided for the non-standard Android box

Default: 0

Returns
preview rotation

Definition at line 602 of file AlivcLivePushConfig.java.

◆ getQualityMode()

AlivcQualityModeEnum com.alivc.live.pusher.AlivcLivePushConfig.getQualityMode ( )

Get video quality mode

Default: RESOLUTION_FIRST

Returns
video quality mode
See also
com.alivc.live.pusher.AlivcQualityModeEnum

Definition at line 1331 of file AlivcLivePushConfig.java.

◆ getRequireRenderContextNotify()

boolean com.alivc.live.pusher.AlivcLivePushConfig.getRequireRenderContextNotify ( )

The status of the notify of OpenGL render context

Default: false, turn off

Returns
turn on or off
See also
com.alivc.live.pusher.AlivcLivePusherRenderContextListener

Definition at line 1533 of file AlivcLivePushConfig.java.

◆ getResolution()

AlivcResolutionEnum com.alivc.live.pusher.AlivcLivePushConfig.getResolution ( )

Get push resolution

Default: 540p

Returns
push resolution
See also
com.alivc.live.pusher.AlivcResolutionEnum

Definition at line 248 of file AlivcLivePushConfig.java.

◆ getSendDataTimeout()

int com.alivc.live.pusher.AlivcLivePushConfig.getSendDataTimeout ( )

Get RTMP send data timeout

Default: 3000ms

Returns
send timeout, millisecond

Definition at line 784 of file AlivcLivePushConfig.java.

◆ getTargetVideoBitrate()

int com.alivc.live.pusher.AlivcLivePushConfig.getTargetVideoBitrate ( )

Get target video encode bitrate

Returns
target video encode bitrate

Definition at line 475 of file AlivcLivePushConfig.java.

◆ getUserName()

String com.alivc.live.pusher.AlivcLivePushConfig.getUserName ( )

Definition at line 300 of file AlivcLivePushConfig.java.

◆ getVideoConfig()

AlivcLivePushVideoConfig com.alivc.live.pusher.AlivcLivePushConfig.getVideoConfig ( )

Get video configuration

Returns
video configuration

Definition at line 206 of file AlivcLivePushConfig.java.

◆ getVideoEncodeGop()

int com.alivc.live.pusher.AlivcLivePushConfig.getVideoEncodeGop ( )

Get video encode gop

Default: 2s

Returns
video encode gop, seconds

Definition at line 1048 of file AlivcLivePushConfig.java.

◆ getVideoEncodeMode()

AlivcEncodeModeEnum com.alivc.live.pusher.AlivcLivePushConfig.getVideoEncodeMode ( )

Get video encode mode

Default: hardware encode

Returns
video encode mode
See also
com.alivc.live.pusher.AlivcEncodeModeEnum

Definition at line 939 of file AlivcLivePushConfig.java.

◆ getVideoEncodeType()

AlivcEncodeType com.alivc.live.pusher.AlivcLivePushConfig.getVideoEncodeType ( )

Get video encode type

Default: H264

Returns
video encode type
See also
com.alivc.live.pusher.AlivcEncodeType

Definition at line 963 of file AlivcLivePushConfig.java.

◆ getVideoFormat()

int com.alivc.live.pusher.AlivcLivePushConfig.getVideoFormat ( )

Definition at line 153 of file AlivcLivePushConfig.java.

◆ getWaterMarkInfos()

ArrayList< WaterMarkInfo > com.alivc.live.pusher.AlivcLivePushConfig.getWaterMarkInfos ( )

Get array of water marks

Returns
all the water marks info
See also
com.alivc.live.pusher.WaterMarkInfo

Definition at line 1612 of file AlivcLivePushConfig.java.

◆ getWidth()

int com.alivc.live.pusher.AlivcLivePushConfig.getWidth ( )

Get video width

Returns
video width

Definition at line 1008 of file AlivcLivePushConfig.java.

◆ isAudioOnly()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isAudioOnly ( )

Get push audio only

Default: false

Returns
audio only

Definition at line 672 of file AlivcLivePushConfig.java.

◆ isAutoFocus()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isAutoFocus ( )

Get camera auto focus

Default: true

Returns
camera auto focus

Definition at line 716 of file AlivcLivePushConfig.java.

◆ isEnableAutoResolution()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableAutoResolution ( )

The status of auto resolution

Default: false, close auto resolution

Returns
auto resolution

Definition at line 1384 of file AlivcLivePushConfig.java.

◆ isEnableBitrateControl()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableBitrateControl ( )

The status of bitrate control

Default: true, open bitrate control

Returns
bitrate control

Definition at line 1362 of file AlivcLivePushConfig.java.

◆ isEnableDataChannelMessage()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableDataChannelMessage ( )

Is enable Data Channel custom message channels or not

Returns
true->enable, false->disabled
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 361 of file AlivcLivePushConfig.java.

◆ isEnableNarrowbandHDForScreenPusher()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableNarrowbandHDForScreenPusher ( )

Get the status of narrowband HD when using screen pusher

Lower bandwidth, higher clarity

Default: true

Returns
turn on or off

Definition at line 1171 of file AlivcLivePushConfig.java.

◆ isEnableRemoteVideoFrameCallback()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableRemoteVideoFrameCallback ( )

Is remote video frame data callback enabled

Returns
turn on or off
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 381 of file AlivcLivePushConfig.java.

◆ isEnableRTSForInteractiveMode()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableRTSForInteractiveMode ( )

Whether to enable RTS push pull naked streaming in interactive mode (direct push & pull, different from co-streaming)

Returns
true->push pull naked streaming,false->co-streaming
Attention
This API is only supported in the interactive mode currently

Definition at line 1181 of file AlivcLivePushConfig.java.

◆ isEnableVideoCodecDowngrade()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isEnableVideoCodecDowngrade ( )

Allow video encoder degradation by default

Returns
true->allow,false->not allow
Note
When HEVC hardware encoding is set but the current device does not support it,
the SDK will automatically downgrade to H264. This switch can control the SDK not to automatically downgrade to H264
Now can only support interactive mode

Definition at line 1077 of file AlivcLivePushConfig.java.

◆ isExternMainStream()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isExternMainStream ( )

The status of external stream push

Default: false, close external stream push

Returns
external stream push flag

Definition at line 1406 of file AlivcLivePushConfig.java.

◆ isFlash()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isFlash ( )

Get status of the camera flash

Default: false, close camera flash

Returns
camera flash

Definition at line 762 of file AlivcLivePushConfig.java.

◆ isFocusBySensor()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isFocusBySensor ( )

Get focus by sensor

Default: false

Returns
sensor focus

Definition at line 738 of file AlivcLivePushConfig.java.

◆ isH5CompatibleMode()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isH5CompatibleMode ( )

Is it compatible with H5 (Connect and communicate with Web client)

Returns
true->compatible, false->not compatible
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 337 of file AlivcLivePushConfig.java.

◆ isPreviewMirror()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isPreviewMirror ( )

Get preview mirror

Default: false, preview not mirror

Returns
preview mirror

Definition at line 650 of file AlivcLivePushConfig.java.

◆ isPushMirror()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isPushMirror ( )

Get push mirror

Default: false

Returns
push mirror

Definition at line 916 of file AlivcLivePushConfig.java.

◆ isVideoOnly()

boolean com.alivc.live.pusher.AlivcLivePushConfig.isVideoOnly ( )

Get push video only

Default: false

Returns
video only

Definition at line 694 of file AlivcLivePushConfig.java.

◆ removeWaterMark()

void com.alivc.live.pusher.AlivcLivePushConfig.removeWaterMark ( String  path)

Remove water mark

Parameters
pathwater mark path

Definition at line 1597 of file AlivcLivePushConfig.java.

◆ setAlivcExternMainImageFormat()

void com.alivc.live.pusher.AlivcLivePushConfig.setAlivcExternMainImageFormat ( AlivcImageFormat  alivcExternMainImageFormat)

Set image format of external stream push

Default: IMAGE_FORMAT_YUV420P

See also
com.alivc.live.pusher.AlivcImageFormat

Definition at line 1461 of file AlivcLivePushConfig.java.

◆ setAlivcExternMainSoundFormat()

void com.alivc.live.pusher.AlivcLivePushConfig.setAlivcExternMainSoundFormat ( AlivcSoundFormat  soundFormat)

Set audio format of external stream push

Default: SOUND_FORMAT_S16

Parameters
soundFormataudio format
See also
com.alivc.live.pusher.AlivcSoundFormat

Definition at line 1485 of file AlivcLivePushConfig.java.

◆ setAudioBitRate()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioBitRate ( int  audioBitRate)

Set audio bitrate

Parameters
audioBitRateaudio bitrate
Note
Default: 64 * 1000, unit: bps

Definition at line 1279 of file AlivcLivePushConfig.java.

◆ setAudioCaptureWithoutMix()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioCaptureWithoutMix ( boolean  on)

Open audio capture without mix

Default: false, turn off

Parameters
onturn on or off

Definition at line 1544 of file AlivcLivePushConfig.java.

◆ setAudioChannels()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioChannels ( AlivcAudioChannelEnum  audioChannels)

Set audio channels

Parameters
audioChannelsaudio channels
Attention
defaults to mono

Definition at line 1037 of file AlivcLivePushConfig.java.

◆ setAudioCodecType()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioCodecType ( AlivcLiveAudioCodecType  audioCodecType)

Set audio codec type

Parameters
audioCodecTypeaudio codec type
Note
Now can only support interactive mode

Definition at line 1235 of file AlivcLivePushConfig.java.

◆ setAudioEncodeMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioEncodeMode ( AlivcEncodeModeEnum  audioEncodeMode)

Set audio encode mode

Default: software encode

Parameters
audioEncodeModeaudio encode mode
See also
com.alivc.live.pusher.AlivcEncodeModeEnum

Definition at line 999 of file AlivcLivePushConfig.java.

◆ setAudioFormat()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioFormat ( int  audioFormat)

Definition at line 165 of file AlivcLivePushConfig.java.

◆ setAudioOnly()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioOnly ( boolean  audioOnly)

Set push audio only

Default: false

Parameters
audioOnlyaudio only

Definition at line 683 of file AlivcLivePushConfig.java.

◆ setAudioProfile()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioProfile ( AlivcAudioAACProfileEnum  audioProfile)

Set audio profile

Default: AAC_LC

Parameters
audioProfileaudio profile
See also
com.alivc.live.pusher.AlivcAudioAACProfileEnum

Definition at line 1259 of file AlivcLivePushConfig.java.

◆ setAudioSampleRate()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioSampleRate ( AlivcAudioSampleRateEnum  audioSample)

Set push audio sample rate

Default: 48k

Parameters
audioSampleaudio sample rate
See also
com.alivc.live.pusher.AlivcAudioSampleRateEnum

Definition at line 566 of file AlivcLivePushConfig.java.

◆ setAudioSceneMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setAudioSceneMode ( AlivcAudioSceneModeEnum  audioSceneMode)

Set audio scene mode

Default: MUSIC_MODE MEDIA_MODE: Optimization of media sound scene and noise reduction MUSIC_MODE: Set the background sound scene, high fidelity optimization

Parameters
audioSceneModeaudio scene mode
See also
com.alivc.live.pusher.AlivcAudioSceneModeEnum

Definition at line 1307 of file AlivcLivePushConfig.java.

◆ setAutoFocus()

void com.alivc.live.pusher.AlivcLivePushConfig.setAutoFocus ( boolean  autoFocus)

Set camera auto focus

Default: true

Parameters
autoFocuscamera auto focus

Definition at line 727 of file AlivcLivePushConfig.java.

◆ setBFrames()

void com.alivc.live.pusher.AlivcLivePushConfig.setBFrames ( int  bFrame)

Set the number of B-Frames

Default: 0

Parameters
bFrameB-Frames number

Definition at line 542 of file AlivcLivePushConfig.java.

◆ setCameraCaptureOutputPreference()

void com.alivc.live.pusher.AlivcLivePushConfig.setCameraCaptureOutputPreference ( AlivcLiveCameraCaptureOutputPreference  cameraCaptureOutputPreference)

Set camera capture output preference

Parameters
cameraCaptureOutputPreferencecamera capture output preference
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.
Note
Default: PREVIEW
The live streaming connected microphone scene is different from the default call scene of RTC SDK. The live streaming connected microphone defaults to high-definition preview

Definition at line 415 of file AlivcLivePushConfig.java.

◆ setCameraType()

void com.alivc.live.pusher.AlivcLivePushConfig.setCameraType ( AlivcLivePushCameraTypeEnum  cameraType)

Set push camera type

Default: front

Parameters
cameraTypepush camera type
See also
com.alivc.live.pusher.AlivcLivePushCameraTypeEnum

Definition at line 639 of file AlivcLivePushConfig.java.

◆ setConnectRetryCount()

void com.alivc.live.pusher.AlivcLivePushConfig.setConnectRetryCount ( int  connectRetryCount)

Set connect retry count

Default: 5

Parameters
connectRetryCountconnect retry count

Definition at line 883 of file AlivcLivePushConfig.java.

◆ setConnectRetryInterval()

void com.alivc.live.pusher.AlivcLivePushConfig.setConnectRetryInterval ( int  connectRetryInterval)

Set connect retry interval

Default: 1000ms

Parameters
connectRetryIntervalconnect retry interval, millisecond

Definition at line 905 of file AlivcLivePushConfig.java.

◆ setEnableAutoResolution()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableAutoResolution ( boolean  enableAutoResolution)

Enable auto resolution

Default: false, close auto resolution

Parameters
enableAutoResolutionauto resolution

Definition at line 1395 of file AlivcLivePushConfig.java.

◆ setEnableBitrateControl()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableBitrateControl ( boolean  enableBitrateControl)

Enable bitrate control

Default: true, open bitrate control

Parameters
enableBitrateControlbitrate control

Definition at line 1373 of file AlivcLivePushConfig.java.

◆ setEnableDataChannelMessage()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableDataChannelMessage ( boolean  enableDataChannelMessage)

Enable Data Channel custom message channel

Parameters
enableDataChannelMessageswitch, default: off
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 371 of file AlivcLivePushConfig.java.

◆ setEnableNarrowbandHDForScreenPusher()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableNarrowbandHDForScreenPusher ( boolean  enable)

Turn on the narrowband HD switch when using screen pusher

Lower bandwidth, higher clarity

Default: true

Parameters
enableturn on or off

Definition at line 1158 of file AlivcLivePushConfig.java.

◆ setEnableRemoteVideoFrameCallback()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableRemoteVideoFrameCallback ( boolean  enable)

Remote video frame data callback switch

Parameters
enableturn on or off
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 391 of file AlivcLivePushConfig.java.

◆ setEnableRTSForInteractiveMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableRTSForInteractiveMode ( boolean  enableRTSForInteractiveMode)

Enable RTS push pull naked streaming in interactive mode (direct push & pull, different from co-streaming)

Parameters
enableRTSForInteractiveModeWhether to push pull naked streaming
Attention
This API is only supported in the interactive mode currently

Definition at line 1191 of file AlivcLivePushConfig.java.

◆ setEnableVideoCodecDowngrade()

void com.alivc.live.pusher.AlivcLivePushConfig.setEnableVideoCodecDowngrade ( boolean  enableVideoCodecDowngrade)

Set whether video encoder degradation is enabled, default enabled

Parameters
enableVideoCodecDowngradetrue->enabled,false->disabled
Note
When HEVC hardware encoding is set but the current device does not support it,
the SDK will automatically downgrade to H264. This switch can control the SDK not to automatically downgrade to H264
Now can only support interactive mode

Definition at line 1089 of file AlivcLivePushConfig.java.

◆ setExposure()

void com.alivc.live.pusher.AlivcLivePushConfig.setExposure ( int  exposure)

Set camera exposure

Range: [0,100]

Default: 0

Parameters
exposurecamera exposure

Definition at line 1115 of file AlivcLivePushConfig.java.

◆ setExternMainStream() [1/2]

void com.alivc.live.pusher.AlivcLivePushConfig.setExternMainStream ( boolean  externMainStream)

Open or close external stream push (third push)

When you open external stream push, the SDK will no longer capture audio and video, only retains encoding and transmission capabilities.

Default: false, close external stream push

Parameters
externMainStreamexternal stream push flag

Definition at line 1420 of file AlivcLivePushConfig.java.

◆ setExternMainStream() [2/2]

void com.alivc.live.pusher.AlivcLivePushConfig.setExternMainStream ( boolean  externMainStream,
AlivcImageFormat  imageFormat,
AlivcSoundFormat  soundFormat 
)

Open or close external stream push (third push)

When you open external stream push, the SDK will no longer capture audio and video, only retains encoding and transmission capabilities.

Parameters
externMainStreamexternal stream push flag
imageFormatimage format
soundFormataudio format
See also
com.alivc.live.pusher.AlivcImageFormat
com.alivc.live.pusher.AlivcSoundFormat

Definition at line 1436 of file AlivcLivePushConfig.java.

◆ setExtraInfo()

void com.alivc.live.pusher.AlivcLivePushConfig.setExtraInfo ( String  extraInfo)

Set extra info

Such as userID, it's used to troubleshoot problems.

Parameters
extraInfoextra info

Definition at line 296 of file AlivcLivePushConfig.java.

◆ setExtras()

void com.alivc.live.pusher.AlivcLivePushConfig.setExtras ( HashMap< String, String >  extras)

Transparent RTC extra information field for RTC engine initialization

Parameters
extrasRTC extra information field
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.

Definition at line 324 of file AlivcLivePushConfig.java.

◆ setFlash()

void com.alivc.live.pusher.AlivcLivePushConfig.setFlash ( boolean  flash)

Set camera flash

Default: false, close camera flash

Parameters
flashcamera flash

Definition at line 773 of file AlivcLivePushConfig.java.

◆ setFocusBySensor()

void com.alivc.live.pusher.AlivcLivePushConfig.setFocusBySensor ( boolean  focusBySensor)

Set focus by sensor

This api is provided for some Android boxes which has problems with continuous autofocus algorithms.

Default: false

Parameters
focusBySensorsensor focus

Definition at line 751 of file AlivcLivePushConfig.java.

◆ setFps()

void com.alivc.live.pusher.AlivcLivePushConfig.setFps ( AlivcFpsEnum  fps)

Set video capture fps

Parameters
fpsvideo capture fps
Note
Default: 20fps
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
Setting video FPS before pushing, please refer to the interface: AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePushConfig#setFps(AlivcFpsEnum)
Updating video FPS during pushing, please refer to the interface: AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig)

Definition at line 462 of file AlivcLivePushConfig.java.

◆ setH5CompatibleMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setH5CompatibleMode ( boolean  h5CompatibleMode)

Set H5 compatibility mode (Connect and communicate with Web client)

Parameters
h5CompatibleModeenable or not
Attention
This API is only supported in the interactive mode currently, otherwise it will have no effect.
Warning
In interactive mode, if you want to communicate with the web client, you must use H5 compatibility mode.
Otherwise, web users will see a black screen when viewing Native users.

Under the same process, it can only be set once; If modification is required, the process needs to be killed before setting it up;

It can only be called before pusher initialization, and it is invalid to call after pusher initialization

Definition at line 351 of file AlivcLivePushConfig.java.

◆ setInitialVideoBitrate()

void com.alivc.live.pusher.AlivcLivePushConfig.setInitialVideoBitrate ( int  initialVideoBitrate)

Set initial video encode bitrate

Parameters
initialVideoBitrateinitial video encode bitrate
Note
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
After updating resolution, the SDK will automatically reset the initial bitrate, target bitrate, and min bitrate of the streaming based on the streaming resolution to the default values corresponding to that resolution

Definition at line 857 of file AlivcLivePushConfig.java.

◆ setLivePushMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setLivePushMode ( AlivcLiveMode  pushMode)

Set live push mode

Default: Basic mode

Parameters
pushModelive push mode
Note
Basic mode: push rtmp stream, prefix: 'rtmp://', or push rts stream, prefix: 'artc://'
Interactive mode: push rtc stream, prefix: 'artc://live.aliyun.com/push/'
Please call it at the first position after config initialized.
Attention
Please use 'AlivcRTC' as the log tag for autonomous troubleshooting when using interactive mode.
See also
com.alivc.live.annotations.AlivcLiveMode

Definition at line 181 of file AlivcLivePushConfig.java.

◆ setMediaProjectionPermissionResultData()

static void com.alivc.live.pusher.AlivcLivePushConfig.setMediaProjectionPermissionResultData ( Intent  mediaProjectionPermissionResultData)
static

Set screen capture intent from system

Parameters
mediaProjectionPermissionResultDatascreen capture intent from system
Note
Can not support internal recording currently

Definition at line 1351 of file AlivcLivePushConfig.java.

◆ setMinFps()

void com.alivc.live.pusher.AlivcLivePushConfig.setMinFps ( AlivcFpsEnum  minFps)

Set min fps

Default: 8

Parameters
minFpsmin fps
See also
com.alivc.live.pusher.AlivcFpsEnum

Definition at line 1215 of file AlivcLivePushConfig.java.

◆ setMinVideoBitrate()

void com.alivc.live.pusher.AlivcLivePushConfig.setMinVideoBitrate ( int  minBitrate)

Set min video encode bitrate

Parameters
minBitratemin video encode bitrate
Note
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
Setting min video bitrate before pushing, please refer to the interface: AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePushConfig#setMinVideoBitrate(int)
Updating min video bitrate during pushing, please refer to the interface: AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePusher#setMinVideoBitrate(int)
After updating resolution, the SDK will automatically reset the initial bitrate, target bitrate, and min bitrate of the streaming based on the streaming resolution to the default values corresponding to that resolution
If you need to specify the min bitrate, please call the interface after updating resolution: AlivcLivePushConfig#setMinVideoBitrate(int)

Definition at line 516 of file AlivcLivePushConfig.java.

◆ setMonitorLevel()

void com.alivc.live.pusher.AlivcLivePushConfig.setMonitorLevel ( AlivcLivePushMonitorLevel  monitorLevel)

Set SDK monitor level

For embedded scenarios, you can specify to simplify monitoring information

Default: All

Parameters
monitorLevelmonitor level
See also
com.alivc.live.pusher.AlivcLivePushMonitorLevel

Definition at line 440 of file AlivcLivePushConfig.java.

◆ setNetworkPoorPushImage()

void com.alivc.live.pusher.AlivcLivePushConfig.setNetworkPoorPushImage ( String  path)

Set path for the network poor image

Parameters
pathnetwork poor image path(sdcard path)
Note
recommend: png
Warning
Please store the files in an accessible SD card directory for the application, avoiding placing them directly in the root directory of the SD card. If the function fails, please check if the path exists and if the application has permission to read the SD card path.

Definition at line 837 of file AlivcLivePushConfig.java.

◆ setPausePushImage()

void com.alivc.live.pusher.AlivcLivePushConfig.setPausePushImage ( String  path)

Set path for the pause push image

Parameters
pathpause push image path(sdcard path)
Note
recommend: png
Warning
Please store the files in an accessible SD card directory for the application, avoiding placing them directly in the root directory of the SD card. If the function fails, please check if the path exists and if the application has permission to read the SD card path.

Definition at line 816 of file AlivcLivePushConfig.java.

◆ setPreviewDisplayMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setPreviewDisplayMode ( AlivcPreviewDisplayMode  displayMode)

Set preview display mode

Default: ASPECT_FILL

Parameters
displayModepreview display mode
See also
com.alivc.live.pusher.AlivcPreviewDisplayMode

Definition at line 1509 of file AlivcLivePushConfig.java.

◆ setPreviewMirror()

void com.alivc.live.pusher.AlivcLivePushConfig.setPreviewMirror ( boolean  mirror)

Set preview mirror

Default: false, preview not mirror

Parameters
mirrorpreview mirror

Definition at line 661 of file AlivcLivePushConfig.java.

◆ setPreviewOrientation()

void com.alivc.live.pusher.AlivcLivePushConfig.setPreviewOrientation ( AlivcPreviewOrientationEnum  previewOrientation)

Set push preview orientation

Default: portrait

Parameters
previewOrientationpush preview orientation
See also
com.alivc.live.pusher.AlivcPreviewOrientationEnum

Definition at line 589 of file AlivcLivePushConfig.java.

◆ setPreviewRotation()

void com.alivc.live.pusher.AlivcLivePushConfig.setPreviewRotation ( AlivcPreviewRotationEnum  rotation)

Set preview rotation

This api is provided for the non-standard Android box

Default: 0

Parameters
rotationpreview rotation
See also
com.alivc.live.pusher.AlivcPreviewRotationEnum

Definition at line 616 of file AlivcLivePushConfig.java.

◆ setPushMirror()

void com.alivc.live.pusher.AlivcLivePushConfig.setPushMirror ( boolean  pushMirror)

Set push mirror

Default: false

Parameters
pushMirrorpush mirror

Definition at line 927 of file AlivcLivePushConfig.java.

◆ setQualityMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setQualityMode ( AlivcQualityModeEnum  quality)

Set video quality mode

Default: RESOLUTION_FIRST

Parameters
qualityvideo quality mode
See also
com.alivc.live.pusher.AlivcQualityModeEnum

Definition at line 1319 of file AlivcLivePushConfig.java.

◆ setRequireRenderContextNotify()

void com.alivc.live.pusher.AlivcLivePushConfig.setRequireRenderContextNotify ( boolean  enable)

Open the notify of OpenGL render context

Default: false, turn off

Parameters
enableturn on or off
See also
com.alivc.live.pusher.AlivcLivePusherRenderContextListener

Definition at line 1521 of file AlivcLivePushConfig.java.

◆ setResolution()

void com.alivc.live.pusher.AlivcLivePushConfig.setResolution ( AlivcResolutionEnum  resolution)

Set push resolution

Default: AlivcResolutionEnum#RESOLUTION_540P

Parameters
resolutionresolution, support 180P/240P/360P/480P/540P/720P/1080P, or self define resolution
Note
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
Setting resolution before pushing, please refer to the interface: AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig)
Updating resolution during pushing, please refer to the interface: AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig)
After updating the resolution through this interface, the SDK will automatically reset the initial bitrate, target bitrate, and min bitrate of the streaming based on the streaming resolution to the default values corresponding to that resolution
If you need to specify the target bitrate, and min bitrate, please call the interface after updating resolution: AlivcLivePushConfig#setMinVideoBitrate(int), AlivcLivePushConfig#setTargetVideoBitrate(int)

Definition at line 265 of file AlivcLivePushConfig.java.

◆ setSendDataTimeout()

void com.alivc.live.pusher.AlivcLivePushConfig.setSendDataTimeout ( int  sendDataTimeout)

Set RTMP send data timeout

Default: 3000ms

Parameters
sendDataTimeoutsend timeout, millisecond

Definition at line 795 of file AlivcLivePushConfig.java.

◆ setTargetVideoBitrate()

void com.alivc.live.pusher.AlivcLivePushConfig.setTargetVideoBitrate ( int  targetBitRate)

Set target video encode bitrate

Parameters
targetBitRatetarget video encode bitrate
Note
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
Setting target video bitrate before pushing, please refer to the interface: AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePushConfig#setTargetVideoBitrate(int)
Updating target video bitrate during pushing, please refer to the interface: AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePusher#setTargetVideoBitrate(int)
After updating resolution, the SDK will automatically reset the initial bitrate, target bitrate, and min bitrate of the streaming based on the streaming resolution to the default values corresponding to that resolution
If you need to specify the target bitrate, please call the interface after updating resolution: AlivcLivePushConfig#setTargetVideoBitrate(int)

Definition at line 489 of file AlivcLivePushConfig.java.

◆ setUseAliPlayerForBGM()

void com.alivc.live.pusher.AlivcLivePushConfig.setUseAliPlayerForBGM ( boolean  useAliPlayerForBGM)

Set whether use AliPlayer to play BGM or not

The built-in player supports most scenarios. If you need to play special formats, you can switch to the AliPlayer. You need to add the dependency of AliPlayer which the version is 5.4.1 or above.

Default: false, use built-in player

Parameters
useAliPlayerForBGMuse AliPlayer or not

Definition at line 1130 of file AlivcLivePushConfig.java.

◆ setUserName()

void com.alivc.live.pusher.AlivcLivePushConfig.setUserName ( String  userName)

Definition at line 304 of file AlivcLivePushConfig.java.

◆ setVideoConfig()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoConfig ( AlivcLivePushVideoConfig  videoConfig)

Set video configuration

Parameters
videoConfigvideo configuration

Definition at line 215 of file AlivcLivePushConfig.java.

◆ setVideoEncodeGop()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoEncodeGop ( AlivcVideoEncodeGopEnum  videoEncodeGop)

Set video encode gop

Parameters
videoEncodeGopvideo encode gop, seconds
Note
Default: 2s
Can use the interface AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig) instead
Setting video gop before pushing, please refer to the interface: AlivcLivePushConfig#setVideoConfig(AlivcLivePushVideoConfig), AlivcLivePushConfig#setVideoEncodeGop(AlivcVideoEncodeGopEnum)
Updating video gop during pushing, please refer to the interface: AlivcLivePusher#setVideoConfig(AlivcLivePushVideoConfig)

Definition at line 1061 of file AlivcLivePushConfig.java.

◆ setVideoEncodeMode()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoEncodeMode ( AlivcEncodeModeEnum  videoEncodeMode)

Set video encode mode

Default: hardware encode

Parameters
videoEncodeModevideo encode mode
See also
com.alivc.live.pusher.AlivcEncodeModeEnum

Definition at line 951 of file AlivcLivePushConfig.java.

◆ setVideoEncodeType()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoEncodeType ( AlivcEncodeType  videoEncodeType)

Set video encode type

Default: H264

Parameters
videoEncodeTypevideo encode type
See also
com.alivc.live.pusher.AlivcEncodeType

Definition at line 975 of file AlivcLivePushConfig.java.

◆ setVideoFormat()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoFormat ( int  videoFormat)

Definition at line 157 of file AlivcLivePushConfig.java.

◆ setVideoOnly()

void com.alivc.live.pusher.AlivcLivePushConfig.setVideoOnly ( boolean  videoOnly)

Set push video only

Default: false

Parameters
videoOnlyvideo only

Definition at line 705 of file AlivcLivePushConfig.java.

◆ toString()

String com.alivc.live.pusher.AlivcLivePushConfig.toString ( )

Definition at line 1617 of file AlivcLivePushConfig.java.

◆ useAliPlayerForBGM()

boolean com.alivc.live.pusher.AlivcLivePushConfig.useAliPlayerForBGM ( )

Get whether use AliPlayer to play BGM or not

The built-in player supports most scenarios. If you need to play special formats, you can switch to the AliPlayer. You need to add the dependency of AliPlayer which the version is 5.4.1 or above.

Default: false, use built-in player

Returns
use AliPlayer or not

Definition at line 1145 of file AlivcLivePushConfig.java.

Member Data Documentation

◆ CONFIG

final String com.alivc.live.pusher.AlivcLivePushConfig.CONFIG = "AlivcLivePushConfig"
static

Definition at line 47 of file AlivcLivePushConfig.java.