Agora C++ API Reference for All Platforms

Namespaces | Classes | Enumerations
agora::media Namespace Reference

## Namespaces
| base

## Classes
struct | AudioSpectrumData
struct | ContentInspectConfig
struct | ContentInspectConfigEx
struct | ContentInspectModule
struct | ContentInspectModuleEx
class | IAudioFrameObserver
class | IAudioFrameObserverBase
class | IAudioPcmFrameSink
class | IAudioSpectrumObserver
class | IFaceInfoObserver
class | IMediaEngine
class | IMediaEngineEx
class | IMediaRecorderObserver
class | IMediaRecorderObserverEx
class | IVideoEncodedFrameObserver
class | IVideoFrameObserver
class | IVideoFrameObserverEx
struct | MediaRecorderConfiguration
struct | RecorderInfo
struct | SnapshotConfig
struct | UserAudioSpectrumInfo

## Enumerations
enum | CONTENT_INSPECT_VENDOR { CONTENT_INSPECT_VENDOR_AGORA = 1, CONTENT_INSPECT_VENDOR_TUPU = 2, CONTENT_INSPECT_VENDOR_HIVE = 3 }
enum | CONTENT_INSPECT_DEVICE_TYPE { CONTENT_INSPECT_DEVICE_INVALID = 0, CONTENT_INSPECT_DEVICE_AGORA = 1 }
enum | CONTENT_INSPECT_WORK_TYPE { CONTENT_INSPECT_WORK_DEVICE = 0, CONTENT_INSPECT_WORK_CLOUD = 1, CONTENT_INSPECT_WORK_DEVICE_CLOUD = 2 }
enum | CONTENT_INSPECT_CLOUD_TYPE { CONTENT_INSPECT_CLOUD_INVALID = 0, CONTENT_INSPECT_CLOUD_AGORA = 1, CONTENT_INSPECT_CLOUD_MARKET_PLACE = 2 }
enum | MEDIA_SOURCE_TYPE { AUDIO_PLAYOUT_SOURCE = 0, AUDIO_RECORDING_SOURCE = 1, PRIMARY_CAMERA_SOURCE = 2, SECONDARY_CAMERA_SOURCE = 3, PRIMARY_SCREEN_SOURCE = 4, SECONDARY_SCREEN_SOURCE = 5, CUSTOM_VIDEO_SOURCE = 6, MEDIA_PLAYER_SOURCE = 7, RTC_IMAGE_PNG_SOURCE = 8, RTC_IMAGE_JPEG_SOURCE = 9, RTC_IMAGE_GIF_SOURCE = 10, REMOTE_VIDEO_SOURCE = 11, TRANSCODED_VIDEO_SOURCE = 12, SPEECH_DRIVEN_VIDEO_SOURCE = 13, UNKNOWN_MEDIA_SOURCE = 100 }
enum | CONTENT_INSPECT_RESULT { CONTENT_INSPECT_NEUTRAL = 1, CONTENT_INSPECT_SEXY = 2, CONTENT_INSPECT_PORN = 3 }
enum | CONTENT_INSPECT_TYPE { CONTENT_INSPECT_INVALID = 0, __deprecated = 1, CONTENT_INSPECT_SUPERVISION = 2, CONTENT_INSPECT_IMAGE_MODERATION = 3 }
enum | EXTERNAL_VIDEO_SOURCE_TYPE { VIDEO_FRAME = 0, ENCODED_VIDEO_FRAME }
enum | MediaRecorderContainerFormat { FORMAT_MP4 = 1 }
enum | MediaRecorderStreamType { STREAM_TYPE_AUDIO = 0x01, STREAM_TYPE_VIDEO = 0x02, STREAM_TYPE_BOTH = STREAM_TYPE_AUDIO | STREAM_TYPE_VIDEO }
enum | RecorderState { RECORDER_STATE_ERROR = -1, RECORDER_STATE_START = 2, RECORDER_STATE_STOP = 3 }
enum | RecorderReasonCode { RECORDER_REASON_NONE = 0, RECORDER_REASON_WRITE_FAILED = 1, RECORDER_REASON_NO_STREAM = 2, RECORDER_REASON_OVER_MAX_DURATION = 3, RECORDER_REASON_CONFIG_CHANGED = 4 }
enum | AUDIO_MIXING_DUAL_MONO_MODE { AUDIO_MIXING_DUAL_MONO_AUTO = 0, AUDIO_MIXING_DUAL_MONO_L = 1, AUDIO_MIXING_DUAL_MONO_R = 2, AUDIO_MIXING_DUAL_MONO_MIX = 3 }

## Enumeration Type Documentation

## ◆ CONTENT_INSPECT_VENDOR

enum agora::media::CONTENT_INSPECT_VENDOR

Enumerator
CONTENT_INSPECT_VENDOR_AGORA |
CONTENT_INSPECT_VENDOR_TUPU |
CONTENT_INSPECT_VENDOR_HIVE |

## ◆ CONTENT_INSPECT_DEVICE_TYPE

enum agora::media::CONTENT_INSPECT_DEVICE_TYPE

Enumerator
CONTENT_INSPECT_DEVICE_INVALID |
CONTENT_INSPECT_DEVICE_AGORA |

## ◆ CONTENT_INSPECT_WORK_TYPE

enum agora::media::CONTENT_INSPECT_WORK_TYPE

Enumerator
CONTENT_INSPECT_WORK_DEVICE | video moderation on device
CONTENT_INSPECT_WORK_CLOUD | video moderation on cloud
CONTENT_INSPECT_WORK_DEVICE_CLOUD | video moderation on cloud and device

## ◆ CONTENT_INSPECT_CLOUD_TYPE

enum agora::media::CONTENT_INSPECT_CLOUD_TYPE

Enumerator
CONTENT_INSPECT_CLOUD_INVALID |
CONTENT_INSPECT_CLOUD_AGORA |
CONTENT_INSPECT_CLOUD_MARKET_PLACE |

## ◆ MEDIA_SOURCE_TYPE

enum agora::media::MEDIA_SOURCE_TYPE

The type of media device.

Enumerator
AUDIO_PLAYOUT_SOURCE | 0: The audio playback device.
AUDIO_RECORDING_SOURCE | 1: Microphone.
PRIMARY_CAMERA_SOURCE | 2: Video captured by primary camera.
SECONDARY_CAMERA_SOURCE | 3: Video captured by secondary camera.
PRIMARY_SCREEN_SOURCE | 4: Video captured by primary screen capturer.
SECONDARY_SCREEN_SOURCE | 5: Video captured by secondary screen capturer.
CUSTOM_VIDEO_SOURCE | 6: Video captured by custom video source.
MEDIA_PLAYER_SOURCE | 7: Video for media player sharing.
RTC_IMAGE_PNG_SOURCE | 8: Video for png image.
RTC_IMAGE_JPEG_SOURCE | 9: Video for jpeg image.
RTC_IMAGE_GIF_SOURCE | 10: Video for gif image.
REMOTE_VIDEO_SOURCE | 11: Remote video received from network.
TRANSCODED_VIDEO_SOURCE | 12: Video for transcoded.
SPEECH_DRIVEN_VIDEO_SOURCE | 13: Video for voice drive.
UNKNOWN_MEDIA_SOURCE | 100: Internal Usage only.

## ◆ CONTENT_INSPECT_RESULT

enum agora::media::CONTENT_INSPECT_RESULT

Enumerator
CONTENT_INSPECT_NEUTRAL |
CONTENT_INSPECT_SEXY |
CONTENT_INSPECT_PORN |

## ◆ CONTENT_INSPECT_TYPE

enum agora::media::CONTENT_INSPECT_TYPE

Enumerator
CONTENT_INSPECT_INVALID | (Default) content inspect type invalid
__deprecated | Deprecated: Content inspect type moderation
CONTENT_INSPECT_SUPERVISION | Content inspect type supervise
CONTENT_INSPECT_IMAGE_MODERATION | Content inspect type image moderation

## ◆ EXTERNAL_VIDEO_SOURCE_TYPE

enum agora::media::EXTERNAL_VIDEO_SOURCE_TYPE

The external video source type.

Enumerator
VIDEO_FRAME | 0: non-encoded video frame.
ENCODED_VIDEO_FRAME | 1: encoded video frame.

## ◆ MediaRecorderContainerFormat

enum agora::media::MediaRecorderContainerFormat

The format of the recording file.

Since
  v3.5.2

Enumerator
FORMAT_MP4 | 1: (Default) MP4.

## ◆ MediaRecorderStreamType

enum agora::media::MediaRecorderStreamType

The recording content.

Since
  v3.5.2

Enumerator
STREAM_TYPE_AUDIO | Only audio.
STREAM_TYPE_VIDEO | Only video.
STREAM_TYPE_BOTH | (Default) Audio and video.

## ◆ RecorderState

enum agora::media::RecorderState

The current recording state.

Since
  v3.5.2

Enumerator
RECORDER_STATE_ERROR | -1: An error occurs during the recording. See RecorderReasonCode for the reason.
RECORDER_STATE_START | 2: The audio and video recording is started.
RECORDER_STATE_STOP | 3: The audio and video recording is stopped.

## ◆ RecorderReasonCode

enum agora::media::RecorderReasonCode

The reason for the state change

Since
  v3.5.2

Enumerator
RECORDER_REASON_NONE | 0: No error occurs.
RECORDER_REASON_WRITE_FAILED | 1: The SDK fails to write the recorded data to a file.
RECORDER_REASON_NO_STREAM | 2: The SDK does not detect audio and video streams to be recorded, or audio and video streams are interrupted for more than five seconds during recording.
RECORDER_REASON_OVER_MAX_DURATION | 3: The recording duration exceeds the upper limit.
RECORDER_REASON_CONFIG_CHANGED | 4: The recording configuration changes.

## ◆ AUDIO_MIXING_DUAL_MONO_MODE

enum agora::media::AUDIO_MIXING_DUAL_MONO_MODE

dual-mono music output mode

Enumerator
AUDIO_MIXING_DUAL_MONO_AUTO |
AUDIO_MIXING_DUAL_MONO_L |
AUDIO_MIXING_DUAL_MONO_R |
AUDIO_MIXING_DUAL_MONO_MIX |