|
| 1 | +import { |
| 2 | + ClazzMethodReplacedContext_, |
| 3 | + rc_empty_data, |
| 4 | +} from './bptype_data_replaced/helper'; |
| 5 | + |
| 6 | +export const map_clazz_method_replaced_context: { |
| 7 | + [key: string]: ClazzMethodReplacedContext_; |
| 8 | +} = { |
| 9 | + 'agora::media::IMediaEngine.pushVideoFrame': { |
| 10 | + ...rc_empty_data, |
| 11 | + doReplceImpl: true, |
| 12 | + impl: ` |
| 13 | +int UAgoraBPuMediaEngine::PushVideoFrame(TArray<FUABT_ExternalVideoFrame> & frame, int64 videoTrackId) |
| 14 | + { |
| 15 | + // Need to be optimized |
| 16 | + int FinalReturnResult = AGORA_UE_ERR_CODE(ERROR_NULLPTR); |
| 17 | +
|
| 18 | + // // Convert UEBP to CppType |
| 19 | + // base::ExternalVideoFrame* Raw_frame = nullptr; UABT::New_CustomRawDataArray<base::ExternalVideoFrame, FUABT_ExternalVideoFrame>(Raw_frame,frame, 1); |
| 20 | +
|
| 21 | + // unsigned int Raw_videoTrackId = videoTrackId; |
| 22 | +
|
| 23 | + // // Call Native Method |
| 24 | + |
| 25 | + // auto ret = _NativePtr->pushVideoFrame(Raw_frame, Raw_videoTrackId); |
| 26 | +
|
| 27 | + // // Free Data if neeeded |
| 28 | + // UABT::Free_CustomRawDataArray<base::ExternalVideoFrame, FUABT_ExternalVideoFrame>(Raw_frame, 1); |
| 29 | +
|
| 30 | + // int ReturnVal = ret; |
| 31 | + // FinalReturnResult = ReturnVal; |
| 32 | +
|
| 33 | + // Need to be optimized |
| 34 | + return FinalReturnResult; |
| 35 | + } |
| 36 | + `, |
| 37 | + }, |
| 38 | + |
| 39 | + 'agora::rtc::IRtcEngine.getScreenCaptureSources': { |
| 40 | + ...rc_empty_data, |
| 41 | + doReplceImpl: true, |
| 42 | + impl: ` |
| 43 | + UAgoraBPuScreenCaptureSourceList * UAgoraBPuRtcEngine::GetScreenCaptureSources(const FUABT_SIZE & thumbSize, const FUABT_SIZE & iconSize, const bool & includeScreen) |
| 44 | + { |
| 45 | + // Need to be optimized |
| 46 | + UAgoraBPuScreenCaptureSourceList * FinalReturnResult = nullptr; |
| 47 | +
|
| 48 | +
|
| 49 | +// #if defined(_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE) |
| 50 | +
|
| 51 | +// // Convert UEBP to CppType |
| 52 | +// agora::rtc::SIZE Raw_thumbSize = thumbSize.CreateRawData(); |
| 53 | +
|
| 54 | +// agora::rtc::SIZE Raw_iconSize = iconSize.CreateRawData(); |
| 55 | +
|
| 56 | +// bool Raw_includeScreen = includeScreen; |
| 57 | +
|
| 58 | +// // Call Native Method |
| 59 | + |
| 60 | +// auto ret = AgoraUERtcEngine::Get()->getScreenCaptureSources(Raw_thumbSize, Raw_iconSize, Raw_includeScreen); |
| 61 | +
|
| 62 | +// // Free Data if neeeded |
| 63 | +// thumbSize.FreeRawData(Raw_thumbSize); |
| 64 | +
|
| 65 | +// iconSize.FreeRawData(Raw_iconSize); |
| 66 | +
|
| 67 | + |
| 68 | +
|
| 69 | +
|
| 70 | +// UAgoraBPuScreenCaptureSourceList * ReturnVal = ret; |
| 71 | +// FinalReturnResult = ReturnVal; |
| 72 | +
|
| 73 | +
|
| 74 | +
|
| 75 | +// #endif |
| 76 | +
|
| 77 | + // Need to be optimized |
| 78 | + return FinalReturnResult; |
| 79 | +
|
| 80 | + } |
| 81 | + `, |
| 82 | + }, |
| 83 | + |
| 84 | + 'agora::rtc::IMediaPlayer.setPlayerOptionInInt': { |
| 85 | + ...rc_empty_data, |
| 86 | + doReplceImpl: true, |
| 87 | + impl: ` |
| 88 | +int UAgoraBPuMediaPlayer::SetPlayerOptionInInt(const FString & key, int value) |
| 89 | + { |
| 90 | + // Need to be optimized |
| 91 | + int FinalReturnResult = AGORA_UE_ERR_CODE(ERROR_NULLPTR); |
| 92 | +
|
| 93 | +
|
| 94 | +
|
| 95 | +
|
| 96 | + // Convert UEBP to CppType |
| 97 | + std::string Raw_key = TCHAR_TO_UTF8(*key); |
| 98 | + int Raw_value = value; |
| 99 | +
|
| 100 | + // Call Native Method |
| 101 | + |
| 102 | + // REPLACE_REPLACE!!! |
| 103 | + auto ret = _NativePtr->setPlayerOption(Raw_key.c_str(), Raw_value); |
| 104 | +
|
| 105 | + // Free Data if neeeded |
| 106 | + |
| 107 | +
|
| 108 | + int ReturnVal = ret; |
| 109 | + FinalReturnResult = ReturnVal; |
| 110 | +
|
| 111 | + // Need to be optimized |
| 112 | + return FinalReturnResult; |
| 113 | +
|
| 114 | + } |
| 115 | + `, |
| 116 | + }, |
| 117 | + |
| 118 | + 'agora::rtc::IMediaPlayer.setPlayerOptionInString': { |
| 119 | + ...rc_empty_data, |
| 120 | + doReplceImpl: true, |
| 121 | + impl: ` |
| 122 | + int UAgoraBPuMediaPlayer::SetPlayerOptionInString(const FString & key, const FString & value) |
| 123 | + { |
| 124 | + // Need to be optimized |
| 125 | + int FinalReturnResult = AGORA_UE_ERR_CODE(ERROR_NULLPTR); |
| 126 | +
|
| 127 | + // Convert UEBP to CppType |
| 128 | + std::string Raw_key = TCHAR_TO_UTF8(*key); |
| 129 | + std::string Raw_value = TCHAR_TO_UTF8(*value); |
| 130 | +
|
| 131 | + // Call Native Method |
| 132 | + |
| 133 | + auto ret = _NativePtr->setPlayerOption(Raw_key.c_str(), Raw_value.c_str()); |
| 134 | +
|
| 135 | +// Free Data if neeeded |
| 136 | + |
| 137 | +
|
| 138 | + int ReturnVal = ret; |
| 139 | + FinalReturnResult = ReturnVal; |
| 140 | +
|
| 141 | + // Need to be optimized |
| 142 | + return FinalReturnResult; |
| 143 | + |
| 144 | + } |
| 145 | + `, |
| 146 | + }, |
| 147 | + |
| 148 | + 'agora::rtc::IMusicPlayer.openWithSongCode': { |
| 149 | + ...rc_empty_data, |
| 150 | + doReplceImpl: true, |
| 151 | + impl: ` |
| 152 | + int UAgoraBPuMusicPlayer::OpenWithSongCode(int64 songCode, int64 startPos) |
| 153 | + { |
| 154 | + // Need to be optimized |
| 155 | + int FinalReturnResult = AGORA_UE_ERR_CODE(ERROR_NULLPTR); |
| 156 | +
|
| 157 | +
|
| 158 | +
|
| 159 | +
|
| 160 | + // Convert UEBP to CppType |
| 161 | + int64_t Raw_songCode = songCode; |
| 162 | + int64_t Raw_startPos = startPos; |
| 163 | +
|
| 164 | + // Call Native Method |
| 165 | + |
| 166 | + auto ret = _NativePtr->open(Raw_songCode, Raw_startPos); |
| 167 | +
|
| 168 | + // Free Data if neeeded |
| 169 | + |
| 170 | +
|
| 171 | + int ReturnVal = ret; |
| 172 | + FinalReturnResult = ReturnVal; |
| 173 | +
|
| 174 | +
|
| 175 | + // Need to be optimized |
| 176 | + return FinalReturnResult; |
| 177 | +
|
| 178 | + } |
| 179 | + `, |
| 180 | + }, |
| 181 | +}; |
0 commit comments