Package im.zego.zegoexpress.entity
Class ZegoMixerTask
- java.lang.Object
-
- im.zego.zegoexpress.entity.ZegoMixerTask
-
public class ZegoMixerTask extends java.lang.Object
Mix stream task object. This class is the configuration class of the stream mixing task. When a stream mixing task is requested to the ZEGO RTC server, the configuration of the stream mixing task is required. This class describes the detailed configuration information of this stream mixing task.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.HashMap<java.lang.String,java.lang.String>
advancedConfig
Set advanced configuration, such as specifying video encoding and others.ZegoMixerAudioConfig
audioConfig
Mix stream audio configint
backgroundColor
Mix stream background color, The color value corresponding to RGBA is 0xRRGGBBAA, and setting the transparency of the background color is currently not supported.java.lang.String
backgroundImageURL
Mix stream background image URLjava.util.ArrayList<ZegoMixerInput>
inputList
Mix stream task input listint
minPlayStreamBufferLength
Description: Sets the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server.ZegoMixImageCheckMode
mixImageCheckMode
Set the mixed stream image check mode.java.util.ArrayList<ZegoMixerOutput>
outputList
Mix stream task output listboolean
soundLevel
Enable or disable sound level callback for the task.java.nio.ByteBuffer
userData
User data, the length of user data should not be more than 1000 bytes,After setting, the streaming party can obtain the SEI content by listening to the callback of [onPlayerRecvSEI].int
userDataLength
User data length, not greater than 1000.Note that only data with length will be read by SDK.ZegoMixerVideoConfig
videoConfig
Mix stream audio configZegoWatermark
watermark
Mix stream wate rmarkZegoMixerWhiteboard
whiteboard
Mix stream whiteboard
-
Constructor Summary
Constructors Constructor Description ZegoMixerTask(java.lang.String taskID)
Create a mix stream task object with TaskID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableSoundLevel(boolean enable)
Enable or disable sound level callback for the task.java.lang.String
getTaskID()
Get current TaskIDvoid
setAdvancedConfig(java.util.HashMap<java.lang.String,java.lang.String> advancedConfig)
Set advanced configuration, such as specifying video encoding and others.void
setAudioConfig(ZegoMixerAudioConfig config)
Set the audio configuration of the mix stream task objectvoid
setBackgroundColor(int backgroundColor)
Set the background color of the mix stream task objectvoid
setBackgroundImageURL(java.lang.String backgroundImageURL)
Set the background image of the mix stream task objectvoid
setInputList(java.util.ArrayList<ZegoMixerInput> inputList)
Set the input stream list for the mix stream task objectvoid
setMinPlayStreamBufferLength(int minPlayStreamBufferLength)
Sets the jitter buffer length for the mux server to pull the input stream.void
setMixImageCheckMode(ZegoMixImageCheckMode mixImageCheckMode)
Set the mixed stream image check mode.void
setOutputList(java.util.ArrayList<ZegoMixerOutput> outputList)
Set the output list of the mix stream task objectvoid
setStreamAlignmentMode(ZegoStreamAlignmentMode mode)
Setting the stream mixing alignment modevoid
setUserData(java.nio.ByteBuffer data, int length)
Set custom user data.void
setVideoConfig(ZegoMixerVideoConfig config)
Set the video configuration of the mix stream task objectvoid
setWatermark(ZegoWatermark watermark)
Set the watermark of the mix stream task objectvoid
setWhiteboard(ZegoMixerWhiteboard whiteboard)
Set the whiteboard of the mix stream task object
-
-
-
Field Detail
-
audioConfig
public ZegoMixerAudioConfig audioConfig
Mix stream audio config
-
videoConfig
public ZegoMixerVideoConfig videoConfig
Mix stream audio config
-
inputList
public java.util.ArrayList<ZegoMixerInput> inputList
Mix stream task input list
-
outputList
public java.util.ArrayList<ZegoMixerOutput> outputList
Mix stream task output list
-
watermark
public ZegoWatermark watermark
Mix stream wate rmark
-
whiteboard
public ZegoMixerWhiteboard whiteboard
Mix stream whiteboard
-
backgroundColor
public int backgroundColor
Mix stream background color, The color value corresponding to RGBA is 0xRRGGBBAA, and setting the transparency of the background color is currently not supported. The AA in 0xRRGGBBAA is 00. For example, select RGB as \#87CEFA as the background color, this parameter passes 0x87CEFA00.
-
backgroundImageURL
public java.lang.String backgroundImageURL
Mix stream background image URL
-
soundLevel
public boolean soundLevel
Enable or disable sound level callback for the task. If enabled, then the remote player can get the soundLevel of every stream in the inputlist by [onMixerSoundLevelUpdate] callback.
-
userData
public java.nio.ByteBuffer userData
User data, the length of user data should not be more than 1000 bytes,After setting, the streaming party can obtain the SEI content by listening to the callback of [onPlayerRecvSEI]. Note it must be created using the [ByteBuffer. Allocatedirect] function, otherwise the data cannot be transferred to the SDK.
-
userDataLength
public int userDataLength
User data length, not greater than 1000.Note that only data with length will be read by SDK. If the length is greater than the actual length of data, the SDK will read the data according to the actual length of data.
-
advancedConfig
public java.util.HashMap<java.lang.String,java.lang.String> advancedConfig
Set advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.
-
minPlayStreamBufferLength
public int minPlayStreamBufferLength
Description: Sets the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server. In the real-time chorus KTV scenario, slight fluctuations in the network at the push end may cause the mixed stream to freeze. At this time, when the audience pulls the mixed stream, there is a high probability of the problem of freeze. By adjusting the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server, it can optimize the freezing problem that occurs when playing mixing streams at the player end, but it will increase the delay. It is not set by default, that is, the server uses its own configuration values. It only takes effect for the new input stream setting, and does not take effect for the input stream that has already started mixing.Value Range: [0,10000], exceeding the maximum value will result in a failure of the stream mixing request. On web platforms, this property does not take effect.
-
mixImageCheckMode
public ZegoMixImageCheckMode mixImageCheckMode
Set the mixed stream image check mode.
-
-
Method Detail
-
getTaskID
public java.lang.String getTaskID()
Get current TaskID
-
setInputList
public void setInputList(java.util.ArrayList<ZegoMixerInput> inputList)
Set the input stream list for the mix stream task object
-
setOutputList
public void setOutputList(java.util.ArrayList<ZegoMixerOutput> outputList)
Set the output list of the mix stream task object
-
setAudioConfig
public void setAudioConfig(ZegoMixerAudioConfig config)
Set the audio configuration of the mix stream task object
-
setVideoConfig
public void setVideoConfig(ZegoMixerVideoConfig config)
Set the video configuration of the mix stream task object
-
setBackgroundColor
public void setBackgroundColor(int backgroundColor)
Set the background color of the mix stream task object
-
setBackgroundImageURL
public void setBackgroundImageURL(java.lang.String backgroundImageURL)
Set the background image of the mix stream task object
-
setWatermark
public void setWatermark(ZegoWatermark watermark)
Set the watermark of the mix stream task object
-
setWhiteboard
public void setWhiteboard(ZegoMixerWhiteboard whiteboard)
Set the whiteboard of the mix stream task object
-
enableSoundLevel
public void enableSoundLevel(boolean enable)
Enable or disable sound level callback for the task. If enabled, then the remote player can get the soundLevel of every stream in the inputlist by [onMixerSoundLevelUpdate] callback.
-
setStreamAlignmentMode
public void setStreamAlignmentMode(ZegoStreamAlignmentMode mode)
Setting the stream mixing alignment mode
-
setUserData
public void setUserData(java.nio.ByteBuffer data, int length)
Set custom user data.
-
setAdvancedConfig
public void setAdvancedConfig(java.util.HashMap<java.lang.String,java.lang.String> advancedConfig)
Set advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.
-
setMinPlayStreamBufferLength
public void setMinPlayStreamBufferLength(int minPlayStreamBufferLength)
Sets the jitter buffer length for the mux server to pull the input stream.
-
setMixImageCheckMode
public void setMixImageCheckMode(ZegoMixImageCheckMode mixImageCheckMode)
Set the mixed stream image check mode.
-
-