Server Gateway SDK v3.7.200.21 for Linux Java
|
The AgoraService class.
AgoraService
is the entry point of the Agora Server Gateway SDK. Use this interface to create access points to Agora interfaces, including RTC connections and media tracks.
You can create an AgoraService
object by calling AgoraService.
You can configure the AgoraService
object for different user scenarios on the global level by using AgoraServiceConfiguration
.
io.agora.rtc.AgoraService.AgoraService | ( | ) |
Constructor.
native AgoraRtcConn io.agora.rtc.AgoraService.agoraRtcConnCreate | ( | RtcConnConfig | rtc_conn_config | ) |
Creates an AgoraRtcConn object.
rtc_conn_config | The RTC connection configuration. |
AgoraRtcConn
object. native AgoraLocalAudioTrack io.agora.rtc.AgoraService.createCustomAudioTrackEncoded | ( | AgoraAudioEncodedFrameSender | agora_audio_encoded_frame_sender, |
int | mix_mode | ||
) |
Creates a local audio track object with an encoded audio frame sender.
Once created, this track can be used to send encoded audio frames, such as Opus frames.
agora_audio_encoded_frame_sender | The encoded audio frame sender: AgoraAudioEncodedFrameSender. |
mix_mode | The mixing mode of the encoded audio in the channel. |
AgoraLocalAudioTrack
object. native AgoraLocalAudioTrack io.agora.rtc.AgoraService.createCustomAudioTrackPcm | ( | AgoraAudioPcmDataSender | agora_audio_pcm_data_sender | ) |
Creates a local audio track object with a PCM data sender.
Once created, this track can be used to send PCM audio data.
agora_audio_pcm_data_sender | The PCM audio data sender. |
AgoraLocalAudioTrack
object. native AgoraLocalVideoTrack io.agora.rtc.AgoraService.createCustomVideoTrackEncoded | ( | AgoraVideoEncodedImageSender | agora_video_encoded_image_sender, |
SenderOptions | options | ||
) |
Creates a local video track object with an encoded video image sender.
Once created, this track can be used to send encoded video images, such as H.264 or VP8 frames.
agora_video_encoded_image_sender | The encoded video frame sender. |
options | The configuration for creating video encoded image track. |
AgoraVideoEncodedImageSender
object. native AgoraLocalVideoTrack io.agora.rtc.AgoraService.createCustomVideoTrackFrame | ( | AgoraVideoFrameSender | agora_video_frame_sender | ) |
Creates a local video track object with a customized YUV video source.
Once created, this track can be used to send YUV video data from a customized source.
agora_video_frame_sender | The customized YUV video frame sender. |
AgoraLocalVideoTrack
object. native AgoraLocalAudioTrack io.agora.rtc.AgoraService.createLocalAudioTrack | ( | ) |
Creates a local audio track object.
By default, the audio track is created from the selected audio input device, such as the built-in microphone on a mobile device.
AgoraLocalAudioTrack
object. native AgoraMediaNodeFactory io.agora.rtc.AgoraService.createMediaNodeFactory | ( | ) |
Creates a media node factory object.
AgoraMediaNodeFactory
object. void io.agora.rtc.AgoraService.destroy | ( | ) |
Destructor.
native void io.agora.rtc.AgoraService.destroyAudioSessionConfig | ( | AudioSessionConfig | config | ) |
native AudioSessionConfig io.agora.rtc.AgoraService.getAudioSessionConfig | ( | ) |
Gets the audio session configuration.
native int io.agora.rtc.AgoraService.initialize | ( | AgoraServiceConfig | config | ) |
Initializes the AgoraService object.
config | The configuration of the initialization. For details, see AgoraServiceConfig. |
native int io.agora.rtc.AgoraService.setAudioSessionConfig | ( | AudioSessionConfig | config | ) |
Customizes the audio session configuration.
config | The audio session configuration. |
native int io.agora.rtc.AgoraService.setAudioSessionPreset | ( | int | audio_scenario | ) |
Configures the preset audio scenario.
audio_scenario | The preset audio scenario. |
native int io.agora.rtc.AgoraService.setLogFile | ( | String | file_path, |
int | file_size | ||
) |
Sets the path and size of the SDK log files.
The SDK records all the log data during the SDK runtime in two log files, each with a default size of 512 KB. If you set file_size
as 1024 KB, the SDK outputs log files with a maximum size of 2 MB. If the total size of the log files exceeds the set value, the new output log overwrites the old output log.
file_path | The pointer to the log file. Ensure that the directory of the log file exists and is writable. |
file_size | The size of the SDK log file size (KB). |
native int io.agora.rtc.AgoraService.setLogFilter | ( | int | filters | ) |
Sets the SDK log output filter.
The log level follows the sequence of OFF, CRITICAL, ERROR, WARNING, INFO, and DEBUG.
Select a level to output the logs in and above the selected level. For example, if you set the log level to WARNING, you can see the logs in the levels of CRITICAL, ERROR, and WARNING.
filters | The log output filter.
|