public class AlivcLivePushConfig
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG |
Constructor and Description |
---|
AlivcLivePushConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addWaterMark(java.lang.String path,
float x,
float y,
float width)
Add a watermark.
|
void |
clearWaterMark() |
AlivcImageFormat |
getAlivcExternMainImageFormat() |
AlivcSoundFormat |
getAlivcExternMainSoundFormat() |
int |
getAudioBitRate() |
protected boolean |
getAudioCaptureWithoutMix() |
protected int |
getAudioChannels() |
protected AlivcEncodeModeEnum |
getAudioEncodeMode()
Query the encoding mode of the audio.
|
protected int |
getAudioFormat() |
AlivcAudioAACProfileEnum |
getAudioProfile() |
protected AlivcAudioSampleRateEnum |
getAudioSamepleRate()
Query the audio sample rate.
|
AlivcAudioSceneModeEnum |
getAudioSceneMode() |
int |
getCameraType()
Query the camera type.
|
protected int |
getConnectRetryCount()
Query the maximum number of reconnections.
|
protected int |
getConnectRetryInterval()
Query the interval between two consecutive reconnections.
|
protected int |
getExposure() |
java.lang.String |
getExtraInfo()
Query extra auxiliary data.
|
protected int |
getFps()
Query the frame rate.
|
protected int |
getHeight() |
protected int |
getInitialVideoBitrate()
Query the initial bitrate of the video before encoding.
|
android.content.Intent |
getMediaProjectionPermissionResultData() |
protected int |
getMinFps() |
protected int |
getMinVideoBitrate()
Query the minimum bitrate of the video after encoding.
|
java.lang.String |
getNetworkPoorPushImage() |
java.lang.String |
getPausePushImage() |
AlivcPreviewDisplayMode |
getPreviewDisplayMode() |
int |
getPreviewOrientation()
Query the stream ingest mode.
|
protected int |
getPreviewRotation()
Set the rotation angle of the camera during preview.
|
AlivcQualityModeEnum |
getQualityMode() |
boolean |
getRequireRenderContextNotify() |
protected AlivcResolutionEnum |
getResolution() |
int |
getSendDataTimeout() |
protected int |
getTargetVideoBitrate()
Query the bitrate to be used after video encoding.
|
protected int |
getVideoEncodeGop() |
protected AlivcEncodeModeEnum |
getVideoEncodeMode()
Query the encoding mode of the video.
|
protected int |
getVideoFormat() |
protected int |
getWidth() |
boolean |
isAudioOnly()
The audio-only stream ingest.
|
protected boolean |
isAutoFocus()
Query whether the autofocus feature is enabled.
|
boolean |
isEnableAutoResolution() |
boolean |
isEnableBitrateControl() |
protected boolean |
isEnableNarrowbandHDForScreenPusher() |
protected boolean |
isEnableSDKCrashMechanism() |
boolean |
isExternMainStream()
Specify whether to ingest an external stream as a main stream.
|
protected boolean |
isFlash()
isFlash
|
protected boolean |
isFocusBySensor() |
protected boolean |
isPreviewMirror()
Query whether the preview mirroring mode is enabled.
|
protected boolean |
isPushMirror()
Query whether the mirroring mode is enabled during stream ingest.
|
boolean |
isVideoOnly()
The video-only stream ingest.
|
void |
removeWaterMark(java.lang.String path) |
void |
setAlivcExternMainImageFormat(AlivcImageFormat alivcExternMainImageFormat) |
void |
setAlivcExternMainSoundFormat(AlivcSoundFormat alivcExternMainSoundFormat) |
void |
setAudioBitRate(int audioBitRate) |
void |
setAudioCaptureWithoutMix(boolean on) |
void |
setAudioChannels(AlivcAudioChannelEnum audioChannels)
Set the number of sound channels used for audio collection.
|
void |
setAudioEncodeMode(AlivcEncodeModeEnum audioEncodeMode)
Set the encoding mode for the audio.
|
protected void |
setAudioFormat(int audioFormat) |
void |
setAudioOnly(boolean audioOnly)
Enable the audio-only stream ingest.
|
void |
setAudioProfile(AlivcAudioAACProfileEnum audioProfile) |
void |
setAudioSamepleRate(AlivcAudioSampleRateEnum audioSameple)
Set the audio sample rate.
|
void |
setAudioSceneMode(AlivcAudioSceneModeEnum audioSceneMode)
set audio mode
|
void |
setAutoFocus(boolean autoFocus)
Specify whether to enable the autofocus feature.
|
void |
setCameraType(AlivcLivePushCameraTypeEnum cameraType)
Set the camera type.
|
void |
setConnectRetryCount(int mConnectRetryCount)
Set the maximum number of reconnections in the range from 1 to 100.
|
void |
setConnectRetryInterval(int mConnectRetryInterval)
Set the interval between two consecutive reconnections in the range from 0 to 10000, excluding 0.
|
void |
setEnableAutoResolution(boolean enableAutoResolution) |
void |
setEnableBitrateControl(boolean enableBitrateControl) |
void |
setEnableNarrowbandHDForScreenPusher(boolean enable)
NarrowbandHDForScreenPusher
|
void |
setEnableSDKCrashMechanism(boolean enable)
SDK crash report
|
void |
setExposure(int mExposure)
Exposure [0,100],default 0
|
void |
setExternMainStream(boolean externMainStream) |
void |
setExternMainStream(boolean externMainStream,
AlivcImageFormat format,
AlivcSoundFormat soundFormat) |
void |
setExtraInfo(java.lang.String extraInfo)
Configure extra auxiliary data, such as a user ID, for troubleshooting.
|
void |
setFlash(boolean flash)
Specify whether to enable the flash.
|
void |
setFocusBySensor(boolean focusBySensor)
The sensor-based focusing.
|
void |
setFps(AlivcFpsEnum fps)
Set the frame rate of the video that is collected.
|
void |
setInitialVideoBitrate(int initialVideoBitrate)
Set the initial bitrate of the video before encoding in the range from 100 to 5000.
|
static void |
setMediaProjectionPermissionResultData(android.content.Intent mediaProjectionPermissionResultData) |
void |
setMinFps(AlivcFpsEnum minFps)
Set the minimum frame rate of the video that is collected.
|
void |
setMinVideoBitrate(int minBitRate)
Set the minimum bitrate of the video after encoding in the range from 100 to 5000.
|
void |
setNetworkPoorPushImage(java.lang.String path) |
void |
setPausePushImage(java.lang.String path) |
void |
setPreviewDisplayMode(AlivcPreviewDisplayMode mPreviewDisplayMode) |
void |
setPreviewMirror(boolean mirror)
Enable the preview mirroring mode.
|
void |
setPreviewOrientation(AlivcPreviewOrientationEnum previewOrientation)
Set the stream ingest mode.
|
void |
setPreviewRotation(AlivcPreviewRotationEnum rotation) |
void |
setPushMirror(boolean pushMirror)
Specify whether to enable the mirroring mode during stream ingest.
|
void |
setQualityMode(AlivcQualityModeEnum quality) |
void |
setRequireRenderContextNotify(boolean need) |
void |
setResolution(AlivcResolutionEnum resolution)
Set the resolution.
|
void |
setSendDataTimeout(int sendDataTimeout)
Set the timeout period for stream ingest over Real-Time Messaging Protocol (RTMP).
|
void |
setTargetVideoBitrate(int targetBitRate)
Set the bitrate to be used after video encoding in the range from 100 to 5000.
|
void |
setUseAliPlayerForBGM(boolean useAliPlayerForBGM)
setUseAliPlayerForBGM
|
void |
setVideoEncodeGop(AlivcVideoEncodeGopEnum videoEncodeGop)
Set the size of the group of pictures (GOP).
|
void |
setVideoEncodeMode(AlivcEncodeModeEnum mVideoEncodeMode)
Set the encoding mode for the video.
|
protected void |
setVideoFormat(int videoFormat) |
void |
setVideoOnly(boolean audioOnly)
Enable the audio-only stream ingest.
|
protected boolean |
useAliPlayerForBGM() |
public static final java.lang.String CONFIG
protected int getVideoFormat()
protected void setVideoFormat(int videoFormat)
protected int getAudioFormat()
protected void setAudioFormat(int audioFormat)
protected AlivcResolutionEnum getResolution()
public void setResolution(AlivcResolutionEnum resolution)
resolution
- The resolution. A custom resolution and the following resolutions are supported: 180P, 240P, 360P, 480P, 540P, 720P, and 1080P.public java.lang.String getExtraInfo()
public void setExtraInfo(java.lang.String extraInfo)
extraInfo
- protected int getFps()
public void setFps(AlivcFpsEnum fps)
fps
- The frame rate.protected int getTargetVideoBitrate()
public void setTargetVideoBitrate(int targetBitRate)
targetBitRate
- The bitrate to be used after video encoding.protected int getMinVideoBitrate()
public void setMinVideoBitrate(int minBitRate)
minBitRate
- protected AlivcAudioSampleRateEnum getAudioSamepleRate()
public void setAudioSamepleRate(AlivcAudioSampleRateEnum audioSameple)
audioSameple
- The audio sample rate.public int getPreviewOrientation()
public void setPreviewOrientation(AlivcPreviewOrientationEnum previewOrientation)
previewOrientation
- The stream ingest mode.protected int getPreviewRotation()
public void setPreviewRotation(AlivcPreviewRotationEnum rotation)
public int getCameraType()
public void setCameraType(AlivcLivePushCameraTypeEnum cameraType)
cameraType
- The camera type.protected boolean isPreviewMirror()
public void setPreviewMirror(boolean mirror)
mirror
- The preview mirroring mode.public boolean isAudioOnly()
public void setAudioOnly(boolean audioOnly)
audioOnly
- The audio-only stream ingest.public boolean isVideoOnly()
public void setVideoOnly(boolean audioOnly)
audioOnly
- The audio-only stream ingest.protected boolean isAutoFocus()
public void setAutoFocus(boolean autoFocus)
autoFocus
- The autofocus feature.protected boolean isFocusBySensor()
public void setFocusBySensor(boolean focusBySensor)
focusBySensor
- protected boolean isFlash()
public void setFlash(boolean flash)
flash
- Enable the flash.public void addWaterMark(java.lang.String path, float x, float y, float width)
path
- The path of the watermark image.x
- The x-coordinate of the upper-left corner of the watermark. The x-coordinate is represented by the proportion of the watermark width to the screen width. The proportion value ranges from 0 to 1.y
- The y-coordinate of the upper-left corner of the watermark. The y-coordinate is represented by the proportion of the watermark height to the screen height. The proportion value ranges from 0 to 1.width
- The width of the watermark. The width is represented by the proportion of the watermark width to the screen width. The proportion value ranges from 0 to 1.public void clearWaterMark()
public void removeWaterMark(java.lang.String path)
public int getSendDataTimeout()
public void setSendDataTimeout(int sendDataTimeout)
sendDataTimeout
- The timeout period. Unit: milliseconds.public void setPausePushImage(java.lang.String path)
public void setNetworkPoorPushImage(java.lang.String path)
public java.lang.String getPausePushImage()
public java.lang.String getNetworkPoorPushImage()
protected int getInitialVideoBitrate()
public void setInitialVideoBitrate(int initialVideoBitrate)
initialVideoBitrate
- The initial bitrate of the video before encoding.protected int getConnectRetryCount()
public void setConnectRetryCount(int mConnectRetryCount)
mConnectRetryCount
- protected int getConnectRetryInterval()
public void setConnectRetryInterval(int mConnectRetryInterval)
mConnectRetryInterval
- The interval between two consecutive reconnections. Unit: milliseconds.protected boolean isPushMirror()
public void setPushMirror(boolean pushMirror)
pushMirror
- The mirroring mode during stream ingest.protected AlivcEncodeModeEnum getVideoEncodeMode()
public void setVideoEncodeMode(AlivcEncodeModeEnum mVideoEncodeMode)
mVideoEncodeMode
- The encoding mode.protected AlivcEncodeModeEnum getAudioEncodeMode()
public void setAudioEncodeMode(AlivcEncodeModeEnum audioEncodeMode)
audioEncodeMode
- The encoding mode.protected int getWidth()
protected int getHeight()
protected int getAudioChannels()
public void setAudioChannels(AlivcAudioChannelEnum audioChannels)
audioChannels
- The number of sound channels.protected int getVideoEncodeGop()
public void setVideoEncodeGop(AlivcVideoEncodeGopEnum videoEncodeGop)
videoEncodeGop
- The size of GOP.protected int getExposure()
public void setUseAliPlayerForBGM(boolean useAliPlayerForBGM)
useAliPlayerForBGM
- default falseprotected boolean useAliPlayerForBGM()
public void setEnableNarrowbandHDForScreenPusher(boolean enable)
enable
- default trueprotected boolean isEnableNarrowbandHDForScreenPusher()
public void setEnableSDKCrashMechanism(boolean enable)
enable
- defualt trueprotected boolean isEnableSDKCrashMechanism()
public void setExposure(int mExposure)
mExposure
- protected int getMinFps()
public void setMinFps(AlivcFpsEnum minFps)
minFps
- The minimum frame rate of the video that is collected.public AlivcAudioAACProfileEnum getAudioProfile()
public void setAudioProfile(AlivcAudioAACProfileEnum audioProfile)
public int getAudioBitRate()
public void setAudioBitRate(int audioBitRate)
public AlivcAudioSceneModeEnum getAudioSceneMode()
public void setAudioSceneMode(AlivcAudioSceneModeEnum audioSceneMode)
audioSceneMode
- public void setQualityMode(AlivcQualityModeEnum quality)
public AlivcQualityModeEnum getQualityMode()
public android.content.Intent getMediaProjectionPermissionResultData()
public static void setMediaProjectionPermissionResultData(android.content.Intent mediaProjectionPermissionResultData)
public boolean isEnableBitrateControl()
public void setEnableBitrateControl(boolean enableBitrateControl)
public boolean isEnableAutoResolution()
public void setEnableAutoResolution(boolean enableAutoResolution)
public boolean isExternMainStream()
public void setExternMainStream(boolean externMainStream)
public void setExternMainStream(boolean externMainStream, AlivcImageFormat format, AlivcSoundFormat soundFormat)
public AlivcImageFormat getAlivcExternMainImageFormat()
public void setAlivcExternMainImageFormat(AlivcImageFormat alivcExternMainImageFormat)
public AlivcSoundFormat getAlivcExternMainSoundFormat()
public void setAlivcExternMainSoundFormat(AlivcSoundFormat alivcExternMainSoundFormat)
public AlivcPreviewDisplayMode getPreviewDisplayMode()
public void setPreviewDisplayMode(AlivcPreviewDisplayMode mPreviewDisplayMode)
public void setRequireRenderContextNotify(boolean need)
public boolean getRequireRenderContextNotify()
public void setAudioCaptureWithoutMix(boolean on)
protected boolean getAudioCaptureWithoutMix()