bef_effect_ai_message_define.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. //
  2. // bef_effect_ai_message_define.h
  3. // effect-sdk
  4. //
  5. //
  6. #ifndef bef_effect_ai_message_define_h
  7. #define bef_effect_ai_message_define_h
  8. // Message type, corresponding to the unMsgID parameter in the msgProc interface
  9. #define RENDER_MSG_TYPE_RESOURCE 0x00000011
  10. #define RENDER_MSG_TYPE_2D_ANIMATION_CYCLE 0x00000012 // End of sequence frame playback
  11. #define RENDER_MSG_TYPE_BODY_DANCE 0x00000013
  12. #define RENDER_MSG_TYPE_EFFECT 0x00000014
  13. #define RENDER_MSG_TYPE_AUDIO_PLAYER 0x00000015
  14. #define RENDER_MSG_TYPE_APP_STATUS 0x00000016
  15. #define RENDER_MSG_TYPE_ALGORITHM_CHANGE 0x00000017
  16. #define RENDER_MSG_TYPE_ENIGMA 0x00000018
  17. #define RENDER_MSG_TYPE_MONITOR 0x00000019
  18. #define RENDER_MSG_TYPE_PAGE 0x00000020
  19. #define RENDER_MSG_TYPE_ARSCAN 0x0000001A // AR scan triggers egg or jump message
  20. #define RENDER_MSG_TYPE_ALGO_SCENE 0x0000001B
  21. #define RENDER_MSG_TYPE_STICKER_LOCATION 0x0000001C // Sticker location information
  22. #define RENDER_MSG_TYPE_FACE_INFO 0x0000001D
  23. #define RENDER_MSG_TYPE_PIXELLOOP_START 0x0000001E
  24. #define RENDER_MSG_TYPE_PIXELLOOP_FINISH 0x0000001F
  25. #define RENDER_MSG_TYPE_3DV3 0x00000020
  26. #define RENDER_MSG_TYPE_AVATAR_DISTANCE_TOO_CLOSE 0x00000021
  27. #define RENDER_MSG_TYPE_MEMOJI_SCAN_INFO 0x00002000
  28. #define RENDER_MSG_TYPE_GAME_DATA 0x0000002A //client <-> effect: game data
  29. #define RENDER_MSG_TYPE_VOICE_RECORD 0x0000002B //effect -> livecore: record control
  30. #define RENDER_MSG_TYPE_GAME_MUSIC_END 0x0000002C //client -> effect: game music play end
  31. #define RENDER_MSG_TYPE_GAME_REQ 0x0000002D //effect -> client: game req
  32. #define RENDER_MSG_TYPE_GAME_NTF 0x0000002E //client -> effect: game ntf
  33. #define RENDER_MSG_TYPE_GAME_MUSIC_REQ 0x0000002F //effect -> client: game music req
  34. #define RENDER_MSG_TYPE_START_RECORD 0x00000030 //effect -> client: game start record
  35. #define RENDER_MSG_TYPE_STOP_RECORD 0x00000031 //effect -> client: game stop record
  36. #define RENDER_MSG_TYPE_STICKER_LOAD_CNT 0x00000032 //client -> effect: game load cnt
  37. #define RENDER_MSG_TYPE_STICKER_ASK_LOAD_CNT 0x00000033 //effect -> client: ask for load cnt message
  38. #define RENDER_MSG_TYPE_ARSCAN_STICKER 0x00000035 // effect -> client: AR scan to switch sticker messages
  39. #define RENDER_MSG_TYPE_VRBRUSH_STICKER 0x00000036 // effect -> client: VR brush sticker message
  40. #define RENDER_MSG_TYPE_GENERAL_AUDIO 0x0000003A // sdk --> VE, general audio
  41. #define RENDER_MSG_TYPE_VE_AUDIO 0x0000003B // VE --> sdk, general audio
  42. // ar扫一扫切贴纸 arg1
  43. #define RENDER_MSG_TYPE_ARSCAN_STICKER_RENDER 0x000001 // 渲染用贴纸
  44. #define RENDER_MSG_TYPE_ARSCAN_STICKER_ENTRY 0x000002 // 入口贴纸(一般只包含各种识别算法)
  45. // AR scan to switch sticker message arg1
  46. #define RENDER_MSG_TYPE_ARSCAN_STICKER_RENDER 0x000001 // Rendering stickers
  47. #define RENDER_MSG_TYPE_ARSCAN_STICKER_ENTRY 0x000002 // Entrance sticker (generally only contains various recognition algorithms)
  48. // ar scan triggers egg or jump message arg1
  49. #define RENDER_MSG_TYPE_ARSCAN_ALGORITHM 0x000001 // Algorithm recognition results
  50. #define RENDER_MSG_TYPE_ARSCAN_OTHER 0x000002 // Other triggering methods (such as clicking stickers, etc.)
  51. // ar scan triggers egg or jump message arg2
  52. #define RENDER_MSG_TYPE_ARSCAN_UNAVAILABLE 0x000001
  53. #define RENDER_MSG_TYPE_ARSCAN_MATCHING 0x000002
  54. #define RENDER_MSG_TYPE_ARSCAN_TRACKED 0x000003
  55. #define RENDER_MSG_TYPE_ARSCAN_LOSING 0x000004
  56. #define RENDER_MSG_TYPE_ARSCAN_LOST 0x000005
  57. #define RENDER_MSG_TYPE_ARSCAN_ERROR 0x000006
  58. // VR brush sticker message
  59. #define RENDER_MSG_TYPE_VRBRUSH_MODE_ROTATION 0x00000001 // Rotate view mode
  60. #define RENDER_MSG_TYPE_VRBRUSH_MODE_STROKE 0x00000002 // Stroke mode
  61. #define RENDER_MSG_TYPE_VRBRUSH_MODE_RECTANGLE 0x00000003 // Rectangle mode
  62. #define RENDER_MSG_TYPE_VRBRUSH_MODE_CIRCLE 0x00000004 // Circle mode
  63. #define RENDER_MSG_TYPE_VRBRUSH_MODE_ERASE 0x00000005 // Erase mode
  64. #define RENDER_MSG_TYPE_VRBRUSH_MODE_UNDO 0x00000006 // Undo operator
  65. #define RENDER_MSG_TYPE_VRBRUSH_MODE_REDO 0x00000007 // Redo operator
  66. #define RENDER_MSG_TYPE_VRBRUSH_MODE_RESET 0x00000008 // Reset operator
  67. #define RENDER_MSG_TYPE_VRBRUSH_UNDO_STACK 0x00000010 // Undo/Redo Stack depth
  68. #define RENDER_MSG_TYPE_VRBRUSH_REDO_STACK 0x00000011
  69. //memoji arg1
  70. #define RENDER_MSG_TYPE_MEMOJI_SCAN_BEGIN 0x00001
  71. #define RENDER_MSG_TYPE_MEMOJI_SCAN_NORMAL 0x00002
  72. #define RENDER_MSG_TYPE_MEMOJI_SCAN_NO_FACE 0x00003
  73. #define RENDER_MSG_TYPE_MEMOJI_SCAN_TOO_MANY_FACE 0x00004
  74. #define RENDER_MSG_TYPE_MEMOJI_SCAN_FACE_NEED_CORRECT 0x00005
  75. #define RENDER_MSG_TYPE_MEMOJI_SCAN_FACE_CHANGE 0x00006
  76. #define RENDER_MSG_TYPE_MEMOJI_SCAN_COMPLETE 0x00007
  77. #define RENDER_MSG_TYPE_MEMOJI_SCAN_FACE_UNKNOW_ERROR 0x00008
  78. #define RENDER_MSG_TYPE_MEMOJI_SCAN_MERGE_END 0x00009
  79. #define RENDER_MSG_TYPE_FACE_ATTRIBUTIONS 0x00000022 // Face attributes
  80. #define RENDER_MSG_TYPE_FACE_VERIFY 0x00000023 // Face feature vector
  81. #define BEF_MSG_TYPE_WEATHER_INFO 0x00001010 // client -> effect: weather information
  82. // Weather type, corresponding to arg3 parameter
  83. #define BEF_MSG_TYPE_WEATHER_SUNNY "sunny"
  84. #define BEF_MSG_TYPE_WEATHER_CLOUDY "cloudy"
  85. #define BEF_MSG_TYPE_WEATHER_SUNLESS "sunless"
  86. #define BEF_MSG_TYPE_WEATHER_RAINY "rainy"
  87. #define BEF_MSG_TYPE_WEATHER_THUNDERSTORM "thunderstorm"
  88. #define BEF_MSG_TYPE_WEATHER_SNOW "snow"
  89. #define BEF_MSG_TYPE_WEATHER_HAZE "haze"
  90. #define BEF_MSG_TYPE_WEATHER_FOGGY "foggy"
  91. #define BEF_MSG_TYPE_WEATHER_SANDSTORM "sandstorm"
  92. #define BEF_MSG_TYPE_WEATHER_WINDY "windy"
  93. #define BEF_MSG_TYPE_WEATHER_OTHERS "others"
  94. ///////////////////////arg1 parameter type/////////////////////////////////
  95. #define RENDER_MSG_EVENT_EXIT_GAME 0x00000000 // RENDER_MSG_TYPE_GAME_REQ arg1: exit game
  96. #define RENDER_MSG_EVENT_REPLAY_GAME 0x00000001 // RENDER_MSG_TYPE_GAME_REQ arg1: restart game
  97. #define RENDER_MSG_EVENT_GAME_READY 0x00000002 // RENDER_MSG_TYPE_GAME_REQ arg1: game resource is ready
  98. #define RENDER_MSG_EVENT_GAME_END 0x00000003 // RENDER_MSG_TYPE_GAME_REQ arg1: game end
  99. #define RENDER_MSG_EVENT_STOP_GAME_BGM 0x00000000 // RENDER_MSG_TYPE_GAME_MUSIC_REQ arg1: stop playing bgm
  100. #define RENDER_MSG_EVENT_PLAY_GAME_BGM 0x00000001 // RENDER_MSG_TYPE_GAME_MUSIC_REQ arg1: start playing bgm
  101. #define RENDER_MSG_EVENT_VOICE_RECORD_START 0x00000000 // RENDER_MSG_TYPE_VOICE_RECORD arg1, effect->livecore
  102. #define RENDER_MSG_EVENT_VOICE_RECORD_STOP 0x00000001 // RENDER_MSG_TYPE_VOICE_RECORD arg1, effect->livecore
  103. #define RENDER_MSG_EVENT_VOICE_RECORD_FILEPATH 0x00000002 // RENDER_MSG_TYPE_VOICE_RECORD arg1, livecore->effect
  104. // arg1 for RENDER_MSG_TYPE_GENERAL_AUDIO
  105. #define RENDER_MSG_EVENT_AUDIO_INIT 0x00000001
  106. #define RENDER_MSG_EVENT_AUDIO_FILE_WRITTEN 0x00000002
  107. // arg1 for RENDER_MSG_TYPE_VE_AUDIO
  108. #define RENDER_MSG_EVENT_RECORD_CLIP_KEY 0x00000002
  109. #define BEF_MSG_TYPE_WEATHER_LEVEL1 0x00000001
  110. #define BEF_MSG_TYPE_WEATHER_LEVEL2 0x00000002
  111. #define BEF_MSG_TYPE_WEATHER_LEVEL3 0x00000003
  112. #define BEF_MSG_TYPE_WEATHER_LEVEL4 0x00000004
  113. #define RENDER_MSG_TYPE_ANIMATION_FINISH 0x00000101
  114. // Background switching message type
  115. #define RENDER_MSG_TYPE_APP_STATUS_PAUSE 0x0000000
  116. #define RENDER_MSG_TYPE_APP_STATUS_RESUME 0x0000001
  117. // Event status : initialization
  118. #define RENDER_MSG_EVENT_LOAD_INIT 0x00000001
  119. // Event status : loading
  120. #define RENDER_MSG_EVENT_LOAD_LOADING 0x00000002
  121. // Event status : Successfully loaded
  122. #define RENDER_MSG_EVENT_LOAD_SUCCESS 0x00000003
  123. // Event status : Failed to load
  124. #define RENDER_MSG_EVENT_LOAD_FAIL 0x00000004
  125. //temp
  126. #define RENDER_MSG_EVENT_WILL_SWITCH_EFFECT 0x00000005
  127. #define RENDER_MSG_EVENT_DID_SWITCH_EFFECT 0x00000006
  128. // Music path
  129. #define RENDER_MSG_EVENT_MUSIC_PATH 0x00000007
  130. // lua call
  131. #define RENDER_MSG_EVENT_TRIGGER 0x00000008
  132. #define RENDER_MSG_EVENT_2D_ANIMATION_CYCLE_FINISH 0x00000005 // End of sequence frame playback
  133. // Error type : Configuration parsing error, it may be caused by incompatible configuration file format after upgrade
  134. #define GPU_MSG_ERROR_TYPE_CONFIG 0x00001001
  135. #define RENDER_MSG_TYPE_BODY_DANCE_CATEGORY_ADJUST 0x00000001
  136. #define RENDER_MSG_TYPE_BODY_DANCE_CATEGORY_SCORE 0x00000002
  137. #define RENDER_MSG_TYPE_AUDIO_PLAYER_START 0x00000001
  138. #define RENDER_MSG_TYPE_AUDIO_PLAYER_END 0x00000002
  139. #define RENDER_MSG_TYPE_AUDIO_PLAYER_PAUSE 0x00000003
  140. #define RENDER_MSG_TYPE_AUDIO_PLAYER_RESUME 0x00000004
  141. #define RENDER_MSG_TYPE_PAGE_PREVIEW 0x00000001 // Preview status
  142. #define RENDER_MSG_TYPE_PAGE_CAPTURE 0x00000002 // Photo status
  143. #define RENDER_MSG_TYPE_PAGE_RECORD 0x00000003 // Recording status
  144. #define RENDER_MSG_TYPE_PAGE_ALBUM 0x00000004 // Album import
  145. #define RENDER_MSG_TYPE_PAGE_VOIP 0x00000005 // Video call
  146. // Monitoring message type
  147. #define RENDER_MSG_TYPE_MONITOR_END 0x00000001
  148. #define GAME_MSG_TYPE_START_NTF 0x00001001 //client -> effect: Start game notification
  149. #define GAME_MSG_TYPE_END_NTF 0x00001002 //client -> effect: End game notification
  150. #define GAME_MSG_TYPE_END_REQ 0x00001003 //effect -> client: End game request
  151. #define GAME_MSG_TYPE_PAUSE_NTF 0x00001004 //client -> effect: Pause game notification
  152. #define GAME_MSG_TYPE_RESUME_NTF 0x00001005 //client -> effect: Resume game notification
  153. #define GAME_MSG_TYPE_RESTART_NTF 0x00001006 //client -> effect: Restart game notification
  154. #define GAME_MSG_TYPE_CHALLENGE_NTF 0x00001007 //client -> effect: Challenge game notification, nArg1 is opponent's score
  155. #define GAME_MSG_TYPE_RESOURCE_LOADED 0x00001008 //effect -> client: game resource is loaded
  156. /// RENDER_MSG_TYPE_ALGORITHM_CHANGE
  157. #define BEF_ALGORITHM_CHANGE_FACE_COUNT 0x00000001
  158. #define RENDER_MSG_TYPE_ENIGMA_COMPLETE 0x00000001
  159. #define RENDER_MSG_TYPE_ENIGMA_PARAM_ERROR 0x00000002
  160. // Input keyboard
  161. #define BEF_MSG_TYPE_SHOW_INPUT_KEYBOARD 0x0000020
  162. #define BEF_MSG_TYPE_HIDE_INPUT_KEYBOARD 0x0000021
  163. #define BEF_MSG_TYPE_DEBUG_INFO_GPU_MEMPORY 0x0000023 // effect -> client: Current GPU memory value (arg2)
  164. #define BEF_MSG_TYPE_OPEN_DEBUG_INFO 0x0000024 // client -> effect: enable(arg2 = 1)/disable(arg2 = 0) GPU memory monitoring
  165. #define BEF_MSG_TYPE_FEATURE_DEBUG_INFO 0x0000025 // feature debug infomation
  166. #define BEF_MSG_TYPE_LOG_MONITOR 0x0000040
  167. // arg1
  168. #define BEF_MSG_TYPE_LOG_MONITOR_LOAD_STICKER 0x0000001
  169. #define BEF_MSG_TYPE_LOG_MONITOR_LOAD_MODEL 0x0000002
  170. #define BEF_MSG_TYPE_VIDEO_CONTROL 0x00000034 // effect -> client: Control video background
  171. // Control video background: arg1
  172. #define BEF_MSG_TYPE_VIDEO_CONTROL_PLAY 0x0000001 // Play
  173. #define BEF_MSG_TYPE_VIDEO_CONTROL_PAUSE 0x0000002 // Pause
  174. #define BEF_MSG_TYPE_VIDEO_CONTROL_RESTART 0x0000003 // restart
  175. // livecore audio recognize sticker arg1
  176. #define BEF_MSG_TYPE_AUDIO_RECOGNIZE 0x3F3F // 16191 base10
  177. #define BEF_MSG_TYPE_IMAGE_CAPTURE 0x00000045 // effect -> client: image captured
  178. #define BEF_MSG_TYPE_GENERAL_STATUS 0x00000046 // effect -> client: send in lua generally, expose various status information to client, used to manage, etc.
  179. #define BEF_MSG_TYPE_LICENSE_CHECK 0x2b0010
  180. #define BEF_CHECK_EVENT_ONLINE 0x0001
  181. #define BEF_CHECK_EVENT_OFFLINE 0x0002
  182. #define BEF_MSG_TYPE_MODEL_MISS 0x2b0011
  183. #define BEF_MSG_TYPE_EFFECT_INIT 0x2b0012
  184. #define BEF_RESLOAD_CHECK_LOADED 0x0001
  185. #define BEF_RESLOAD_TIMEOUT 0x0002
  186. #define BEF_RESLOAD_PREPARE 0x0003
  187. #define BEF_RESLOAD_SWITCH 0x0004
  188. #define BEF_RESLOAD_CONFIG 0x0005
  189. #define BEF_RESLOAD_FEATURE_BUILD 0x0006
  190. #import <TargetConditionals.h>
  191. #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
  192. #import <UIKit/UIKit.h>
  193. #elif TARGET_OS_OSX
  194. #import <AppKit/AppKit.h>
  195. #endif
  196. @protocol RenderMsgDelegate <NSObject>
  197. // 消息处理,处理该消息了返回TRUE,否则返回FALSE
  198. /// @brief 处理消息回调
  199. /// @param unMsgID 消息ID
  200. /// @param nArg1 附加参数1
  201. /// @param nArg2 附加参数2
  202. /// @param cArg3 附加参数3
  203. /// @return 成功返回YES,失败返回NO
  204. - (BOOL) msgProc : (unsigned int) unMsgID
  205. arg1: (int) nArg1
  206. arg2: (int) nArg2
  207. arg3: (const char*) cArg3;
  208. @end
  209. @interface IRenderMsgDelegateManager : NSObject
  210. - (void)addDelegate : (id<RenderMsgDelegate>) pMsgDelegate;
  211. - (void)removeDelegate : (id<RenderMsgDelegate>) pMsgDelegate;
  212. - (BOOL) delegateProc : (unsigned int) unMsgID
  213. arg1: (int) nArg1
  214. arg2: (int) nArg2
  215. arg3: (const char*) cArg3;
  216. - (void)destoryDelegate;
  217. @end
  218. #endif /* bef_effect_ai_message_define_h */