Agora RTC Objective-C API Reference
Refactor
|
Typedefs | |
typedef struct agora::rtc::RtcImage | RtcImage |
Variables | |
const int | STANDARD_BITRATE = 0 |
const int | COMPATIBLE_BITRATE = -1 |
const int | DEFAULT_MIN_BITRATE = -1 |
const int | DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2 |
typedef int32_t VideoSourceType |
typedef struct agora::rtc::RtcImage RtcImage |
The definition of the RtcImage struct.
typedef unsigned int uid_t |
typedef unsigned int track_id_t |
typedef unsigned int conn_id_t |
typedef unsigned int video_track_id_t |
enum RTMP_CHANNEL_EVENT |
The connection state between the SDK and the RTMP server.
Enumerator | |
---|---|
STATE_DISCONNECTED | 1: The SDK is disconnected from the RTMP server. This is the initial state when an RTMP Connetion is created by the createRtmpConnection method. The RTMP Connection also enters this state if you call the disconnect method when the SDK is in the STATE_CONNECTING(2), STATE_CONNECTED(3), STATE_RECONNECTING(4) or STATE_FAILED(5) state. |
STATE_CONNECTING | 2: The SDK is connecting to the RTMP server. The SDK goes to this state after you call the connect method, indicating that the SDK is in the process of establishing a connection to the RTMP server. Once successfully connected, it enters the STATE_CONNECTED(3) state. If the SDK fails to connect to RTMP server, the SDK goes to STATE_FAILED(5). |
STATE_CONNECTED | 3: The SDK is connected to the RTMP server. This state indicates that the SDK has established a connection to the RTMP server, and you can publish media streams through this connection. Once the connection is interrupted, for example, due to network deterioration or network type change, the SDK tries to reconnect to the RTMP server and enters the STATE_RECONNECTING(4) state. |
STATE_RECONNECTING | 4: The SDK is reconnecting to the RTMP server. This state indicates that the connection is interrupted by some network issue. The SDK keeps trying connecting to the server. If the SDK fails to reconnect, the SDK goes to STATE_FAILED(5). |
STATE_FAILED | 5: The SDK fails to connect to the RTMP server. In this state, SDK stops connecting to the server. Call the
|
STATE_RECONNECTED | 6: The SDK is reconnected to the RTMP server. This state indicates that the connection is interrupted by some network issue. The SDK keeps trying connecting to the server. If the SDK reconnected to server, the SDK goes to STATE_RECONNECTED(6). |
enum PublishAudioError |
enum PublishVideoError |
enum ImageType |
enum VideoTrackType |
Reasons for a user being offline.
enum INTERFACE_ID_TYPE |
enum QUALITY_TYPE |
The network quality types.
Enumerator | |
---|---|
QUALITY_UNKNOWN | 0: The network quality is unknown.
|
QUALITY_EXCELLENT | 1: The quality is excellent. |
QUALITY_GOOD | 2: The quality is quite good, but the bitrate may be slightly lower than excellent. |
QUALITY_POOR | 3: Users can feel the communication slightly impaired. |
QUALITY_BAD | 4: Users cannot communicate smoothly. |
QUALITY_VBAD | 5: Users can barely communicate. |
QUALITY_DOWN | 6: Users cannot communicate at all. |
QUALITY_UNSUPPORTED | 7: (For future use) The network quality cannot be detected. |
QUALITY_DETECTING | 8: Detecting the network quality. |
enum FIT_MODE_TYPE |
Content fit modes.
enum VIDEO_ORIENTATION |
The rotation information.
enum FRAME_RATE |
enum FRAME_WIDTH |
enum FRAME_HEIGHT |
enum VIDEO_FRAME_TYPE |
Types of the video frame.
enum ORIENTATION_MODE |
Video output orientation modes.
(For future use) Video degradation preferences under limited bandwidth.
enum VIDEO_CODEC_TYPE |
enum TCcMode |
enum AUDIO_CODEC_TYPE |
enum AUDIO_ENCODING_TYPE |
audio encoding type of audio encoded frame observer.
enum WATERMARK_FIT_MODE |
Watermark fit mode
Enumerator | |
---|---|
FIT_MODE_COVER_POSITION | Use the position of positionInLandscapeMode/positionInPortraitMode in WatermarkOptions the widthRatio will be invalid. |
FIT_MODE_USE_IMAGE_RATIO | Use width rotio of video, in this mode, positionInLandscapeMode/positionInPortraitMode in WatermarkOptions will be invalid, and watermarkRatio will valid. |
enum H264PacketizeMode |
enum VIDEO_STREAM_TYPE |
enum VIDEO_SOURCE_TYPE |
Video source types definition.
enum CLIENT_ROLE_TYPE |
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.
enum AUDIO_PROFILE_TYPE |
Audio profile types.
enum AUDIO_SCENARIO_TYPE |
Audio application scenarios.
enum VIDEO_CONTENT_HINT |
Video content hints.
enum SCREEN_SCENARIO_TYPE |
The brightness level of the video image captured by the local camera.
States of the local audio.
Reasons for the local audio failure.
Local video state types.
Local video state error codes.
enum REMOTE_AUDIO_STATE |
Remote audio states.
Reasons for a remote audio state change.
enum REMOTE_VIDEO_STATE |
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), REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE (7), or REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK (8). |
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). |
REMOTE_VIDEO_STATE_FAILED | 4: The remote video fails to start, probably due to REMOTE_VIDEO_STATE_REASON_INTERNAL (0). |
The reason for the remote video state change.
enum REMOTE_USER_STATE |
The remote user state information.
The downscale level of the remote video stream . The higher the downscale level, the more the video downscales.
Video codec profile types.
Audio codec profile types.
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. |
RTMP_STREAM_PUBLISH_STATE_DISCONNECTING | The SDK is disconnecting to Agora's streaming server and the CDN server. This state is triggered after you call the removePublishStreamUrl method. |
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. |
RTMP_STREAM_PUBLISH_ERROR_NOT_BROADCASTER | Current role is not broadcaster. Check whether the role of the current channel. |
RTMP_STREAM_PUBLISH_ERROR_TRANSCODING_NO_MIX_STREAM | Call updateTranscoding, but no mix stream. |
RTMP_STREAM_PUBLISH_ERROR_NET_DOWN | Network error. |
RTMP_STREAM_PUBLISH_ERROR_INVALID_APPID | User AppId have not authorized to push stream. |
RTMP_STREAM_PUBLISH_ERROR_INVALID_PRIVILEGE | invalid privilege. |
RTMP_STREAM_UNPUBLISH_ERROR_OK | 100: The streaming has been stopped normally. After you call removePublishStreamUrl to stop streaming, the SDK returns this value.
|
enum RTMP_STREAMING_EVENT |
Events during the RTMP or RTMPS streaming.
States of the last mile network probe result.
Reasons for a connection state change.
The reason of changing role's failure.
enum WLACC_MESSAGE_REASON |
enum WLACC_SUGGEST_ACTION |
Suggest an action for the user.
enum NETWORK_TYPE |
The network type.
Preset local voice reverberation options. bitmap allocation:
bit31 | bit30 - bit24 | bit23 - bit16 | bit15 - bit8 | bit7 - bit0 |
---|---|---|---|---|
reserved | 0x1: voice beauty | 0x1: chat beautification | effect types | effect settings |
0x2: singing beautification | ||||
0x3: timbre transform | ||||
0x4: ultra high_quality | ||||
-----------------— | --------------------------— | |||
0x2: audio effect | 0x1: space construction | |||
0x2: voice changer effect | ||||
0x3: style transform | ||||
0x4: electronic sound | ||||
0x5: magic tone | ||||
-----------------— | --------------------------— | |||
0x3: voice changer | 0x1: voice transform |
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. |
ULTRA_HIGH_QUALITY_VOICE |
enum AUDIO_EFFECT_PRESET |
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.
|
ROOM_ACOUSTICS_VIRTUAL_SURROUND_SOUND | virtual suround sound.
|
VOICE_CHANGER_EFFECT_UNCLE | The voice of an uncle.
|
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.
|
The audio recording quality type.
enum AREA_CODE |
enum AREA_CODE_EX |
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. |
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. |
enum ENCRYPTION_MODE |
Encryption mode.
enum UPLOAD_ERROR_REASON |
enum PERMISSION_TYPE |
enum STREAM_PUBLISH_STATE |
Type of ear monitoring filter.
enum THREAD_PRIORITY_TYPE |
enum AudioRoute |
Audio routes.
enum BYTES_PER_SAMPLE |
enum STREAMING_SRC_ERR |
The error code of streaming source.
enum STREAMING_SRC_STATE |
The state machine of Streaming Source.
enum MEDIA_DEVICE_TYPE |
The media device types.
The states of the local user's audio mixing file.
Enumerator | |
---|---|
AUDIO_MIXING_STATE_PLAYING | 710: The audio mixing file is playing. |
AUDIO_MIXING_STATE_PAUSED | 711: The audio mixing file pauses playing. |
AUDIO_MIXING_STATE_STOPPED | 713: The audio mixing file stops playing. |
AUDIO_MIXING_STATE_FAILED | 714: An exception occurs when playing the audio mixing file. See AUDIO_MIXING_REASON_TYPE. |
The reson codes of the local user's audio mixing file.
enum INJECT_STREAM_STATUS |
The status of importing an external video stream in a live broadcast.
The audio equalization band frequency.
enum AUDIO_REVERB_TYPE |
The audio reverberation type.
Enumerator | |
---|---|
STREAM_FALLBACK_OPTION_DISABLED | 0: (Default) No fallback operation for the stream when the network condition is poor. The stream quality cannot be guaranteed. |
STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW | 1: Under poor network conditions, the SDK will send or receive agora::rtc::VIDEO_STREAM_LOW. You can only set this option in RtcEngineParameters::setRemoteSubscribeFallbackOption. Nothing happens when you set this in RtcEngineParameters::setLocalPublishFallbackOption. |
STREAM_FALLBACK_OPTION_AUDIO_ONLY | 2: Under poor network conditions, the SDK may receive agora::rtc::VIDEO_STREAM_LOW first, but if the network still does not allow displaying the video, the SDK will send or receive audio only. |
enum PRIORITY_TYPE |
enum CAMERA_DIRECTION |
enum CLOUD_PROXY_TYPE |
enum LOCAL_PROXY_MODE |
enum PROXY_TYPE |
Media device states.
enum VIDEO_PROFILE_TYPE |
|
static |
|
static |
|
static |
|
static |
OPTIONAL_ENUM_CLASS VideoFrameMetaDataType |
const int STANDARD_BITRATE = 0 |
(Recommended) 0: Standard bitrate mode.
In this mode, the bitrates differ between the live broadcast and communication profiles:
const int COMPATIBLE_BITRATE = -1 |
-1: Compatible bitrate mode.
In this mode, the bitrate remains the same regardless of the channel profile. If you choose this mode in the live-broadcast profile, the video frame rate may be lower than the set value.
const int DEFAULT_MIN_BITRATE = -1 |
-1: (For future use) The default minimum bitrate.
const int DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2 |
-2: (For future use) Set minimum bitrate the same as target bitrate.
|
static |
|
static |