Skip to content

Commit

Permalink
revert common custom (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe authored Dec 5, 2024
1 parent b101d59 commit c01cf2e
Show file tree
Hide file tree
Showing 14 changed files with 605 additions and 14 deletions.
2 changes: 1 addition & 1 deletion configs/rtc/rtc_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parsers:
parseFiles:
include:
- '@agoraio-extensions/terra_shared_configs:headers/${SDK_VERSION}/include/*.h'
- '@agoraio-extensions/terra_shared_configs:headers/custom_headers/*.h'
- '@agoraio-extensions/terra_shared_configs:headers/${SDK_VERSION}/custom_headers/*.h'
exclude:
- '@agoraio-extensions/terra_shared_configs:headers/${SDK_VERSION}/include/time_utils.h'
- '@agoraio-extensions/terra_shared_configs:headers/${SDK_VERSION}/include/rte_*.h'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ class IMediaEngine {
*/
virtual int unregisterFaceInfoObserver(IFaceInfoObserver* observer) = 0;

/**
* @iris_api_id: MediaEngine_setExternalRemoteEglContext_f337cbf
* @source: virtual int setExternalRemoteEglContext(void* eglContext) = 0;
*/
virtual int setExternalRemoteEglContext(const void* eglContext) = 0;

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,6 @@ class IRtcEngine {
* @source: virtual int takeSnapshot(uid_t uid, const agora::media::SnapshotConfig& config) = 0;
*/
virtual int takeSnapshotWithConfig(uid_t uid, const agora::media::SnapshotConfig& config) = 0;

/**
* @iris_api_id: RtcEngine_setExternalMediaProjection_f337cbf
* @source: virtual int setExternalMediaProjection(void* mediaProjection) = 0;
*/
virtual int setExternalMediaProjection(const void* mediaProjection) = 0;
};

} // namespace ext
Expand Down
43 changes: 43 additions & 0 deletions headers/rtc_4.3.2.9/custom_headers/CustomIAgoraMediaEngine.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once

#include "AgoraBase.h"
#include "IAgoraMediaEngine.h"

namespace agora {
namespace media {
namespace ext {

class IMediaEngine {
// ----------------------------- 👇🏻new API👇🏻 -----------------------------

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

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

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

/**
* @iris_api_id: MediaEngine_unregisterFaceInfoObserver
* @source: virtual int registerFaceInfoObserver(IFaceInfoObserver* observer) = 0;
*/
virtual int unregisterFaceInfoObserver(IFaceInfoObserver* observer) = 0;

// ----------------------------- 👆🏻new API👆🏻 -----------------------------
};

} // namespace ext
} // namespace media
} // namespace agora
63 changes: 63 additions & 0 deletions headers/rtc_4.3.2.9/custom_headers/CustomIAgoraMediaPlayer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#pragma once

#include "AgoraBase.h"
#include "AgoraMediaBase.h"
#include "IAgoraMediaPlayer.h"

namespace agora {
namespace rtc {

// Put this class to the agora::rtc namespaces to avoid unecessary namespace trimming(trim the `ext` namespace).
class IMediaPlayerVideoFrameObserver {
virtual void onFrame(const agora::media::base::VideoFrame *frame) = 0;
};

namespace ext {

class IMediaPlayer {
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------

/**
* @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;

/**
* @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;

/**
* @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;

// ----------------------------- 👆🏻overload API👆🏻 -----------------------------

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

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

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

// ----------------------------- 👆🏻rename API👆🏻 -----------------------------
};

} // namespace ext
} // namespace rtc
} // namespace agora
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#pragma once

#include "IAgoraMediaPlayer.h"

namespace agora {
namespace rtc {
namespace ext {

class IMusicPlayer : public IMediaPlayer {
// ----------------------------- 👇🏻overload API👇🏻 -----------------------------

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

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

class IMusicContentCenter
{
/**
* @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
} // namespace rtc
} // namespace agora
Loading

0 comments on commit c01cf2e

Please sign in to comment.