Agora RTC Objective-C API Reference  Refactor
Data Structures | Enumerations
agora::media::base Namespace Reference

Data Structures

struct  AudioEncodedFrameInfo
 
struct  AudioPcmFrame
 
struct  CacheStatistics
 
struct  ExternalVideoFrame
 
class  IAudioFrameObserver
 
class  IMediaPlayerCustomDataProvider
 
class  IVideoFrameObserver
 
struct  MediaSource
 
struct  PacketOptions
 
struct  PlayerStreamInfo
 
struct  PlayerUpdatedInfo
 
struct  SrcInfo
 
struct  VideoFrame
 

Enumerations

enum  MAX_METADATA_SIZE_TYPE
 
enum  AUDIO_DUAL_MONO_MODE { AUDIO_DUAL_MONO_STEREO = 0, AUDIO_DUAL_MONO_L = 1, AUDIO_DUAL_MONO_R = 2 }
 
enum  VIDEO_PIXEL_FORMAT {
  VIDEO_PIXEL_DEFAULT = 0, VIDEO_PIXEL_I420 = 1, VIDEO_PIXEL_BGRA = 2, VIDEO_PIXEL_NV21 = 3,
  VIDEO_PIXEL_RGBA = 4, VIDEO_PIXEL_NV12 = 8, VIDEO_TEXTURE_2D = 10, VIDEO_TEXTURE_OES = 11 ,
  VIDEO_PIXEL_I422 = 16
}
 
enum  RENDER_MODE_TYPE { RENDER_MODE_HIDDEN = 1, RENDER_MODE_FIT = 2, RENDER_MODE_ADAPTIVE = 3 }
 
enum  VIDEO_SOURCE_TYPE { CAMERA_SOURCE_FRONT = 0, CAMERA_SOURCE_BACK = 1, VIDEO_SOURCE_UNSPECIFIED = 2 }
 

Typedef Documentation

◆ view_t

typedef void* view_t

◆ user_id_t

typedef const char* user_id_t

Enumeration Type Documentation

◆ MAX_METADATA_SIZE_TYPE

The maximum metadata size.

Enumerator
MAX_METADATA_SIZE_IN_BYTE 

◆ AUDIO_DUAL_MONO_MODE

Audio dual-mono output mode

Enumerator
AUDIO_DUAL_MONO_STEREO 

ChanLOut=ChanLin, ChanRout=ChanRin ChanLOut=ChanRout=ChanLin

AUDIO_DUAL_MONO_L 

ChanLOut=ChanRout=ChanRin

AUDIO_DUAL_MONO_R 

ChanLout=ChanRout=(ChanLin+ChanRin)/2

AUDIO_DUAL_MONO_MIX 

◆ VIDEO_PIXEL_FORMAT

Video pixel formats.

Enumerator
VIDEO_PIXEL_DEFAULT 

0: Default format.

VIDEO_PIXEL_I420 

1: I420.

VIDEO_PIXEL_BGRA 

2: BGRA.

VIDEO_PIXEL_NV21 

3: NV21.

VIDEO_PIXEL_RGBA 

4: RGBA.

VIDEO_PIXEL_NV12 

8: NV12.

VIDEO_TEXTURE_2D 

10: GL_TEXTURE_2D

VIDEO_TEXTURE_OES 

11: GL_TEXTURE_OES

VIDEO_CVPIXEL_NV12 
VIDEO_CVPIXEL_I420 
VIDEO_CVPIXEL_BGRA 
VIDEO_PIXEL_I422 

16: I422.

◆ RENDER_MODE_TYPE

The video display mode.

Enumerator
RENDER_MODE_HIDDEN 

1: Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.

RENDER_MODE_FIT 

2: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio will be filled with black.

RENDER_MODE_ADAPTIVE 
Deprecated:
3: This mode is deprecated.

◆ VIDEO_SOURCE_TYPE

The video source type

Enumerator
CAMERA_SOURCE_FRONT 

0: the video frame comes from the front camera

CAMERA_SOURCE_BACK 

1: the video frame comes from the back camera

VIDEO_SOURCE_UNSPECIFIED 

1: the video frame source is unsepcified

◆ MEDIA_PLAYER_SOURCE_TYPE

Enumerator
MEDIA_PLAYER_SOURCE_DEFAULT 

The real type of media player when use MEDIA_PLAYER_SOURCE_DEFAULT is decided by the type of SDK package. It is full feature media player in full-featured SDK, or simple media player in others.

MEDIA_PLAYER_SOURCE_FULL_FEATURED 

Full featured media player is designed to support more codecs and media format, which requires more package size than simple player. If you need this player enabled, you might need to download a full-featured SDK.

MEDIA_PLAYER_SOURCE_SIMPLE 

Simple media player with limit codec supported, which requires minimal package size requirement and is enabled by default

◆ VIDEO_MODULE_POSITION

Enumerator
POSITION_POST_CAPTURER 
POSITION_PRE_RENDERER 
POSITION_PRE_ENCODER 
POSITION_POST_FILTERS 

◆ MEDIA_PLAYER_STATE

The playback state.

Enumerator
PLAYER_STATE_IDLE 

Default state.

PLAYER_STATE_OPENING 

Opening the media file.

PLAYER_STATE_OPEN_COMPLETED 

The media file is opened successfully.

PLAYER_STATE_PLAYING 

Playing the media file.

PLAYER_STATE_PAUSED 

The playback is paused.

PLAYER_STATE_PLAYBACK_COMPLETED 

The playback is completed.

PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED 

All loops are completed.

PLAYER_STATE_STOPPED 

The playback is stopped.

PLAYER_STATE_PAUSING_INTERNAL 

Player pausing (internal)

PLAYER_STATE_STOPPING_INTERNAL 

Player stopping (internal)

PLAYER_STATE_SEEKING_INTERNAL 

Player seeking state (internal)

PLAYER_STATE_GETTING_INTERNAL 

Player getting state (internal)

PLAYER_STATE_NONE_INTERNAL 

None state for state machine (internal)

PLAYER_STATE_DO_NOTHING_INTERNAL 

Do nothing state for state machine (internal)

PLAYER_STATE_SET_TRACK_INTERNAL 

Player set track state (internal)

PLAYER_STATE_FAILED 

The playback fails.

◆ MEDIA_PLAYER_ERROR

Player error code.

Enumerator
PLAYER_ERROR_NONE 

No error.

PLAYER_ERROR_INVALID_ARGUMENTS 

The parameter is invalid.

PLAYER_ERROR_INTERNAL 

Internel error.

PLAYER_ERROR_NO_RESOURCE 

No resource.

PLAYER_ERROR_INVALID_MEDIA_SOURCE 

Invalid media source.

PLAYER_ERROR_UNKNOWN_STREAM_TYPE 

The type of the media stream is unknown.

PLAYER_ERROR_OBJ_NOT_INITIALIZED 

The object is not initialized.

PLAYER_ERROR_CODEC_NOT_SUPPORTED 

The codec is not supported.

PLAYER_ERROR_VIDEO_RENDER_FAILED 

Invalid renderer.

PLAYER_ERROR_INVALID_STATE 

An error occurs in the internal state of the player.

PLAYER_ERROR_URL_NOT_FOUND 

The URL of the media file cannot be found.

PLAYER_ERROR_INVALID_CONNECTION_STATE 

Invalid connection between the player and the Agora server.

PLAYER_ERROR_SRC_BUFFER_UNDERFLOW 

The playback buffer is insufficient.

PLAYER_ERROR_INTERRUPTED 

The audio mixing file playback is interrupted.

PLAYER_ERROR_NOT_SUPPORTED 

The SDK does not support this function.

PLAYER_ERROR_TOKEN_EXPIRED 

The token has expired.

PLAYER_ERROR_IP_EXPIRED 

The ip has expired.

PLAYER_ERROR_UNKNOWN 

An unknown error occurs.

◆ MEDIA_STREAM_TYPE

The type of the media stream.

Enumerator
STREAM_TYPE_UNKNOWN 

The type is unknown.

STREAM_TYPE_VIDEO 

The video stream.

STREAM_TYPE_AUDIO 

The audio stream.

STREAM_TYPE_SUBTITLE 

The subtitle stream.

◆ MEDIA_PLAYER_EVENT

The playback event.

Enumerator
PLAYER_EVENT_SEEK_BEGIN 

The player begins to seek to the new playback position.

PLAYER_EVENT_SEEK_COMPLETE 

The seek operation completes.

PLAYER_EVENT_SEEK_ERROR 

An error occurs during the seek operation.

PLAYER_EVENT_AUDIO_TRACK_CHANGED 

The player changes the audio track for playback.

PLAYER_EVENT_BUFFER_LOW 

player buffer low

PLAYER_EVENT_BUFFER_RECOVER 

player buffer recover

PLAYER_EVENT_FREEZE_START 

The video or audio is interrupted

PLAYER_EVENT_FREEZE_STOP 

Interrupt at the end of the video or audio

PLAYER_EVENT_SWITCH_BEGIN 

switch source begin

PLAYER_EVENT_SWITCH_COMPLETE 

switch source complete

PLAYER_EVENT_SWITCH_ERROR 

switch source error

PLAYER_EVENT_FIRST_DISPLAYED 

An application can render the video to less than a second

PLAYER_EVENT_REACH_CACHE_FILE_MAX_COUNT 

cache resources exceed the maximum file count

PLAYER_EVENT_REACH_CACHE_FILE_MAX_SIZE 

cache resources exceed the maximum file size

PLAYER_EVENT_TRY_OPEN_START 

Triggered when a retry is required to open the media

PLAYER_EVENT_TRY_OPEN_SUCCEED 

Triggered when the retry to open the media is successful

PLAYER_EVENT_TRY_OPEN_FAILED 

Triggered when retrying to open media fails

◆ PLAYER_PRELOAD_EVENT

The play preload another source event.

Enumerator
PLAYER_PRELOAD_EVENT_BEGIN 

preload source begin

PLAYER_PRELOAD_EVENT_COMPLETE 

preload source complete

PLAYER_PRELOAD_EVENT_ERROR 

preload source error

◆ MEDIA_PLAYER_METADATA_TYPE

The type of the media metadata.

Enumerator
PLAYER_METADATA_TYPE_UNKNOWN 

The type is unknown.

PLAYER_METADATA_TYPE_SEI 

The type is SEI.

Variable Documentation

◆ kMaxCodecNameLength

const uint8_t kMaxCodecNameLength = 50
static

◆ kMaxCharBufferLength

const uint8_t kMaxCharBufferLength = 50
static