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

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 ()
 
AlivcResolutionEnum getResolution ()
 
void setResolution (AlivcResolutionEnum resolution)
 
String getExtraInfo ()
 
void setExtraInfo (String extraInfo)
 
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)
 
int getExposure ()
 
void setExposure (int exposure)
 
void setUseAliPlayerForBGM (boolean useAliPlayerForBGM)
 
boolean useAliPlayerForBGM ()
 
void setEnableNarrowbandHDForScreenPusher (boolean enable)
 
boolean isEnableNarrowbandHDForScreenPusher ()
 
int getMinFps ()
 
void setMinFps (AlivcFpsEnum minFps)
 
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)
 

Static Public Member Functions

static void setMediaProjectionPermissionResultData (Intent mediaProjectionPermissionResultData)
 

Static Public Attributes

static final String CONFIG = "AlivcLivePushConfig"
 

Detailed Description

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 40 of file AlivcLivePushConfig.java.

Member Function Documentation

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 'AlivcLivePusher->addWaterMark' instead
See also
com.alivc.live.pusher.AlivcLivePusher::addWaterMark(String, float, float, float)

Definition at line 1292 of file AlivcLivePushConfig.java.

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

Remove all the water marks

Definition at line 1307 of file AlivcLivePushConfig.java.

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 1170 of file AlivcLivePushConfig.java.

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 1193 of file AlivcLivePushConfig.java.

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

Get audio bitrate

Default: 64k

Returns
audio bitrate

Definition at line 988 of file AlivcLivePushConfig.java.

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 1275 of file AlivcLivePushConfig.java.

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

Get audio channels

Default: stereo

Returns
audio channels

Definition at line 814 of file AlivcLivePushConfig.java.

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 773 of file AlivcLivePushConfig.java.

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 965 of file AlivcLivePushConfig.java.

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 351 of file AlivcLivePushConfig.java.

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

Get audio scene mode

Default: DEFAULT_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 1013 of file AlivcLivePushConfig.java.

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

Get the number of B-Frames

Default: 0

Returns
B-Frames number

Definition at line 328 of file AlivcLivePushConfig.java.

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

Get push camera type

Default: front

Returns
push camera type

Definition at line 424 of file AlivcLivePushConfig.java.

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

Get connect retry count

Default: 5

Returns
connect retry count

Definition at line 658 of file AlivcLivePushConfig.java.

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

Get connect retry interval

Default: 1000ms

Returns
connect retry interval, millisecond

Definition at line 680 of file AlivcLivePushConfig.java.

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

Get camera exposure

Range: [0,100]

Default: 0

Returns
camera exposure

Definition at line 860 of file AlivcLivePushConfig.java.

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

Get extra info

Returns
extra info

Definition at line 222 of file AlivcLivePushConfig.java.

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

Get push video capture fps

Returns
video capture fps

Definition at line 267 of file AlivcLivePushConfig.java.

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

Get video height

Returns
video height

Definition at line 803 of file AlivcLivePushConfig.java.

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

Get initial video encode bitrate

Returns
initial video encode bitrate

Definition at line 637 of file AlivcLivePushConfig.java.

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

Get push mode

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

Definition at line 168 of file AlivcLivePushConfig.java.

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 1061 of file AlivcLivePushConfig.java.

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 941 of file AlivcLivePushConfig.java.

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

Get min video encode bitrate

Returns
min video encode bitrate

Definition at line 307 of file AlivcLivePushConfig.java.

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 244 of file AlivcLivePushConfig.java.

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

Get path for the network poor image

Returns
network poor image path

Definition at line 619 of file AlivcLivePushConfig.java.

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

Get path for the pause push image

Returns
pause push image path

Definition at line 601 of file AlivcLivePushConfig.java.

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

Get preview display mode

Default: ASPECT_FIT

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

Definition at line 1217 of file AlivcLivePushConfig.java.

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

Get push preview orientation

Default: portrait

Returns
push preview orientation

Definition at line 374 of file AlivcLivePushConfig.java.

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 399 of file AlivcLivePushConfig.java.

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 1051 of file AlivcLivePushConfig.java.

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 1253 of file AlivcLivePushConfig.java.

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 184 of file AlivcLivePushConfig.java.

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

Get RTMP send data timeout

Default: 3000ms

Returns
send timeout, millisecond

Definition at line 581 of file AlivcLivePushConfig.java.

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

Get target video encode bitrate

Returns
target video encode bitrate

Definition at line 288 of file AlivcLivePushConfig.java.

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

Get video encode gop

Default: 2s

Returns
video encode gop, seconds

Definition at line 836 of file AlivcLivePushConfig.java.

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 725 of file AlivcLivePushConfig.java.

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 749 of file AlivcLivePushConfig.java.

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

Get video width

Returns
video width

Definition at line 794 of file AlivcLivePushConfig.java.

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

Get push audio only

Default: false

Returns
audio only

Definition at line 469 of file AlivcLivePushConfig.java.

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

Get camera auto focus

Default: true

Returns
camera auto focus

Definition at line 513 of file AlivcLivePushConfig.java.

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

The status of auto resolution

Default: false, close auto resolution

Returns
auto resolution

Definition at line 1104 of file AlivcLivePushConfig.java.

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

The status of bitrate control

Default: true, open bitrate control

Returns
bitrate control

Definition at line 1082 of file AlivcLivePushConfig.java.

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 929 of file AlivcLivePushConfig.java.

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 1126 of file AlivcLivePushConfig.java.

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

Get status of the camera flash

Default: false, close camera flash

Returns
camera flash

Definition at line 559 of file AlivcLivePushConfig.java.

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

Get focus by sensor

Default: false

Returns
sensor focus

Definition at line 535 of file AlivcLivePushConfig.java.

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

Get preview mirror

Default: false, preview not mirror

Returns
preview mirror

Definition at line 447 of file AlivcLivePushConfig.java.

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

Get push mirror

Default: false

Returns
push mirror

Definition at line 702 of file AlivcLivePushConfig.java.

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

Get push video only

Default: false

Returns
video only

Definition at line 491 of file AlivcLivePushConfig.java.

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

Remove water mark

Parameters
pathwater mark path

Definition at line 1317 of file AlivcLivePushConfig.java.

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 1181 of file AlivcLivePushConfig.java.

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 1205 of file AlivcLivePushConfig.java.

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

Set audio bitrate

Default: 64k

Parameters
audioBitRateaudio bitrate

Definition at line 999 of file AlivcLivePushConfig.java.

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 1264 of file AlivcLivePushConfig.java.

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

Set audio channels

Default: stereo

Parameters
audioChannelsaudio channels

Definition at line 825 of file AlivcLivePushConfig.java.

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 785 of file AlivcLivePushConfig.java.

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

Set push audio only

Default: false

Parameters
audioOnlyaudio only

Definition at line 480 of file AlivcLivePushConfig.java.

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 977 of file AlivcLivePushConfig.java.

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 363 of file AlivcLivePushConfig.java.

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

Set audio scene mode

Default: DEFAULT_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 1027 of file AlivcLivePushConfig.java.

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

Set camera auto focus

Default: true

Parameters
autoFocuscamera auto focus

Definition at line 524 of file AlivcLivePushConfig.java.

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

Set the number of B-Frames

Default: 0

Parameters
bFrameB-Frames number

Definition at line 339 of file AlivcLivePushConfig.java.

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 436 of file AlivcLivePushConfig.java.

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

Set connect retry count

Default: 5

Parameters
connectRetryCountconnect retry count

Definition at line 669 of file AlivcLivePushConfig.java.

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

Set connect retry interval

Default: 1000ms

Parameters
connectRetryIntervalconnect retry interval, millisecond

Definition at line 691 of file AlivcLivePushConfig.java.

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

Enable auto resolution

Default: false, close auto resolution

Parameters
enableAutoResolutionauto resolution

Definition at line 1115 of file AlivcLivePushConfig.java.

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

Enable bitrate control

Default: true, open bitrate control

Parameters
enableBitrateControlbitrate control

Definition at line 1093 of file AlivcLivePushConfig.java.

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 916 of file AlivcLivePushConfig.java.

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

Set camera exposure

Range: [0,100]

Default: 0

Parameters
exposurecamera exposure

Definition at line 873 of file AlivcLivePushConfig.java.

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 1140 of file AlivcLivePushConfig.java.

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 1156 of file AlivcLivePushConfig.java.

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 233 of file AlivcLivePushConfig.java.

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

Set camera flash

Default: false, close camera flash

Parameters
flashcamera flash

Definition at line 570 of file AlivcLivePushConfig.java.

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 548 of file AlivcLivePushConfig.java.

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

Set video capture fps

Default: 20fps

Parameters
fpsvideo capture fps
See also
com.alivc.live.pusher.AlivcFpsEnum

Definition at line 279 of file AlivcLivePushConfig.java.

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

Set initial video encode bitrate

Parameters
initialVideoBitrateinitial video encode bitrate

Definition at line 646 of file AlivcLivePushConfig.java.

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

Set live push mode

Default: Basic mode

Parameters
pushModelive push mode
See also
com.alivc.live.annotations.AlivcLiveMode

Basic mode: push rtmp stream, prefix: 'rtmp://', or push rts stream, prefix: 'artc://'

Interactive mode: push rtc stream, prefix: 'artc://live.aliyun.com/push/'

Definition at line 158 of file AlivcLivePushConfig.java.

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 1071 of file AlivcLivePushConfig.java.

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 953 of file AlivcLivePushConfig.java.

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

Set min video encode bitrate

Parameters
minBitratemin video encode bitrate

Definition at line 316 of file AlivcLivePushConfig.java.

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 258 of file AlivcLivePushConfig.java.

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

Set path for the network poor image

Parameters
pathnetwork poor image path

Definition at line 628 of file AlivcLivePushConfig.java.

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

Set path for the pause push image

Parameters
pathpause push image path

Definition at line 610 of file AlivcLivePushConfig.java.

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

Set preview display mode

Default: ASPECT_FIT

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

Definition at line 1229 of file AlivcLivePushConfig.java.

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

Set preview mirror

Default: false, preview not mirror

Parameters
mirrorpreview mirror

Definition at line 458 of file AlivcLivePushConfig.java.

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 386 of file AlivcLivePushConfig.java.

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 413 of file AlivcLivePushConfig.java.

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

Set push mirror

Default: false

Parameters
pushMirrorpush mirror

Definition at line 713 of file AlivcLivePushConfig.java.

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 1039 of file AlivcLivePushConfig.java.

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 1241 of file AlivcLivePushConfig.java.

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

Set push resolution

Default: 540p

Parameters
resolutionresolution, support 180P/240P/360P/480P/540P/720P/1080P, or self define resolution
See also
com.alivc.live.pusher.AlivcResolutionEnum

Definition at line 196 of file AlivcLivePushConfig.java.

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

Set RTMP send data timeout

Default: 3000ms

Parameters
sendDataTimeoutsend timeout, millisecond

Definition at line 592 of file AlivcLivePushConfig.java.

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

Set target video encode bitrate

Parameters
targetBitRatetarget video encode bitrate

Definition at line 297 of file AlivcLivePushConfig.java.

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 888 of file AlivcLivePushConfig.java.

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

Set video encode gop

Default: 2s

Parameters
videoEncodeGopvideo encode gop, seconds

Definition at line 847 of file AlivcLivePushConfig.java.

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 737 of file AlivcLivePushConfig.java.

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 761 of file AlivcLivePushConfig.java.

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

Set push video only

Default: false

Parameters
videoOnlyvideo only

Definition at line 502 of file AlivcLivePushConfig.java.

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 903 of file AlivcLivePushConfig.java.