Developer Center
On-premise Recording
API Reference
Agora Recording C++ API Reference
Agora Recording C++ API Reference
|
enum | ERROR_CODE_TYPE { ERR_OK = 0,
ERR_FAILED = 1,
ERR_INVALID_ARGUMENT = 2,
ERR_INTERNAL_FAILED = 3
} |
|
enum | STAT_CODE_TYPE {
STAT_OK = 0,
STAT_ERR_FROM_ENGINE = 1,
STAT_ERR_ARS_JOIN_CHANNEL = 2,
STAT_ERR_CREATE_PROCESS = 3,
STAT_ERR_MIXED_INVALID_VIDEO_PARAM = 4,
STAT_ERR_NULL_POINTER = 5,
STAT_ERR_PROXY_SERVER_INVALID_PARAM = 6,
STAT_POLL_ERR = 0x8,
STAT_POLL_HANG_UP = 0x10,
STAT_POLL_NVAL = 0x20
} |
|
enum | LEAVE_PATH_CODE {
LEAVE_CODE_INIT = 0,
LEAVE_CODE_SIG = 1<<1,
LEAVE_CODE_NO_USERS = 1<<2,
LEAVE_CODE_TIMER_CATCH = 1<<3,
LEAVE_CODE_CLIENT_LEAVE = 1 << 4
} |
|
enum | WARN_CODE_TYPE {
WARN_NO_AVAILABLE_CHANNEL = 103,
WARN_LOOKUP_CHANNEL_TIMEOUT = 104,
WARN_LOOKUP_CHANNEL_REJECTED = 105,
WARN_OPEN_CHANNEL_TIMEOUT = 106,
WARN_OPEN_CHANNEL_REJECTED = 107,
WARN_RECOVERY_CORE_SERVICE_FAILURE = 108
} |
|
enum | CHANNEL_PROFILE_TYPE { CHANNEL_PROFILE_COMMUNICATION = 0,
CHANNEL_PROFILE_LIVE_BROADCASTING = 1
} |
|
enum | USER_OFFLINE_REASON_TYPE { USER_OFFLINE_QUIT = 0,
USER_OFFLINE_DROPPED = 1,
USER_OFFLINE_BECOME_AUDIENCE = 2
} |
|
enum | REMOTE_VIDEO_STREAM_TYPE { REMOTE_VIDEO_STREAM_HIGH = 0,
REMOTE_VIDEO_STREAM_LOW = 1
} |
|
enum | VIDEO_FORMAT_TYPE {
VIDEO_FORMAT_DEFAULT_TYPE = 0,
VIDEO_FORMAT_H264_FRAME_TYPE = 1,
VIDEO_FORMAT_YUV_FRAME_TYPE = 2,
VIDEO_FORMAT_JPG_FRAME_TYPE = 3,
VIDEO_FORMAT_JPG_FILE_TYPE = 4,
VIDEO_FORMAT_JPG_VIDEO_FILE_TYPE = 5
} |
|
enum | AUDIO_FORMAT_TYPE { AUDIO_FORMAT_DEFAULT_TYPE = 0,
AUDIO_FORMAT_AAC_FRAME_TYPE = 1,
AUDIO_FORMAT_PCM_FRAME_TYPE = 2,
AUDIO_FORMAT_MIXED_PCM_FRAME_TYPE = 3
} |
|
enum | AUDIO_FRAME_TYPE { AUDIO_FRAME_RAW_PCM = 0,
AUDIO_FRAME_AAC = 1
} |
|
enum | MEMORY_TYPE { STACK_MEM_TYPE = 0,
HEAP_MEM_TYPE = 1
} |
|
enum | VIDEO_FRAME_TYPE { VIDEO_FRAME_RAW_YUV = 0,
VIDEO_FRAME_H264 = 1,
VIDEO_FRAME_JPG = 2
} |
|
enum | TRIGGER_MODE_TYPE { AUTOMATICALLY_MODE = 0,
MANUALLY_MODE = 1
} |
|
enum | LANGUAGE_TYPE { CPP_LANG = 0,
JAVA_LANG = 1
} |
|
enum | AUDIO_PROFILE_TYPE { AUDIO_PROFILE_DEFAULT = 0,
AUDIO_PROFILE_HIGH_QUALITY = 1,
AUDIO_PROFILE_HIGH_QUALITY_STEREO = 2
} |
|
enum | agora_log_level {
AGORA_LOG_LEVEL_FATAL = 1,
AGORA_LOG_LEVEL_ERROR = 2,
AGORA_LOG_LEVEL_WARN = 3,
AGORA_LOG_LEVEL_NOTICE = 4,
AGORA_LOG_LEVEL_INFO = 5,
AGORA_LOG_LEVEL_DEBUG = 6
} |
|
enum | MIXED_AV_CODEC_TYPE { MIXED_AV_DEFAULT = 0,
MIXED_AV_CODEC_V1 = 1,
MIXED_AV_CODEC_V2 = 2
} |
|
◆ uchar_t
◆ uint_t
◆ uid_t
◆ u64_t
◆ VideoMixingLayout
The layout setting of the videos in composite recording mode.
◆ UserJoinInfos
◆ ERROR_CODE_TYPE
Error codes.
- Note
- When using the Agora Recording SDK, you may also receive error codes from the Agora Native SDK. See more error codes.
Enumerator |
---|
ERR_OK | 0: No error.
|
ERR_FAILED | 1: General error with no classified reason.
|
ERR_INVALID_ARGUMENT | 2: Invalid parameter. For example, the specific channel name contains illegal characters.
|
ERR_INTERNAL_FAILED | 3: The SDK module is not ready. Agora recommends the following methods to solve this error:
- Check the audio device.
- Check the completeness of the app.
- Re-initialize the SDK.
|
◆ STAT_CODE_TYPE
State codes.
Enumerator |
---|
STAT_OK | 0: Everything is normal.
|
STAT_ERR_FROM_ENGINE | 1: Errors from the Agora Native SDK. See more Error Codes.
|
STAT_ERR_ARS_JOIN_CHANNEL | 2: Failure to join the channel.
|
STAT_ERR_CREATE_PROCESS | 3: Failure to create a process.
|
STAT_ERR_MIXED_INVALID_VIDEO_PARAM | 4: Invalid parameters of the video profile of the mixed video. See Video Profile Table to set the mixResolution parameter.
|
STAT_ERR_NULL_POINTER | 5: Null pointer.
|
STAT_ERR_PROXY_SERVER_INVALID_PARAM | 6: Invalid parameters of the proxy server.
|
STAT_POLL_ERR | 0x8: Error in polling.
|
STAT_POLL_HANG_UP | 0x10: Polling hangs up.
|
STAT_POLL_NVAL | 0x20: Invalid polling request.
|
◆ LEAVE_PATH_CODE
The reasons why the recording application leaves the channel.
Enumerator |
---|
LEAVE_CODE_INIT | 0: The initialization fails.
|
LEAVE_CODE_SIG | 1: The AgoraCoreService process receives the SIGINT signal.
|
LEAVE_CODE_NO_USERS | 2: The recording application automatically leaves the channel and stops recording as there is no user in the channel.
|
LEAVE_CODE_TIMER_CATCH | 3: The AgoraCoreService process receives the SIGTERM signal.
|
LEAVE_CODE_CLIENT_LEAVE | 4: The recording application calls the leaveChannel method to leave the channel.
|
◆ WARN_CODE_TYPE
Warning codes.
- Note
- When using the Agora Recording SDK, you may also receive warning codes from the Agora Native SDK. See more warning codes.
Enumerator |
---|
WARN_NO_AVAILABLE_CHANNEL | 103: No channel resources are available. Maybe because the server cannot allocate any channel resource.
|
WARN_LOOKUP_CHANNEL_TIMEOUT | 104: A timeout when looking up the channel. When a user joins a channel, the SDK looks up the specified channel. This warning usually occurs when the network conditions are too poor to connect to the server.
|
WARN_LOOKUP_CHANNEL_REJECTED | 105: The server rejected the request to look up the channel. The server cannot process this request or the request is illegal.
|
WARN_OPEN_CHANNEL_TIMEOUT | 106: A timeout occurred when opening the channel. Once the specific channel is found, the SDK opens the channel. This warning usually occurs when the network conditions are too poor to connect to the server.
|
WARN_OPEN_CHANNEL_REJECTED | 107: The server rejected the request to open the channel. The server cannot process this request or the request is illegal.
|
WARN_RECOVERY_CORE_SERVICE_FAILURE | 108: An abnormal error occurs. The SDK would resume the recording.
|
◆ CHANNEL_PROFILE_TYPE
Channel types.
- Note
- The Recording SDK must use the same channel profile as the Agora Native/Web SDK, otherwise issues may occur.
Enumerator |
---|
CHANNEL_PROFILE_COMMUNICATION | 0: (Default) Communication mode. This is used in one-on-one or group calls, where all users in the channel can talk freely.
|
CHANNEL_PROFILE_LIVE_BROADCASTING | 1: Live broadcast mode. The host sends and receives voice/video, while the audience only receives voice/video. Host and audience roles can be set by calling setClientRole.
|
◆ USER_OFFLINE_REASON_TYPE
The reasons why the user leaves the channel or goes offline.
Enumerator |
---|
USER_OFFLINE_QUIT | 0: The user has quit the call.
|
USER_OFFLINE_DROPPED | 1: The SDK timed out and the user dropped offline because it has not received any data packet for a period of time. If a user quits the call and the message is not passed to the SDK (due to an unreliable channel), the SDK assumes the user has dropped offline.
|
USER_OFFLINE_BECOME_AUDIENCE | 2: The client role has changed from the host to the audience. The option is only valid when you set the channel profile as live broadcast when calling joinChannel.
|
◆ REMOTE_VIDEO_STREAM_TYPE
Takes effect only when the Agora Native SDK has enabled dual-stream mode (high stream by default).
Enumerator |
---|
REMOTE_VIDEO_STREAM_HIGH | 0: (Default) High stream.
|
REMOTE_VIDEO_STREAM_LOW | 1: Low stream.
|
◆ VIDEO_FORMAT_TYPE
Video decoding format.
Enumerator |
---|
VIDEO_FORMAT_DEFAULT_TYPE | 0: Default video format.
|
VIDEO_FORMAT_H264_FRAME_TYPE | 1: Video frame in H.264 format.
|
VIDEO_FORMAT_YUV_FRAME_TYPE | 2: Video frame in YUV format.
|
VIDEO_FORMAT_JPG_FRAME_TYPE | 3: Video frame in JPEG format.
|
VIDEO_FORMAT_JPG_FILE_TYPE | 4: JPEG file format.
|
VIDEO_FORMAT_JPG_VIDEO_FILE_TYPE | 5: JPEG file format + MP4 video.
- Individual Mode (isMixingEnabled is set as false): MP4 video and JPEG files.
- Composite Mode (isMixingEnabled is set as true): MP4 video file for mixed streams and JPEG files for individual streams.
|
◆ AUDIO_FORMAT_TYPE
Audio decoding format.
Enumerator |
---|
AUDIO_FORMAT_DEFAULT_TYPE | 0: Default audio format.
|
AUDIO_FORMAT_AAC_FRAME_TYPE | 1: Audio frame in AAC format.
|
AUDIO_FORMAT_PCM_FRAME_TYPE | 2: Audio frame in PCM format.
|
AUDIO_FORMAT_MIXED_PCM_FRAME_TYPE | 3: Audio-mixing frame in PCM format.
|
◆ AUDIO_FRAME_TYPE
Audio frame type.
Enumerator |
---|
AUDIO_FRAME_RAW_PCM | 0: PCM format.
|
AUDIO_FRAME_AAC | 1: AAC format.
|
◆ MEMORY_TYPE
Memory type.
Enumerator |
---|
STACK_MEM_TYPE | 0: Stack.
|
HEAP_MEM_TYPE | 1: Heap.
|
◆ VIDEO_FRAME_TYPE
Video frame type.
Enumerator |
---|
VIDEO_FRAME_RAW_YUV | 0: YUV format.
|
VIDEO_FRAME_H264 | 1: H.264 format.
|
VIDEO_FRAME_JPG | 2: JPG format.
|
◆ TRIGGER_MODE_TYPE
Whether to record automatically or manually.
Enumerator |
---|
AUTOMATICALLY_MODE | 0: Automatically.
|
MANUALLY_MODE | 1: Manually. To start and stop recording, call startService and stopService respectively.
|
◆ LANGUAGE_TYPE
The programming language.
Enumerator |
---|
CPP_LANG | 0: (Default) CPP.
|
JAVA_LANG | 1: Java.
|
◆ AUDIO_PROFILE_TYPE
Audio profile. Sets the sampling rate, bitrate, encode mode, and the number of channels.
Enumerator |
---|
AUDIO_PROFILE_DEFAULT | 0: (Default) Sampling rate of 48 kHz, communication encoding, mono, and a bitrate of up to 48 Kbps.
|
AUDIO_PROFILE_HIGH_QUALITY | 1: Sampling rate of 48 kHz, music encoding, mono, and a bitrate of up to 128 Kbps.
|
AUDIO_PROFILE_HIGH_QUALITY_STEREO | 2: Sampling rate of 48 kHz, music encoding, stereo, and a bitrate of up to 192 Kbps.
|
◆ agora_log_level
Log level.
Enumerator |
---|
AGORA_LOG_LEVEL_FATAL | 1: Fatal.
|
AGORA_LOG_LEVEL_ERROR | 2: Error.
|
AGORA_LOG_LEVEL_WARN | 3: Warn.
|
AGORA_LOG_LEVEL_NOTICE | 4: Notice.
|
AGORA_LOG_LEVEL_INFO | 5: Info.
|
AGORA_LOG_LEVEL_DEBUG | 6: Debug.
|
◆ MIXED_AV_CODEC_TYPE
Mix audio and video in real time. Takes effect only when the isMixingEnabled is set as true.
See the Supported Players.
Enumerator |
---|
MIXED_AV_DEFAULT | 0: (Default) Mixes the audio and video respectively.
|
MIXED_AV_CODEC_V1 | 1: Mixes the audio and video in real time into an MP4 file. Supports limited players.
|
MIXED_AV_CODEC_V2 | 2: Mixes the audio and video in real time into an MP4 file. Supports more players.
|