Inherits agora::RefCountInterface.
Inherited by agora::rtc::IMediaStreamingSourceEx.
◆ ~IMediaStreamingSource()
virtual agora::rtc::IMediaStreamingSource::~IMediaStreamingSource |
( |
| ) |
|
|
inlinevirtual |
◆ open()
virtual int agora::rtc::IMediaStreamingSource::open |
( |
const char * |
url, |
|
|
int64_t |
start_pos, |
|
|
bool |
auto_play = true |
|
) |
| |
|
pure virtual |
Opens a media streaming source with a specified URL.
- Parameters
-
url | The path of the media file. Both the local path and online path are supported. |
startPos | The starting position (ms) for pushing. Default value is 0. |
auto_play | whether start playing after opened |
- Returns
-
◆ close()
virtual int agora::rtc::IMediaStreamingSource::close |
( |
| ) |
|
|
pure virtual |
Close current media streaming source.
- Returns
-
◆ getSourceId()
virtual int agora::rtc::IMediaStreamingSource::getSourceId |
( |
| ) |
const |
|
pure virtual |
Gets the unique source ID of the streaming source.
- Returns
- ≧ 0: The source ID of this media player source.
- < 0: Failure.
◆ isVideoValid()
virtual bool agora::rtc::IMediaStreamingSource::isVideoValid |
( |
| ) |
|
|
pure virtual |
Retrieve whether video stream is valid.
- Returns
- : valid or invalid
◆ isAudioValid()
virtual bool agora::rtc::IMediaStreamingSource::isAudioValid |
( |
| ) |
|
|
pure virtual |
Retrieve whether audio stream is valid.
- Returns
- : valid or invalid
◆ getDuration()
virtual int agora::rtc::IMediaStreamingSource::getDuration |
( |
int64_t & |
duration | ) |
|
|
pure virtual |
Gets the duration of the streaming source.
- Parameters
-
[out] | duration | A reference to the duration of the media file. |
- Returns
-
◆ getStreamCount()
virtual int agora::rtc::IMediaStreamingSource::getStreamCount |
( |
int64_t & |
count | ) |
|
|
pure virtual |
Gets the number of the streming source.
- Parameters
-
[out] | count | The number of the media streams in the media source. |
- Returns
-
◆ getStreamInfo()
Gets the detailed information of a media stream.
- Parameters
-
| index | The index of the media stream. |
[out] | out_info | The detailed information of the media stream. See PlayerStreamInfo for details. |
- Returns
-
◆ setLoopCount()
virtual int agora::rtc::IMediaStreamingSource::setLoopCount |
( |
int64_t |
loop_count | ) |
|
|
pure virtual |
Sets whether to loop the streaming source for playback.
- Parameters
-
loop_count | The number of times of looping the media file.
- 1: Play the media file once.
- 2: Play the media file twice.
- <= 0: Play the media file in a loop indefinitely, until stop is called.
|
- Returns
-
◆ play()
virtual int agora::rtc::IMediaStreamingSource::play |
( |
| ) |
|
|
pure virtual |
Play & push the streaming source.
- Returns
-
◆ pause()
virtual int agora::rtc::IMediaStreamingSource::pause |
( |
| ) |
|
|
pure virtual |
Pauses the playing & pushing of the streaming source, Keep current position.
- Returns
-
◆ stop()
virtual int agora::rtc::IMediaStreamingSource::stop |
( |
| ) |
|
|
pure virtual |
Stop the playing & pushing of the streaming source, set the position to 0.
- Returns
-
◆ seek()
virtual int agora::rtc::IMediaStreamingSource::seek |
( |
int64_t |
new_pos | ) |
|
|
pure virtual |
Sets the playback position of the streaming source. After seek done, it will return to previous status.
- Parameters
-
newPos | The new playback position (ms). |
- Returns
-
◆ getCurrPosition()
virtual int agora::rtc::IMediaStreamingSource::getCurrPosition |
( |
int64_t & |
pos | ) |
|
|
pure virtual |
Gets the current playback position of the media file.
- Parameters
-
[out] | pos | A reference to the current playback position (ms). |
- Returns
-
◆ getCurrState()
@breif Gets the status of current streaming source.
- Returns
- The current state machine
◆ appendSeiData()
virtual int agora::rtc::IMediaStreamingSource::appendSeiData |
( |
const InputSeiData & |
inSeiData | ) |
|
|
pure virtual |
append the SEI data which can be sent attached to video packet
- Parameters
-
type | SEI type |
timestamp | the video frame timestamp which attached to |
frame_index | the video frame timestamp which attached to |
- Returns
-
◆ registerObserver()
Registers a media player source observer.
Once the media player source observer is registered, you can use the observer to monitor the state change of the media player.
- Parameters
-
- Returns
-
◆ unregisterObserver()
Releases the media player source observer.
- Parameters
-
- Returns
-
◆ parseMediaInfo()
Parse a media information with a specified URL.
- Parameters
-
url | : The path of the media file. Both the local path and online path are supported. |
video_info | : The output video information, It means no video track while video_info.streamIndex less than 0 |
audio_info | : The output audio information, It means no audio track while audio_info.streamIndex less than 0 |
- Returns
-