public static class TcrSessionConfig.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TcrSessionConfig |
build()
Construct a
TcrSessionConfig . |
TcrSessionConfig.Builder |
enableCustomAudioCapture(boolean enableCustomAudioCapture,
int inputSampleRate,
boolean useStereoInput)
|
TcrSessionConfig.Builder |
enableLowLegacyRendering(boolean enableLowLegacyRendering)
|
TcrSessionConfig.Builder |
idleThreshold(long idleThreshold)
|
TcrSessionConfig.Builder |
lowFpsThreshold(int fps,
int duration)
|
TcrSessionConfig.Builder |
observer(TcrSession.Observer observer)
|
TcrSessionConfig.Builder |
preferredCodec(TcrSessionConfig.VideoCodecType preferredCodec)
Deprecated.
|
TcrSessionConfig.Builder |
preferredCodecList(java.util.ArrayList<TcrSessionConfig.VideoCodecType> preferredCodecList)
|
TcrSessionConfig.Builder |
remoteDesktopResolution(int width,
int height)
Set the resolution of Cloud Desktop.
|
TcrSessionConfig.Builder |
videoFrameCallback(VideoFrameBufferCallback videoFrameBufferCallback)
|
public TcrSessionConfig.Builder idleThreshold(long idleThreshold)
public TcrSessionConfig.Builder lowFpsThreshold(int fps, int duration)
public TcrSessionConfig.Builder observer(TcrSession.Observer observer)
public TcrSessionConfig.Builder videoFrameCallback(VideoFrameBufferCallback videoFrameBufferCallback)
public TcrSessionConfig.Builder enableLowLegacyRendering(boolean enableLowLegacyRendering)
@Deprecated public TcrSessionConfig.Builder preferredCodec(TcrSessionConfig.VideoCodecType preferredCodec)
preferredCodecList(ArrayList)
public TcrSessionConfig.Builder preferredCodecList(java.util.ArrayList<TcrSessionConfig.VideoCodecType> preferredCodecList)
TcrSessionConfig.preferredCodecList
Indicate preferred codecs, where the order of the elements in the list represents priority, such as index 0 being the highest priority preferred codec. If the set codecs cannot be selected for various reasons, other available codecs will be chosen.
public TcrSessionConfig.Builder enableCustomAudioCapture(boolean enableCustomAudioCapture, int inputSampleRate, boolean useStereoInput)
TcrSessionConfig.enableCustomAudioCapture
, TcrSessionConfig.inputSampleRate
and TcrSessionConfig.useStereoInput
.
#getCustomAudioCaptureDataBufferSize(int, boolean)
to obtain the buffer size for allocating space to your
ByteBuffer, otherwise TcrSdk cannot process it.
TcrSession.setEnableLocalAudio(boolean)
to enable local audio upstream transmission.
TcrSession.sendCustomAudioData(ByteBuffer, long)
to transmit custom audio data. Reiterate: The size
of the input ByteBuffer MUST be consistent with the size obtained from
CustomAudioBufferUtil.getCustomAudioCaptureDataBufferSize(int,boolean)
,
otherwise TcrSdk cannot process it.public TcrSessionConfig.Builder remoteDesktopResolution(int width, int height)
TcrSession.setRemoteDesktopResolution(int, int)
.VideoCapabilityUtil
to query
the recommended compatible resolution for your device.width
- the width of cloud desktop, which must be an even value. Otherwise,
the SDK will automatically increase the value by one.height
- the height of cloud desktop.public TcrSessionConfig build()
TcrSessionConfig
.TcrSessionConfig