Agora C++ API Reference for All Platforms

Public Member Functions | List of all members
agora::rtc::IMediaStreamingSourceObserver Class Referenceabstract

## Public Member Functions
virtual | ~IMediaStreamingSourceObserver ()
virtual void | onStateChanged (STREAMING_SRC_STATE state, STREAMING_SRC_ERR err_code)=0
virtual void | onOpenDone (STREAMING_SRC_ERR err_code)=0
virtual void | onSeekDone (STREAMING_SRC_ERR err_code)=0
virtual void | onEofOnce (int64_t progress_ms, int64_t repeat_count)=0
virtual void | onProgress (int64_t position_ms)=0
virtual void | onMetaData (const void *data, int length)=0

## Constructor & Destructor Documentation

## ◆ ~IMediaStreamingSourceObserver()

virtual agora::rtc::IMediaStreamingSourceObserver::~IMediaStreamingSourceObserver | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ onStateChanged()

virtual void agora::rtc::IMediaStreamingSourceObserver::onStateChanged | ( | STREAMING_SRC_STATE | state,
|  | STREAMING_SRC_ERR | err_code
| ) |  |
| pure virtual

Reports the playback state change. When the state of the playback changes, the SDK triggers this callback to report the new playback state and the reason or error for the change.

Parameters

  state | The new playback state after change. See STREAMING_SRC_STATE.
  ec | The player's error code. See STREAMINGSRC_ERR.

## ◆ onOpenDone()

virtual void agora::rtc::IMediaStreamingSourceObserver::onOpenDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when file is opened.

Parameters

  err_code | The error code

Returns
  None

## ◆ onSeekDone()

virtual void agora::rtc::IMediaStreamingSourceObserver::onSeekDone | ( | STREAMING_SRC_ERR | err_code | ) |
| pure virtual

Triggered when seeking is done.

Parameters

  err_code | The error code

Returns
  None

## ◆ onEofOnce()

virtual void agora::rtc::IMediaStreamingSourceObserver::onEofOnce | ( | int64_t | progress_ms,
|  | int64_t | repeat_count
| ) |  |
| pure virtual

Triggered when playing is EOF.

Parameters

  progress_ms | the progress position
  repeat_count | means repeated count of playing

## ◆ onProgress()

virtual void agora::rtc::IMediaStreamingSourceObserver::onProgress | ( | int64_t | position_ms | ) |
| pure virtual

Reports current playback progress. The callback triggered once every one second during the playing status.

Parameters

  position_ms | Current playback progress (millisecond).

## ◆ onMetaData()

virtual void agora::rtc::IMediaStreamingSourceObserver::onMetaData | ( | const void * | data,
|  | int | length
| ) |  |
| pure virtual

Occurs when the metadata is received. The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.

Parameters

  data | The detailed data of the media metadata.
  length | The data length (bytes).