Agora RTC Objective-C API Reference Refactor

Data Structures | Typedefs
AgoraObjects.h File Reference

Go to the source code of this file.

## Data Structures
class | AgoraMediaSource
class | AgoraMediaPlayerCacheStatistics
class | AgoraMediaPlayerPlaybackStats
class | AgoraMediaPlayerUpdatedInfo
class | AgoraMediaPlayerSrcInfo
class | AgoraDirectCdnStreamingStats
class | AgoraDirectCdnStreamingMediaOptions
class | AgoraEncodedVideoTrackOptions
class | AgoraRtcChannelMediaOptions
class | AgoraRtcVideoCanvas
class | AgoraLastmileProbeConfig
class | AgoraLastmileProbeOneWayResult
class | AgoraLastmileProbeResult
class | AgoraRtcRemoteVideoStats
class | AgoraRtcLocalAudioStats
class | AgoraRtcRemoteAudioStats
class | AgoraRtcAudioVolumeInfo
class | AgoraChannelStats
class | AgoraAdvancedVideoOptions
class | AgoraVideoCodecCapLevels
class | AgoraFocalLengthInfo
class | AgoraVideoCodecCapInfo
class | AgoraLiveStreamAdvancedFeature
class | WatermarkOptions
class | WatermarkBuffer
class | WatermarkConfig
class | AgoraColorSpace
class | AgoraVideoFrame
class | AgoraLogConfig
class | AgoraRtcEngineConfig
class | AgoraAudioFrame
class | AgoraEncodedAudioFrameInfo
class | AgoraUplinkNetworkInfo
class | AgoraDownlinkNetworkInfo
class | AgoraLeaveChannelOptions
class | AgoraOutputVideoFrame
class | AgoraEncryptionConfig
class | AgoraUserInfo
class | AgoraClientRoleOptions
class | AgoraCameraCapturerConfiguration
class | AgoraDataStreamConfig
class | AgoraChannelMediaRelayInfo
class | AgoraChannelMediaRelayConfiguration
class | AgoraBeautyOptions
class | AgoraFaceShapeAreaOptions
class | AgoraFaceShapeBeautyOptions
class | AgoraVideoDenoiserOptions
class | AgoraLowlightEnhanceOptions
class | AgoraColorEnhanceOptions
class | AgoraVirtualBackgroundSource
class | AgoraSegmentationProperty
class | AgoraTranscodingVideoStream
class | AgoraMixedAudioStream
class | AgoraLocalAudioMixerConfiguration
class | AgoraLocalTranscoderConfiguration
class | AgoraScreenCaptureParameters
class | AgoraScreenVideoParameters
class | AgoraScreenAudioParameters
class | AgoraScreenCaptureParameters2
class | AgoraAudioRecordingConfiguration
class | AgoraSimulcastStreamConfig
class | AgoraStreamLayerConfig
class | AgoraSimulcastConfig
class | AgoraRtcMediaStreamInfo
class | AgoraAudioSpectrumInfo
class | AgoraAudioEncodedFrameDelegateConfig
class | AgoraContentInspectModule
class | AgoraContentInspectConfig
class | AgoraSnapshotConfig
class | AgoraRtcConnection
class | AgoraVideoSubscriptionOptions
class | AgoraRecorderStreamInfo
class | AgoraEncodedVideoFrameInfo
class | LogUploadServerInfo
class | AdvancedConfigInfo
class | AgoraLocalAccessPointConfiguration
class | AgoraRhythmPlayerConfig
class | AgoraFacePositionInfo
class | AgoraAdvancedAudioOptions
class | AgoraImageTrackOptions
class | AgoraEchoTestConfiguration
class | AgoraMediaRecorderInfo
class | AgoraMediaRecorderConfiguration
class | AgoraExtensionInfo
class | AgoraAudioTrackConfig
class | AgoraVideoLayout
class | AgoraVideoLayoutInfo
class | AgoraVideoRenderingTracingInfo
class | AgoraMetadata
class | AgoraPathStats
class | AgoraMultipathStats

## Typedefs
typedef int(^ | AgoraRtcMediaPlayerCustomSourceOnReadCallback) (id< AgoraRtcMediaPlayerProtocol > _Nonnull playerKit, unsigned char *_Nullable buffer, int bufferSize)
typedef long long(^ | AgoraRtcMediaPlayerCustomSourceOnSeekCallback) (id< AgoraRtcMediaPlayerProtocol > _Nonnull playerKit, long long offset, int whence)

## Typedef Documentation

## ◆ VIEW_CLASS

typedef UIView VIEW_CLASS

## ◆ COLOR_CLASS

typedef UIColor COLOR_CLASS

## ◆ IMAGE_CLASS

typedef UIImage IMAGE_CLASS

## ◆ AgoraRtcMediaPlayerCustomSourceOnReadCallback

typedef int(^ AgoraRtcMediaPlayerCustomSourceOnReadCallback) (id< AgoraRtcMediaPlayerProtocol > _Nonnull playerKit, unsigned char *_Nullable buffer, int bufferSize)

Occurs when the SDK reads the media resource data.

When you call the `openWithMediaSource:` method to open a media resource, the SDK triggers this callback and request you to pass in the buffer of the media resource data.

Parameters

  playerKit | Media player protocol. See `AgoraRtcMediaPlayerProtocol`.
  buffer | An input parameter. Data buffer (bytes). Write the `bufferSize` data reported by the SDK into this parameter.
  bufferSize | The length of the data buffer (bytes).

Returns
  - If the data is read successfully, pass in the length of the data (bytes) you actually read in the return value.
  - If reading the data fails, pass in 0 in the return value.

## ◆ AgoraRtcMediaPlayerCustomSourceOnSeekCallback

typedef long long(^ AgoraRtcMediaPlayerCustomSourceOnSeekCallback) (id< AgoraRtcMediaPlayerProtocol > _Nonnull playerKit, long long offset, int whence)

Occurs when the SDK seeks the media resource data.

When you call the `openWithMediaSource:` or `open:startPos:` method to open a custom media resource, the SDK triggers this callback to request the specified location in the media resource.

Parameters

  playerKit | Media player protocol. See `AgoraRtcMediaPlayerProtocol`.
  offset | An input parameter. The offset of the target position relative to the starting point, in bytes. The value can be positive or negative.
  whence | An input parameter. The starting point. You can set it as one of the following values: 0: The starting point is the head of the data, and the actual data offset after seeking is `offset`. 1: The starting point is the current position, and the actual data offset after seeking is the current position plus `offset`. 2: The starting point is the end of the data, and the actual data offset after seeking is the whole data length plus `offset`. 65536: Do not perform position seeking, return the file size. Agora recommends that you use this parameter value when playing pure audio files such as MP3 and WAV.

Returns
  - When `whence` is `65536`, the media file size is returned.
  - When `whence` is `0`, `1`, or `2`, the actual data offset after the seeking is returned.
  - -1: Seeking failed.