Typedefs | |
typedef unsigned int | uid_t |
typedef void * | view_t |
typedef struct agora::rtc::TranscodingUser | TranscodingUser |
typedef struct agora::rtc::RtcImage | RtcImage |
typedef struct agora::rtc::LiveTranscoding | LiveTranscoding |
typedef struct agora::rtc::Rect | Rect |
typedef struct agora::rtc::WatermarkOptions | WatermarkOptions |
Variables | |
const int | STANDARD_BITRATE = 0 |
const int | COMPATIBLE_BITRATE = -1 |
const int | DEFAULT_MIN_BITRATE = -1 |
typedef unsigned int agora::rtc::uid_t |
typedef void* agora::rtc::view_t |
typedef struct agora::rtc::TranscodingUser agora::rtc::TranscodingUser |
The video and audio properties of the user displaying the video in the CDN live. Agora supports a maximum of 17 transcoding users in a CDN streaming channel.
typedef struct agora::rtc::RtcImage agora::rtc::RtcImage |
Image properties.
The properties of the watermark and background images.
typedef struct agora::rtc::LiveTranscoding agora::rtc::LiveTranscoding |
A struct for managing CDN live audio/video transcoding settings.
typedef struct agora::rtc::Rect agora::rtc::Rect |
DEPRECATED Definition of the rectangular region.
typedef struct agora::rtc::WatermarkOptions agora::rtc::WatermarkOptions |
The options of the watermark image to be added.
The states of the local user's audio mixing file.
Enumerator | |
---|---|
AUDIO_MIXING_STATE_PLAYING | 710: The audio mixing file is playing after the method call of startAudioMixing or resumeAudioMixing succeeds. |
AUDIO_MIXING_STATE_PAUSED | 711: The audio mixing file pauses playing after the method call of pauseAudioMixing succeeds. |
AUDIO_MIXING_STATE_STOPPED | 713: The audio mixing file stops playing after the method call of stopAudioMixing succeeds. |
AUDIO_MIXING_STATE_FAILED | 714: An exception occurs during the playback of the audio mixing file. See the |
The error codes of the local user's audio mixing file.
Media device states.
Media device types.
Local video state types
Enumerator | |
---|---|
LOCAL_VIDEO_STREAM_STATE_STOPPED | 0: Initial state |
LOCAL_VIDEO_STREAM_STATE_CAPTURING | 1: The local video capturing device starts successfully. The SDK also reports this state when you share a maximized window by calling startScreenCaptureByWindowId. |
LOCAL_VIDEO_STREAM_STATE_ENCODING | 2: The first video frame is successfully encoded. |
LOCAL_VIDEO_STREAM_STATE_FAILED | 3: The local video fails to start. |
Local video state error codes
Enumerator | |
---|---|
LOCAL_VIDEO_STREAM_ERROR_OK | 0: The local video is normal. |
LOCAL_VIDEO_STREAM_ERROR_FAILURE | 1: No specified reason for the local video failure. |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION | 2: No permission to use the local video capturing device. |
LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY | 3: The local video capturing device is in use. |
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE | 4: The local video capture fails. Check whether the capturing device is working properly. |
LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE | 5: The local video encoding fails. |
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_INBACKGROUND | 6: (iOS only) The application is in the background.
|
LOCAL_VIDEO_STREAM_ERROR_CAPTURE_MULTIPLE_FOREGROUND_APPS | 7: (iOS only) The application is running in Slide Over, Split View, or Picture in Picture mode.
|
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED | 11: The shared window is minimized when you call startScreenCaptureByWindowId to share a window. |
LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED | 12: The error code indicates that a window shared by the window ID has been closed, or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios for reporting this error code:
|
Local audio state types.
Local audio state error codes.
Audio recording qualities.
Network quality types.
Video display modes.
DEPRECATED Video profiles.
Audio profiles.
Sets the sample rate, bitrate, encoding mode, and the number of channels:
Audio application scenarios.
The channel profile.
Reasons for a user being offline.
States of the RTMP or RTMPS streaming.
Enumerator | |
---|---|
RTMP_STREAM_PUBLISH_STATE_IDLE | The RTMP or RTMPS streaming has not started or has ended. This state is also triggered after you remove an RTMP or RTMPS stream from the CDN by calling |
RTMP_STREAM_PUBLISH_STATE_CONNECTING | The SDK is connecting to Agora's streaming server and the CDN server. This state is triggered after you call the addPublishStreamUrl method. |
RTMP_STREAM_PUBLISH_STATE_RUNNING | The RTMP or RTMPS streaming publishes. The SDK successfully publishes the RTMP or RTMPS streaming and returns this state. |
RTMP_STREAM_PUBLISH_STATE_RECOVERING | The RTMP or RTMPS streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP or RTMPS streaming and returns this state.
|
RTMP_STREAM_PUBLISH_STATE_FAILURE | The RTMP or RTMPS streaming fails. See the errCode parameter for the detailed error information. You can also call the addPublishStreamUrl method to publish the RTMP or RTMPS streaming again. |
Error codes of the RTMP or RTMPS streaming.
Enumerator | |
---|---|
RTMP_STREAM_PUBLISH_ERROR_OK | The RTMP or RTMPS streaming publishes successfully. |
RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT | Invalid argument used. If, for example, you do not call the setLiveTranscoding method to configure the LiveTranscoding parameters before calling the addPublishStreamUrl method, the SDK returns this error. Check whether you set the parameters in the setLiveTranscoding method properly. |
RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED | The RTMP or RTMPS streaming is encrypted and cannot be published. |
RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT | Timeout for the RTMP or RTMPS streaming. Call the addPublishStreamUrl method to publish the streaming again. |
RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR | An error occurs in Agora's streaming server. Call the |
RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR | An error occurs in the CDN server. |
RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN | The RTMP or RTMPS streaming publishes too frequently. |
RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT | The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. |
RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED | The host manipulates other hosts' URLs. Check your app logic. |
RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND | Agora's server fails to find the RTMP or RTMPS streaming. |
RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED | The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct. |
States of importing an external video stream in the interactive live streaming.
The brightness level of the video image captured by the local camera.
The use mode of the audio data in the onRecordAudioFrame or onPlaybackAudioFrame callback.
Enumerator | |
---|---|
RAW_AUDIO_FRAME_OP_MODE_READ_ONLY | 0: Read-only mode: Users only read the AudioFrame data without modifying anything. For example, when users acquire the data with the Agora SDK, then push the RTMP or RTMPS streams. |
RAW_AUDIO_FRAME_OP_MODE_WRITE_ONLY | 1: Write-only mode: Users replace the AudioFrame data with their own data and pass the data to the SDK for encoding. For example, when users acquire the data. |
RAW_AUDIO_FRAME_OP_MODE_READ_WRITE | 2: Read and write mode: Users read the data from AudioFrame, modify it, and then play it. For example, when users have their own sound-effect processing module and perform some voice pre-processing, such as a voice change. |
Video codec profile types.
Audio equalization band frequencies.
Audio reverberation types.
Local voice changer options.
Local voice reverberation presets.
The options for SDK preset voice beautifier effects.
Enumerator | |
---|---|
VOICE_BEAUTIFIER_OFF | Turn off voice beautifier effects and use the original voice. |
CHAT_BEAUTIFIER_MAGNETIC | A more magnetic voice.
|
CHAT_BEAUTIFIER_FRESH | A fresher voice.
|
CHAT_BEAUTIFIER_VITALITY | A more vital voice.
|
SINGING_BEAUTIFIER |
Singing beautifier effect.
|
TIMBRE_TRANSFORMATION_VIGOROUS | A more vigorous voice. |
TIMBRE_TRANSFORMATION_DEEP | A deeper voice. |
TIMBRE_TRANSFORMATION_MELLOW | A mellower voice. |
TIMBRE_TRANSFORMATION_FALSETTO | A falsetto voice. |
TIMBRE_TRANSFORMATION_FULL | A fuller voice. |
TIMBRE_TRANSFORMATION_CLEAR | A clearer voice. |
TIMBRE_TRANSFORMATION_RESOUNDING | A more resounding voice. |
TIMBRE_TRANSFORMATION_RINGING | A more ringing voice. |
The options for SDK preset audio effects.
Enumerator | |
---|---|
AUDIO_EFFECT_OFF | Turn off audio effects and use the original voice. |
ROOM_ACOUSTICS_KTV | An audio effect typical of a KTV venue.
|
ROOM_ACOUSTICS_VOCAL_CONCERT | An audio effect typical of a concert hall.
|
ROOM_ACOUSTICS_STUDIO | An audio effect typical of a recording studio.
|
ROOM_ACOUSTICS_PHONOGRAPH | An audio effect typical of a vintage phonograph.
|
ROOM_ACOUSTICS_VIRTUAL_STEREO | A virtual stereo effect that renders monophonic audio as stereo audio.
|
ROOM_ACOUSTICS_SPACIAL | A more spatial audio effect.
|
ROOM_ACOUSTICS_ETHEREAL | A more ethereal audio effect.
|
ROOM_ACOUSTICS_3D_VOICE | A 3D voice effect that makes the voice appear to be moving around the user. The default cycle period of the 3D voice effect is 10 seconds. To change the cycle period, call setAudioEffectParameters after this method.
|
VOICE_CHANGER_EFFECT_UNCLE | The voice of a middle-aged man.
|
VOICE_CHANGER_EFFECT_OLDMAN | The voice of an old man.
|
VOICE_CHANGER_EFFECT_BOY | The voice of a boy.
|
VOICE_CHANGER_EFFECT_SISTER | The voice of a young woman.
|
VOICE_CHANGER_EFFECT_GIRL | The voice of a girl.
|
VOICE_CHANGER_EFFECT_PIGKING | The voice of Pig King, a character in Journey to the West who has a voice like a growling bear.
|
VOICE_CHANGER_EFFECT_HULK | The voice of Hulk.
|
STYLE_TRANSFORMATION_RNB | An audio effect typical of R&B music.
|
STYLE_TRANSFORMATION_POPULAR | An audio effect typical of popular music.
|
PITCH_CORRECTION | A pitch correction effect that corrects the user's pitch based on the pitch of the natural C major scale. To change the basic mode and tonic pitch, call setAudioEffectParameters after this method.
|
Remote audio states.
Enumerator | |
---|---|
REMOTE_AUDIO_STATE_STOPPED | 0: The remote audio is in the default state, probably due to REMOTE_AUDIO_REASON_LOCAL_MUTED (3), REMOTE_AUDIO_REASON_REMOTE_MUTED (5), or REMOTE_AUDIO_REASON_REMOTE_OFFLINE (7). |
REMOTE_AUDIO_STATE_STARTING | 1: The first remote audio packet is received. |
REMOTE_AUDIO_STATE_DECODING | 2: The remote audio stream is decoded and plays normally, probably due to REMOTE_AUDIO_REASON_NETWORK_RECOVERY (2), REMOTE_AUDIO_REASON_LOCAL_UNMUTED (4), or REMOTE_AUDIO_REASON_REMOTE_UNMUTED (6). |
REMOTE_AUDIO_STATE_FROZEN | 3: The remote audio is frozen, probably due to REMOTE_AUDIO_REASON_NETWORK_CONGESTION (1). |
REMOTE_AUDIO_STATE_FAILED | 4: The remote audio fails to start, probably due to REMOTE_AUDIO_REASON_INTERNAL (0). |
Remote audio state reasons.
Remote video states. 1: The remote video is playing. 2: The remote video is frozen. The state of the remote video.
Enumerator | |
---|---|
REMOTE_VIDEO_STATE_STOPPED | 0: The remote video is in the default state, probably due to REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED (3), REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED (5), or REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE (7). |
REMOTE_VIDEO_STATE_STARTING | 1: The first remote video packet is received. |
REMOTE_VIDEO_STATE_DECODING | 2: The remote video stream is decoded and plays normally, probably due to REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY (2), REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED (4), REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED (6), or REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY (9). |
REMOTE_VIDEO_STATE_FROZEN | 3: The remote video is frozen, probably due to REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION (1) or REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK (8). |
REMOTE_VIDEO_STATE_FAILED | 4: The remote video fails to start, probably due to REMOTE_VIDEO_STATE_REASON_INTERNAL (0). |
The publishing state.
Enumerator | |
---|---|
PUB_STATE_IDLE | 0: The initial publishing state after joining the channel. |
PUB_STATE_NO_PUBLISHED | 1: Fails to publish the local stream. Possible reasons:
|
PUB_STATE_PUBLISHING | 2: Publishing. |
PUB_STATE_PUBLISHED | 3: Publishes successfully. |
The subscribing state.
Enumerator | |
---|---|
SUB_STATE_IDLE | 0: The initial subscribing state after joining the channel. |
SUB_STATE_NO_SUBSCRIBED | 1: Fails to subscribe to the remote stream. Possible reasons:
|
SUB_STATE_SUBSCRIBING | 2: Subscribing. |
SUB_STATE_SUBSCRIBED | 3: Subscribes to and receives the remote stream successfully. |
The reason for the remote video state change.
Video output orientation modes.
Video degradation preferences when the bandwidth is a constraint.
Stream fallback options.
Enumerator | |
---|---|
STREAM_FALLBACK_OPTION_DISABLED | 0: No fallback behavior for the local/remote video stream when the uplink/downlink network conditions are poor. The quality of the stream is not guaranteed. |
STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW | 1: Under poor downlink network conditions, the remote video stream, to which you subscribe, falls back to the low-stream (low resolution and low bitrate) video. You can set this option only in the setRemoteSubscribeFallbackOption method. Nothing happens when you set this in the setLocalPublishFallbackOption method. |
STREAM_FALLBACK_OPTION_AUDIO_ONLY | 2: Under poor uplink network conditions, the published video stream falls back to audio only. Under poor downlink network conditions, the remote video stream, to which you subscribe, first falls back to the low-stream (low resolution and low bitrate) video; and then to an audio-only stream if the network conditions worsen. |
Camera capture preference.
Enumerator | |
---|---|
CAPTURER_OUTPUT_PREFERENCE_AUTO | 0: (Default) self-adapts the camera output parameters to the system performance and network conditions to balance CPU consumption and video preview quality. |
CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE | 1: Prioritizes the system performance. The SDK chooses the dimension and frame rate of the local camera capture closest to those set by setVideoEncoderConfiguration. |
CAPTURER_OUTPUT_PREFERENCE_PREVIEW | 2: Prioritizes the local preview quality. The SDK chooses higher camera output parameters to improve the local video preview quality. This option requires extra CPU and RAM usage for video pre-processing. |
CAPTURER_OUTPUT_PREFERENCE_MANUAL | 3: Allows you to customize the width and height of the video image captured by the local camera. @since v3.3.0 |
Connection states.
Enumerator | |
---|---|
CONNECTION_STATE_DISCONNECTED | 1: The SDK is disconnected from Agora's edge server.
|
CONNECTION_STATE_CONNECTING | 2: The SDK is connecting to Agora's edge server.
|
CONNECTION_STATE_CONNECTED | 3: The SDK is connected to Agora's edge server and has joined a channel. You can now publish or subscribe to a media stream in the channel. If the connection to the channel is lost because, for example, if the network is down or switched, the SDK automatically tries to reconnect and triggers:
|
CONNECTION_STATE_RECONNECTING | 4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.
|
CONNECTION_STATE_FAILED | 5: The SDK fails to connect to Agora's edge server or join the channel. You must call the leaveChannel method to leave this state, and call the joinChannel method again to rejoin the channel. If the SDK is banned from joining the channel by Agora's edge server (through the RESTful API), the SDK triggers the onConnectionBanned (deprecated) and onConnectionStateChanged callbacks. |
Reasons for a connection state change.
Enumerator | |
---|---|
CONNECTION_CHANGED_CONNECTING | 0: The SDK is connecting to Agora's edge server. |
CONNECTION_CHANGED_JOIN_SUCCESS | 1: The SDK has joined the channel successfully. |
CONNECTION_CHANGED_INTERRUPTED | 2: The connection between the SDK and Agora's edge server is interrupted. |
CONNECTION_CHANGED_BANNED_BY_SERVER | 3: The user is banned by the server. This error occurs when the user is kicked out the channel from the server. |
CONNECTION_CHANGED_JOIN_FAILED | 4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel. |
CONNECTION_CHANGED_LEAVE_CHANNEL | 5: The SDK has left the channel. |
CONNECTION_CHANGED_INVALID_APP_ID | 6: The connection failed since Appid is not valid. |
CONNECTION_CHANGED_INVALID_CHANNEL_NAME | 7: The connection failed since channel name is not valid. |
CONNECTION_CHANGED_INVALID_TOKEN | 8: The connection failed since token is not valid, possibly because:
|
CONNECTION_CHANGED_TOKEN_EXPIRED | 9: The connection failed since token is expired. |
CONNECTION_CHANGED_REJECTED_BY_SERVER | 10: The connection is rejected by server. This error usually occurs in the following situations:
|
CONNECTION_CHANGED_SETTING_PROXY_SERVER | 11: The connection changed to reconnecting since SDK has set a proxy server. |
CONNECTION_CHANGED_RENEW_TOKEN | 12: When SDK is in connection failed, the renew token operation will make it connecting. |
CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED | 13: The IP Address of SDK client has changed. i.e., Network type or IP/Port changed by network operator might change client IP address. |
CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT | 14: Timeout for the keep-alive of the connection between the SDK and Agora's edge server. The connection state changes to CONNECTION_STATE_RECONNECTING(4). |
CONNECTION_CHANGED_PROXY_SERVER_INTERRUPTED | 15: In cloud proxy mode, the proxy server connection interrupted. |
Network type.
States of the last-mile network probe test.
Audio output routing.
Audio session restriction.
Quality change of the local video in terms of target frame rate and target bit rate since last count.
The reason for poor QoE of the local user when receiving a remote audio stream.
The error code in CHANNEL_MEDIA_RELAY_ERROR.
Enumerator | |
---|---|
RELAY_OK | 0: The state is normal. |
RELAY_ERROR_SERVER_ERROR_RESPONSE | 1: An error occurs in the server response. |
RELAY_ERROR_SERVER_NO_RESPONSE | 2: No server response. You can call the leaveChannel method to leave the channel. This error can also occur if your project has not enabled co-host token authentication. Contact suppo to enable the co-host token authentication service before starting a channel media relay. rt@a gora. io |
RELAY_ERROR_NO_RESOURCE_AVAILABLE | 3: The SDK fails to access the service, probably due to limited resources of the server. |
RELAY_ERROR_FAILED_JOIN_SRC | 4: Fails to send the relay request. |
RELAY_ERROR_FAILED_JOIN_DEST | 5: Fails to accept the relay request. |
RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC | 6: The server fails to receive the media stream. |
RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST | 7: The server fails to send the media stream. |
RELAY_ERROR_SERVER_CONNECTION_LOST | 8: The SDK disconnects from the server due to poor network connections. You can call the leaveChannel method to leave the channel. |
RELAY_ERROR_INTERNAL_ERROR | 9: An internal error occurs in the server. |
RELAY_ERROR_SRC_TOKEN_EXPIRED | 10: The token of the source channel has expired. |
RELAY_ERROR_DEST_TOKEN_EXPIRED | 11: The token of the destination channel has expired. |
The event code in CHANNEL_MEDIA_RELAY_EVENT.
The state code in CHANNEL_MEDIA_RELAY_STATE.
Enumerator | |
---|---|
RELAY_STATE_IDLE | 0: The initial state. After you successfully stop the channel media relay by calling stopChannelMediaRelay, the onChannelMediaRelayStateChanged callback returns this state. |
RELAY_STATE_CONNECTING | 1: The SDK tries to relay the media stream to the destination channel. |
RELAY_STATE_RUNNING | 2: The SDK successfully relays the media stream to the destination channel. |
RELAY_STATE_FAILURE | 3: A failure occurs. See the details in code. |
DEPRECATED Lifecycle of the CDN live video stream.
Content hints for screen sharing.
const int agora::rtc::STANDARD_BITRATE = 0 |
(Recommended) The standard bitrate set in the setVideoEncoderConfiguration method.
In this mode, the bitrates differ between the interactive live streaming and communication profiles:
COMMUNICATION
profile: The video bitrate is the same as the base bitrate.LIVE_BROADCASTING
profile: The video bitrate is twice the base bitrate. const int agora::rtc::COMPATIBLE_BITRATE = -1 |
The compatible bitrate set in the setVideoEncoderConfiguration method.
The bitrate remains the same regardless of the channel profile. If you choose this mode in the LIVE_BROADCASTING
profile, the video frame rate may be lower than the set value.
const int agora::rtc::DEFAULT_MIN_BITRATE = -1 |
Use the default minimum bitrate.