Skip to content

Commit

Permalink
[AddNodeParser]refactor: get iris_api_id when read custom header comm…
Browse files Browse the repository at this point in the history
…ents (#47)
  • Loading branch information
guoxianzhe authored Jan 23, 2024
1 parent c5fb5cd commit fc0f16f
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 78 deletions.
18 changes: 12 additions & 6 deletions headers/rtc_4.3.0/custom_headers/CustomIAgoraMediaEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@ namespace ext {
class IMediaEngine {
// ----------------------------- 👇🏻new API👇🏻 -----------------------------

// add for registerAudioFrameObserver
// virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;
/**
* @iris_api_id: MediaEngine_unregisterAudioFrameObserver
* @source: virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;
*/
virtual int unregisterAudioFrameObserver(IAudioFrameObserver *observer) = 0;

// add for registerVideoFrameObserver
// virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;
/**
* @iris_api_id: MediaEngine_unregisterVideoFrameObserver
* @source: virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;
*/
virtual int unregisterVideoFrameObserver(IVideoFrameObserver *observer) = 0;

// add for registerVideoEncodedFrameObserver
// virtual int registerVideoEncodedFrameObserver(IVideoEncodedFrameObserver* observer) = 0;
/**
* @iris_api_id: MediaEngine_unregisterVideoEncodedFrameObserver
* @source: virtual int registerVideoEncodedFrameObserver(IVideoEncodedFrameObserver* observer) = 0;
*/
virtual int
unregisterVideoEncodedFrameObserver(IVideoEncodedFrameObserver *observer) = 0;

Expand Down
26 changes: 20 additions & 6 deletions headers/rtc_4.3.0/custom_headers/CustomIAgoraMediaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@ class IMediaPlayerVideoFrameObserver {
class IMediaPlayer {
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------

// virtual int setPlayerOption(const char* key, int value) = 0;
/**
* @iris_api_id: MediaPlayer_setPlayerOption_4d05d29
* @source: virtual int setPlayerOption(const char* key, int value) = 0;
*/
virtual int setPlayerOptionInInt(const char *key, int value) = 0;

// virtual int setPlayerOption(const char* key, const char* value) = 0;
/**
* @iris_api_id: MediaPlayer_setPlayerOption_ccad422
* @source: virtual int setPlayerOption(const char* key, char* value) = 0;
*/
virtual int setPlayerOptionInString(const char *key, const char *value) = 0;

// virtual int registerAudioFrameObserver(media::IAudioPcmFrameSink* observer,
// RAW_AUDIO_FRAME_OP_MODE_TYPE mode) = 0;
/**
* @iris_api_id: MediaPlayer_registerAudioFrameObserver_a5b510b
* @source: virtual int registerAudioFrameObserver(media::IAudioPcmFrameSink* observer, RAW_AUDIO_FRAME_OP_MODE_TYPE mode) = 0;
*/
virtual int
registerAudioFrameObserver(media::IAudioPcmFrameSink* observer,
RAW_AUDIO_FRAME_OP_MODE_TYPE mode = RAW_AUDIO_FRAME_OP_MODE_TYPE::RAW_AUDIO_FRAME_OP_MODE_READ_ONLY) = 0;
Expand All @@ -31,11 +39,17 @@ class IMediaPlayer {

// ----------------------------- 👇🏻rename API👇🏻 -----------------------------

// virtual int registerVideoFrameObserver(media::base::IVideoFrameObserver* observer) = 0;
/**
* @iris_api_id: MediaPlayer_registerVideoFrameObserver_833bd8d
* @source: virtual int registerVideoFrameObserver(media::base::IVideoFrameObserver* observer) = 0;
*/
virtual int
registerVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0;

// virtual int unregisterVideoFrameObserver(agora::media::base::IVideoFrameObserver* observer) = 0;
/**
* @iris_api_id: MediaPlayer_unregisterVideoFrameObserver_5165d4c
* @source: virtual int unregisterVideoFrameObserver(agora::media::base::IVideoFrameObserver* observer) = 0;
*/
virtual int
unregisterVideoFrameObserver(IMediaPlayerVideoFrameObserver *observer) = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ namespace ext {
class IMusicPlayer : public IMediaPlayer {
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------

// virtual int open(int64_t songCode, int64_t startPos = 0) = 0;
/**
* @iris_api_id: MusicPlayer_open_303b92e
* @source: virtual int open(int64_t songCode, int64_t startPos = 0) = 0;
*/
virtual int openWithSongCode(int64_t songCode, int64_t startPos = 0) = 0;

// ----------------------------- 👆🏻overload API👆🏻 -----------------------------
};

class IMusicContentCenter
{
// reason: keep
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
//
// original:
// virtual int preload(int64_t songCode, const char* jsonOption) __deprecated = 0;
// virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
/**
* @iris_api_id: MusicContentCenter_preload_d3baeab
* @source: virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
*/
virtual int preload(agora::util::AString& requestId, int64_t songCode) = 0;
};
} // namespace ext
Expand Down
Loading

0 comments on commit fc0f16f

Please sign in to comment.