react-native-audio-api 0.10.0-nightly-e16d7ff-20251030 → 0.11.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/RNAudioAPI.podspec +11 -16
  2. package/android/build.gradle +3 -33
  3. package/android/src/main/cpp/audioapi/CMakeLists.txt +0 -6
  4. package/android/src/main/cpp/audioapi/android/AudioAPIModule.cpp +0 -5
  5. package/android/src/main/cpp/audioapi/android/AudioAPIModule.h +0 -1
  6. package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.cpp +142 -28
  7. package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.h +40 -13
  8. package/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp +2 -4
  9. package/android/src/main/cpp/audioapi/android/core/NativeAudioRecorder.hpp +9 -9
  10. package/android/src/main/cpp/audioapi/android/core/utils/AndroidFileWriterBackend.h +37 -0
  11. package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.cpp +187 -0
  12. package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.h +57 -0
  13. package/android/src/main/cpp/audioapi/android/core/utils/AudioDecoder.cpp +0 -6
  14. package/android/src/main/cpp/audioapi/android/core/utils/FileUtils.h +34 -0
  15. package/android/src/main/cpp/audioapi/android/core/utils/FileUtilts.cpp +133 -0
  16. package/android/src/main/cpp/audioapi/android/core/utils/MiniaudioImplementation.cpp +3 -0
  17. package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.cpp +154 -0
  18. package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.h +41 -0
  19. package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.cpp +429 -0
  20. package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.h +113 -0
  21. package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.cpp +47 -0
  22. package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.h +28 -0
  23. package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.cpp +269 -0
  24. package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.h +47 -0
  25. package/android/src/main/cpp/audioapi/android/system/NativeFileInfo.hpp +31 -0
  26. package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +3 -29
  27. package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +9 -21
  28. package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +6 -27
  29. package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +0 -11
  30. package/android/src/main/java/com/swmansion/audioapi/system/NativeFileInfo.kt +18 -0
  31. package/android/src/main/jniLibs/arm64-v8a/libavcodec.so +0 -0
  32. package/android/src/main/jniLibs/arm64-v8a/libavformat.so +0 -0
  33. package/android/src/main/jniLibs/arm64-v8a/libavutil.so +0 -0
  34. package/android/src/main/jniLibs/arm64-v8a/libswresample.so +0 -0
  35. package/android/src/main/jniLibs/armeabi-v7a/libavcodec.so +0 -0
  36. package/android/src/main/jniLibs/armeabi-v7a/libavformat.so +0 -0
  37. package/android/src/main/jniLibs/armeabi-v7a/libavutil.so +0 -0
  38. package/android/src/main/jniLibs/armeabi-v7a/libswresample.so +0 -0
  39. package/android/src/main/jniLibs/x86/libavcodec.so +0 -0
  40. package/android/src/main/jniLibs/x86/libavformat.so +0 -0
  41. package/android/src/main/jniLibs/x86/libavutil.so +0 -0
  42. package/android/src/main/jniLibs/x86/libswresample.so +0 -0
  43. package/android/src/main/jniLibs/x86_64/libavcodec.so +0 -0
  44. package/android/src/main/jniLibs/x86_64/libavformat.so +0 -0
  45. package/android/src/main/jniLibs/x86_64/libavutil.so +0 -0
  46. package/android/src/main/jniLibs/x86_64/libswresample.so +0 -0
  47. package/common/cpp/audioapi/AudioAPIModuleInstaller.h +2 -30
  48. package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.cpp +0 -18
  49. package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +0 -1
  50. package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.cpp +1 -1
  51. package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.cpp +97 -18
  52. package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +18 -6
  53. package/common/cpp/audioapi/core/AudioNode.h +2 -3
  54. package/common/cpp/audioapi/core/AudioParam.cpp +2 -2
  55. package/common/cpp/audioapi/core/BaseAudioContext.cpp +0 -10
  56. package/common/cpp/audioapi/core/BaseAudioContext.h +0 -2
  57. package/common/cpp/audioapi/core/effects/BiquadFilterNode.cpp +32 -69
  58. package/common/cpp/audioapi/core/effects/BiquadFilterNode.h +1 -37
  59. package/common/cpp/audioapi/core/inputs/AudioRecorder.cpp +36 -82
  60. package/common/cpp/audioapi/core/inputs/AudioRecorder.h +52 -31
  61. package/common/cpp/audioapi/core/sources/StreamerNode.cpp +58 -59
  62. package/common/cpp/audioapi/core/sources/StreamerNode.h +8 -37
  63. package/common/cpp/audioapi/core/utils/AudioNodeManager.cpp +0 -5
  64. package/common/cpp/audioapi/core/utils/Constants.h +1 -2
  65. package/common/cpp/audioapi/core/utils/worklets/SafeIncludes.h +10 -0
  66. package/common/cpp/audioapi/dsp/AudioUtils.cpp +1 -1
  67. package/common/cpp/audioapi/dsp/FFT.cpp +26 -0
  68. package/common/cpp/audioapi/dsp/FFT.h +2 -26
  69. package/common/cpp/audioapi/external/arm64-v8a/libcrypto.a +0 -0
  70. package/common/cpp/audioapi/external/arm64-v8a/libogg.a +0 -0
  71. package/common/cpp/audioapi/external/arm64-v8a/libopus.a +0 -0
  72. package/common/cpp/audioapi/external/arm64-v8a/libopusfile.a +0 -0
  73. package/common/cpp/audioapi/external/arm64-v8a/libssl.a +0 -0
  74. package/common/cpp/audioapi/external/arm64-v8a/libvorbis.a +0 -0
  75. package/common/cpp/audioapi/external/arm64-v8a/libvorbisenc.a +0 -0
  76. package/common/cpp/audioapi/external/arm64-v8a/libvorbisfile.a +0 -0
  77. package/common/cpp/audioapi/external/armeabi-v7a/libcrypto.a +0 -0
  78. package/common/cpp/audioapi/external/armeabi-v7a/libogg.a +0 -0
  79. package/common/cpp/audioapi/external/armeabi-v7a/libopus.a +0 -0
  80. package/common/cpp/audioapi/external/armeabi-v7a/libopusfile.a +0 -0
  81. package/common/cpp/audioapi/external/armeabi-v7a/libssl.a +0 -0
  82. package/common/cpp/audioapi/external/armeabi-v7a/libvorbis.a +0 -0
  83. package/common/cpp/audioapi/external/armeabi-v7a/libvorbisenc.a +0 -0
  84. package/common/cpp/audioapi/external/armeabi-v7a/libvorbisfile.a +0 -0
  85. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avcodec.h +2 -2
  86. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec.h +1 -1
  87. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_desc.h +1 -1
  88. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_id.h +1 -1
  89. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_par.h +1 -1
  90. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avformat.h +2 -2
  91. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avutil.h +2 -2
  92. package/common/cpp/audioapi/external/iphoneos/libcrypto.a +0 -0
  93. package/common/cpp/audioapi/external/iphoneos/libogg.a +0 -0
  94. package/common/cpp/audioapi/external/iphoneos/libopus.a +0 -0
  95. package/common/cpp/audioapi/external/iphoneos/libopusfile.a +0 -0
  96. package/common/cpp/audioapi/external/iphoneos/libssl.a +0 -0
  97. package/common/cpp/audioapi/external/iphoneos/libvorbis.a +0 -0
  98. package/common/cpp/audioapi/external/iphoneos/libvorbisenc.a +0 -0
  99. package/common/cpp/audioapi/external/iphoneos/libvorbisfile.a +0 -0
  100. package/common/cpp/audioapi/external/iphonesimulator/libcrypto.a +0 -0
  101. package/common/cpp/audioapi/external/iphonesimulator/libogg.a +0 -0
  102. package/common/cpp/audioapi/external/iphonesimulator/libopus.a +0 -0
  103. package/common/cpp/audioapi/external/iphonesimulator/libopusfile.a +0 -0
  104. package/common/cpp/audioapi/external/iphonesimulator/libssl.a +0 -0
  105. package/common/cpp/audioapi/external/iphonesimulator/libvorbis.a +0 -0
  106. package/common/cpp/audioapi/external/iphonesimulator/libvorbisenc.a +0 -0
  107. package/common/cpp/audioapi/external/iphonesimulator/libvorbisfile.a +0 -0
  108. package/common/cpp/audioapi/external/libavcodec.xcframework/Info.plist +44 -0
  109. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/Info.plist +1 -0
  110. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
  111. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/Info.plist +1 -0
  112. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
  113. package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +44 -0
  114. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/Info.plist +1 -0
  115. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
  116. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/Info.plist +1 -0
  117. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
  118. package/common/cpp/audioapi/external/libavutil.xcframework/Info.plist +44 -0
  119. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/Info.plist +1 -0
  120. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
  121. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/Info.plist +1 -0
  122. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
  123. package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +44 -0
  124. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/Info.plist +1 -0
  125. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
  126. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/Info.plist +1 -0
  127. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
  128. package/common/cpp/audioapi/external/x86/libcrypto.a +0 -0
  129. package/common/cpp/audioapi/external/x86/libogg.a +0 -0
  130. package/common/cpp/audioapi/external/x86/libopus.a +0 -0
  131. package/common/cpp/audioapi/external/x86/libopusfile.a +0 -0
  132. package/common/cpp/audioapi/external/x86/libssl.a +0 -0
  133. package/common/cpp/audioapi/external/x86/libvorbis.a +0 -0
  134. package/common/cpp/audioapi/external/x86/libvorbisenc.a +0 -0
  135. package/common/cpp/audioapi/external/x86/libvorbisfile.a +0 -0
  136. package/common/cpp/audioapi/external/x86_64/libcrypto.a +0 -0
  137. package/common/cpp/audioapi/external/x86_64/libogg.a +0 -0
  138. package/common/cpp/audioapi/external/x86_64/libopus.a +0 -0
  139. package/common/cpp/audioapi/external/x86_64/libopusfile.a +0 -0
  140. package/common/cpp/audioapi/external/x86_64/libssl.a +0 -0
  141. package/common/cpp/audioapi/external/x86_64/libvorbis.a +0 -0
  142. package/common/cpp/audioapi/external/x86_64/libvorbisenc.a +0 -0
  143. package/common/cpp/audioapi/external/x86_64/libvorbisfile.a +0 -0
  144. package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +3 -2
  145. package/common/cpp/audioapi/libs/ffmpeg/INSTRUCTIONS.md +32 -0
  146. package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +111 -0
  147. package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +391 -0
  148. package/common/cpp/audioapi/utils/AudioBus.cpp +0 -28
  149. package/common/cpp/audioapi/utils/AudioBus.h +0 -3
  150. package/common/cpp/audioapi/utils/ThreadPool.hpp +1 -59
  151. package/common/cpp/test/CMakeLists.txt +14 -19
  152. package/ios/audioapi/ios/AudioAPIModule.h +1 -2
  153. package/ios/audioapi/ios/AudioAPIModule.mm +0 -2
  154. package/ios/audioapi/ios/core/IOSAudioFileOptions.h +36 -0
  155. package/ios/audioapi/ios/core/IOSAudioFileOptions.mm +140 -0
  156. package/ios/audioapi/ios/core/IOSAudioFileWriter.h +51 -0
  157. package/ios/audioapi/ios/core/IOSAudioFileWriter.mm +223 -0
  158. package/ios/audioapi/ios/core/IOSAudioRecorder.h +28 -10
  159. package/ios/audioapi/ios/core/IOSAudioRecorder.mm +117 -30
  160. package/ios/audioapi/ios/core/IOSRecorderCallback.h +57 -0
  161. package/ios/audioapi/ios/core/IOSRecorderCallback.mm +189 -0
  162. package/ios/audioapi/ios/core/NativeAudioRecorder.h +4 -9
  163. package/ios/audioapi/ios/core/NativeAudioRecorder.m +29 -71
  164. package/ios/audioapi/ios/core/utils/AudioDecoder.mm +1 -0
  165. package/ios/audioapi/ios/system/AudioEngine.mm +3 -3
  166. package/ios/audioapi/ios/system/AudioSessionManager.mm +0 -9
  167. package/ios/audioapi/ios/system/LockScreenManager.h +1 -0
  168. package/ios/audioapi/ios/system/LockScreenManager.mm +19 -6
  169. package/lib/commonjs/api.js +76 -141
  170. package/lib/commonjs/api.js.map +1 -1
  171. package/lib/commonjs/api.web.js +0 -8
  172. package/lib/commonjs/api.web.js.map +1 -1
  173. package/lib/commonjs/core/AudioContext.js +1 -1
  174. package/lib/commonjs/core/AudioContext.js.map +1 -1
  175. package/lib/commonjs/core/AudioRecorder.js +171 -13
  176. package/lib/commonjs/core/AudioRecorder.js.map +1 -1
  177. package/lib/commonjs/core/BaseAudioContext.js +25 -28
  178. package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
  179. package/lib/commonjs/core/OfflineAudioContext.js +1 -1
  180. package/lib/commonjs/core/OfflineAudioContext.js.map +1 -1
  181. package/lib/commonjs/types.js +46 -0
  182. package/lib/commonjs/types.js.map +1 -1
  183. package/lib/commonjs/utils/bitEnums.js +33 -0
  184. package/lib/commonjs/utils/bitEnums.js.map +1 -0
  185. package/lib/commonjs/utils/index.js +21 -19
  186. package/lib/commonjs/utils/index.js.map +1 -1
  187. package/lib/commonjs/web-core/AudioContext.js +0 -12
  188. package/lib/commonjs/web-core/AudioContext.js.map +1 -1
  189. package/lib/commonjs/web-core/OfflineAudioContext.js +0 -12
  190. package/lib/commonjs/web-core/OfflineAudioContext.js.map +1 -1
  191. package/lib/module/api.js +15 -16
  192. package/lib/module/api.js.map +1 -1
  193. package/lib/module/api.web.js +0 -1
  194. package/lib/module/api.web.js.map +1 -1
  195. package/lib/module/core/AudioContext.js +2 -2
  196. package/lib/module/core/AudioContext.js.map +1 -1
  197. package/lib/module/core/AudioRecorder.js +171 -13
  198. package/lib/module/core/AudioRecorder.js.map +1 -1
  199. package/lib/module/core/BaseAudioContext.js +26 -29
  200. package/lib/module/core/BaseAudioContext.js.map +1 -1
  201. package/lib/module/core/OfflineAudioContext.js +2 -2
  202. package/lib/module/core/OfflineAudioContext.js.map +1 -1
  203. package/lib/module/types.js +45 -1
  204. package/lib/module/types.js.map +1 -1
  205. package/lib/module/utils/bitEnums.js +27 -0
  206. package/lib/module/utils/bitEnums.js.map +1 -0
  207. package/lib/module/utils/index.js +2 -15
  208. package/lib/module/utils/index.js.map +1 -1
  209. package/lib/module/web-core/AudioContext.js +0 -12
  210. package/lib/module/web-core/AudioContext.js.map +1 -1
  211. package/lib/module/web-core/OfflineAudioContext.js +0 -12
  212. package/lib/module/web-core/OfflineAudioContext.js.map +1 -1
  213. package/lib/typescript/api.d.ts +17 -19
  214. package/lib/typescript/api.d.ts.map +1 -1
  215. package/lib/typescript/api.web.d.ts +0 -1
  216. package/lib/typescript/api.web.d.ts.map +1 -1
  217. package/lib/typescript/core/AudioContext.d.ts.map +1 -1
  218. package/lib/typescript/core/AudioRecorder.d.ts +62 -7
  219. package/lib/typescript/core/AudioRecorder.d.ts.map +1 -1
  220. package/lib/typescript/core/BaseAudioContext.d.ts +1 -3
  221. package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
  222. package/lib/typescript/events/types.d.ts +16 -0
  223. package/lib/typescript/events/types.d.ts.map +1 -1
  224. package/lib/typescript/interfaces.d.ts +42 -9
  225. package/lib/typescript/interfaces.d.ts.map +1 -1
  226. package/lib/typescript/types.d.ts +79 -8
  227. package/lib/typescript/types.d.ts.map +1 -1
  228. package/lib/typescript/utils/bitEnums.d.ts +4 -0
  229. package/lib/typescript/utils/bitEnums.d.ts.map +1 -0
  230. package/lib/typescript/utils/index.d.ts +2 -5
  231. package/lib/typescript/utils/index.d.ts.map +1 -1
  232. package/lib/typescript/web-core/AudioContext.d.ts +0 -3
  233. package/lib/typescript/web-core/AudioContext.d.ts.map +1 -1
  234. package/lib/typescript/web-core/BaseAudioContext.d.ts +0 -2
  235. package/lib/typescript/web-core/BaseAudioContext.d.ts.map +1 -1
  236. package/lib/typescript/web-core/OfflineAudioContext.d.ts +0 -3
  237. package/lib/typescript/web-core/OfflineAudioContext.d.ts.map +1 -1
  238. package/package.json +4 -7
  239. package/src/api.ts +18 -45
  240. package/src/api.web.ts +0 -1
  241. package/src/core/AudioContext.ts +2 -3
  242. package/src/core/AudioRecorder.ts +211 -24
  243. package/src/core/BaseAudioContext.ts +60 -67
  244. package/src/core/OfflineAudioContext.ts +2 -2
  245. package/src/events/types.ts +18 -0
  246. package/src/interfaces.ts +52 -16
  247. package/src/types.ts +90 -9
  248. package/src/utils/bitEnums.ts +51 -0
  249. package/src/utils/index.ts +2 -22
  250. package/src/web-core/AudioContext.tsx +0 -25
  251. package/src/web-core/BaseAudioContext.tsx +0 -2
  252. package/src/web-core/OfflineAudioContext.tsx +0 -25
  253. package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.cpp +0 -47
  254. package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.h +0 -20
  255. package/common/cpp/audioapi/core/effects/ConvolverNode.cpp +0 -210
  256. package/common/cpp/audioapi/core/effects/ConvolverNode.h +0 -55
  257. package/common/cpp/audioapi/dsp/Convolver.cpp +0 -213
  258. package/common/cpp/audioapi/dsp/Convolver.h +0 -45
  259. package/common/cpp/audioapi/libs/ffmpeg/relinking.md +0 -24
  260. package/common/cpp/audioapi/utils/AlignedAllocator.hpp +0 -50
  261. package/common/cpp/test/src/biquad/BiquadFilterChromium.cpp +0 -389
  262. package/common/cpp/test/src/biquad/BiquadFilterChromium.h +0 -64
  263. package/common/cpp/test/src/biquad/BiquadFilterTest.cpp +0 -284
  264. package/common/cpp/test/src/biquad/BiquadFilterTest.h +0 -40
  265. package/lib/commonjs/core/ConvolverNode.js +0 -37
  266. package/lib/commonjs/core/ConvolverNode.js.map +0 -1
  267. package/lib/commonjs/web-core/ConvolverNode.js +0 -40
  268. package/lib/commonjs/web-core/ConvolverNode.js.map +0 -1
  269. package/lib/commonjs/web-core/ConvolverNodeOptions.js +0 -6
  270. package/lib/commonjs/web-core/ConvolverNodeOptions.js.map +0 -1
  271. package/lib/module/core/ConvolverNode.js +0 -31
  272. package/lib/module/core/ConvolverNode.js.map +0 -1
  273. package/lib/module/web-core/ConvolverNode.js +0 -34
  274. package/lib/module/web-core/ConvolverNode.js.map +0 -1
  275. package/lib/module/web-core/ConvolverNodeOptions.js +0 -4
  276. package/lib/module/web-core/ConvolverNodeOptions.js.map +0 -1
  277. package/lib/typescript/core/ConvolverNode.d.ts +0 -12
  278. package/lib/typescript/core/ConvolverNode.d.ts.map +0 -1
  279. package/lib/typescript/web-core/ConvolverNode.d.ts +0 -11
  280. package/lib/typescript/web-core/ConvolverNode.d.ts.map +0 -1
  281. package/lib/typescript/web-core/ConvolverNodeOptions.d.ts +0 -6
  282. package/lib/typescript/web-core/ConvolverNodeOptions.d.ts.map +0 -1
  283. package/scripts/download-prebuilt-binaries.sh +0 -52
  284. package/scripts/rnaa_utils.rb +0 -8
  285. package/scripts/validate-worklets-version.js +0 -28
  286. package/src/core/ConvolverNode.ts +0 -35
  287. package/src/web-core/ConvolverNode.tsx +0 -43
  288. package/src/web-core/ConvolverNodeOptions.tsx +0 -6
@@ -436,7 +436,7 @@ typedef struct AVCodecContext {
436
436
  const AVClass *av_class;
437
437
  int log_level_offset;
438
438
 
439
- enum AVMediaTypeFFmpeg codec_type; /* see AVMEDIA_TYPE_xxx */
439
+ enum AVMediaTypeFFMPEG codec_type; /* see AVMEDIA_TYPE_xxx */
440
440
  const struct AVCodec *codec;
441
441
  enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
442
442
 
@@ -1946,7 +1946,7 @@ typedef struct AVHWAccel {
1946
1946
  *
1947
1947
  * See AVMEDIA_TYPE_xxx
1948
1948
  */
1949
- enum AVMediaTypeFFmpeg type;
1949
+ enum AVMediaTypeFFMPEG type;
1950
1950
 
1951
1951
  /**
1952
1952
  * Codec implemented by the hardware accelerator.
@@ -182,7 +182,7 @@ typedef struct AVCodec {
182
182
  * You should use the NULL_IF_CONFIG_SMALL() macro to define it.
183
183
  */
184
184
  const char *long_name;
185
- enum AVMediaTypeFFmpeg type;
185
+ enum AVMediaTypeFFMPEG type;
186
186
  enum AVCodecID id;
187
187
  /**
188
188
  * Codec capabilities.
@@ -37,7 +37,7 @@
37
37
  */
38
38
  typedef struct AVCodecDescriptor {
39
39
  enum AVCodecID id;
40
- enum AVMediaTypeFFmpeg type;
40
+ enum AVMediaTypeFFMPEG type;
41
41
  /**
42
42
  * Name of the codec described by this descriptor. It is non-empty and
43
43
  * unique for each codec descriptor. It should contain alphanumeric
@@ -627,7 +627,7 @@ enum AVCodecID {
627
627
  /**
628
628
  * Get the type of the given codec.
629
629
  */
630
- enum AVMediaTypeFFmpeg avcodec_get_type(enum AVCodecID codec_id);
630
+ enum AVMediaTypeFFMPEG avcodec_get_type(enum AVCodecID codec_id);
631
631
 
632
632
  /**
633
633
  * Get the name of a codec.
@@ -48,7 +48,7 @@ typedef struct AVCodecParameters {
48
48
  /**
49
49
  * General type of the encoded data.
50
50
  */
51
- enum AVMediaTypeFFmpeg codec_type;
51
+ enum AVMediaTypeFFMPEG codec_type;
52
52
  /**
53
53
  * Specific type of the encoded data (the codec used).
54
54
  */
@@ -2253,7 +2253,7 @@ void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
2253
2253
  * NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
2254
2254
  */
2255
2255
  int av_find_best_stream(AVFormatContext *ic,
2256
- enum AVMediaTypeFFmpeg type,
2256
+ enum AVMediaTypeFFMPEG type,
2257
2257
  int wanted_stream_nb,
2258
2258
  int related_stream,
2259
2259
  const struct AVCodec **decoder_ret,
@@ -2593,7 +2593,7 @@ const AVOutputFormat *av_guess_format(const char *short_name,
2593
2593
  */
2594
2594
  enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
2595
2595
  const char *filename, const char *mime_type,
2596
- enum AVMediaTypeFFmpeg type);
2596
+ enum AVMediaTypeFFMPEG type);
2597
2597
 
2598
2598
  /**
2599
2599
  * Get timing information for the data currently output.
@@ -195,7 +195,7 @@ const char *avutil_license(void);
195
195
  * @brief Media Type
196
196
  */
197
197
 
198
- enum AVMediaTypeFFmpeg {
198
+ enum AVMediaTypeFFMPEG {
199
199
  AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA
200
200
  AVMEDIA_TYPE_VIDEO,
201
201
  AVMEDIA_TYPE_AUDIO,
@@ -209,7 +209,7 @@ enum AVMediaTypeFFmpeg {
209
209
  * Return a string describing the media_type enum, NULL if media_type
210
210
  * is unknown.
211
211
  */
212
- const char *av_get_media_type_string(enum AVMediaTypeFFmpeg media_type);
212
+ const char *av_get_media_type_string(enum AVMediaTypeFFMPEG media_type);
213
213
 
214
214
  /**
215
215
  * @defgroup lavu_const Constants
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>libavcodec.framework/libavcodec</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
+ <key>LibraryPath</key>
13
+ <string>libavcodec.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ <string>x86_64</string>
18
+ </array>
19
+ <key>SupportedPlatform</key>
20
+ <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
23
+ </dict>
24
+ <dict>
25
+ <key>BinaryPath</key>
26
+ <string>libavcodec.framework/libavcodec</string>
27
+ <key>LibraryIdentifier</key>
28
+ <string>ios-arm64</string>
29
+ <key>LibraryPath</key>
30
+ <string>libavcodec.framework</string>
31
+ <key>SupportedArchitectures</key>
32
+ <array>
33
+ <string>arm64</string>
34
+ </array>
35
+ <key>SupportedPlatform</key>
36
+ <string>ios</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavcodec</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavcodec</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavcodec</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavcodec</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavcodec</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavcodec</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>libavformat.framework/libavformat</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64</string>
12
+ <key>LibraryPath</key>
13
+ <string>libavformat.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ </array>
18
+ <key>SupportedPlatform</key>
19
+ <string>ios</string>
20
+ </dict>
21
+ <dict>
22
+ <key>BinaryPath</key>
23
+ <string>libavformat.framework/libavformat</string>
24
+ <key>LibraryIdentifier</key>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
+ <key>LibraryPath</key>
27
+ <string>libavformat.framework</string>
28
+ <key>SupportedArchitectures</key>
29
+ <array>
30
+ <string>arm64</string>
31
+ <string>x86_64</string>
32
+ </array>
33
+ <key>SupportedPlatform</key>
34
+ <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavformat</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavformat</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavformat</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavformat</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavformat</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavformat</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>libavutil.framework/libavutil</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64</string>
12
+ <key>LibraryPath</key>
13
+ <string>libavutil.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ </array>
18
+ <key>SupportedPlatform</key>
19
+ <string>ios</string>
20
+ </dict>
21
+ <dict>
22
+ <key>BinaryPath</key>
23
+ <string>libavutil.framework/libavutil</string>
24
+ <key>LibraryIdentifier</key>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
+ <key>LibraryPath</key>
27
+ <string>libavutil.framework</string>
28
+ <key>SupportedArchitectures</key>
29
+ <array>
30
+ <string>arm64</string>
31
+ <string>x86_64</string>
32
+ </array>
33
+ <key>SupportedPlatform</key>
34
+ <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavutil</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavutil</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavutil</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libavutil</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libavutil</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libavutil</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>BinaryPath</key>
9
+ <string>libswresample.framework/libswresample</string>
10
+ <key>LibraryIdentifier</key>
11
+ <string>ios-arm64</string>
12
+ <key>LibraryPath</key>
13
+ <string>libswresample.framework</string>
14
+ <key>SupportedArchitectures</key>
15
+ <array>
16
+ <string>arm64</string>
17
+ </array>
18
+ <key>SupportedPlatform</key>
19
+ <string>ios</string>
20
+ </dict>
21
+ <dict>
22
+ <key>BinaryPath</key>
23
+ <string>libswresample.framework/libswresample</string>
24
+ <key>LibraryIdentifier</key>
25
+ <string>ios-arm64_x86_64-simulator</string>
26
+ <key>LibraryPath</key>
27
+ <string>libswresample.framework</string>
28
+ <key>SupportedArchitectures</key>
29
+ <array>
30
+ <string>arm64</string>
31
+ <string>x86_64</string>
32
+ </array>
33
+ <key>SupportedPlatform</key>
34
+ <string>ios</string>
35
+ <key>SupportedPlatformVariant</key>
36
+ <string>simulator</string>
37
+ </dict>
38
+ </array>
39
+ <key>CFBundlePackageType</key>
40
+ <string>XFWK</string>
41
+ <key>XCFrameworkFormatVersion</key>
42
+ <string>1.0</string>
43
+ </dict>
44
+ </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libswresample</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libswresample</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libswresample</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>libswresample</string> <key>CFBundleIdentifier</key> <string>io.qt.ffmpegkit.libswresample</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>libswresample</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>7.0.2</string> <key>CFBundleVersion</key> <string>7.0.2</string> <key>CFBundleSignature</key> <string>????</string> <key>MinimumOSVersion</key> <string>16.0</string> <key>CFBundleSupportedPlatforms</key> <array> <string>iPhoneOS</string> </array> <key>NSPrincipalClass</key> <string></string> </dict> </plist>
@@ -277,7 +277,8 @@ decodeWithMemoryBlock(const void *data, size_t size, int sample_rate) {
277
277
  MemoryIOContext io_ctx{static_cast<const uint8_t *>(data), size, 0};
278
278
 
279
279
  constexpr size_t buffer_size = 4096;
280
- uint8_t *io_buffer = static_cast<uint8_t *>(av_malloc(buffer_size));
280
+ auto io_buffer = std::unique_ptr<uint8_t, decltype(&av_free)>(
281
+ static_cast<uint8_t *>(av_malloc(buffer_size)), &av_free);
281
282
  if (io_buffer == nullptr) {
282
283
  return nullptr;
283
284
  }
@@ -285,7 +286,7 @@ decodeWithMemoryBlock(const void *data, size_t size, int sample_rate) {
285
286
  auto avio_ctx =
286
287
  std::unique_ptr<AVIOContext, std::function<void(AVIOContext *)>>(
287
288
  avio_alloc_context(
288
- io_buffer,
289
+ io_buffer.get(),
289
290
  buffer_size,
290
291
  0,
291
292
  &io_ctx,
@@ -0,0 +1,32 @@
1
+ # Instruction on how to compile your own version of the ffmpeg and to replace binary files with yours.
2
+
3
+ If you would like to change ffmpeg binaries f.e. to include some of its functionalities. There are possible solutions to do that.
4
+
5
+ Basically, there are two options to achieve it:
6
+
7
+ - Utilize `ffmpeg_setup.sh` script, which provides set of instructions to cross-compile FFmpeg library on all desired mobile architectures.
8
+ - Cross-compile it dynamically fully on your own.
9
+
10
+ Last part in both of the cases is to replace files in corresponding places.
11
+
12
+ ## Where to put compiled files?
13
+
14
+ ### Includes
15
+
16
+ All includes should go to packages/react-native-audio-api/common/cpp/audioapi/external/ffmpeg_include
17
+
18
+ ### Android
19
+
20
+ Put your corresponding .so files for each architecture (TARGET_ABI) to packages/react-native-audio-api/android/src/main/jniLibs/TARGET_ABI
21
+
22
+ ### iOS
23
+
24
+ Put corresponding .xcframework files in packages/react-native-audio-api/common/cpp/audioapi/external
25
+
26
+ ## Additional steps - IMPORTANT!
27
+
28
+ - after moving the corresponding platform files, delete the all output files from this directory
29
+ - otherwise XCode will try to link them
30
+ - remove `time.h` from include directories as it will conflict with system one in XCode
31
+ - rename all local occurrences of `AVMediaType` to f.e. `AVMediaTypeFFMPEG`
32
+ - finally remove `build` directory from your example app `ios` directory as most likely XCode will choke on that too
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Creates an Info.plist file for a given framework:
4
+ build_info_plist() {
5
+ local file_path="$1"
6
+ local framework_name="$2"
7
+ local framework_id="$3"
8
+
9
+ # Minimum version must be the same we used when building FFmpeg.
10
+ local minimum_version_key="MinimumOSVersion"
11
+ local minimum_os_version="16.0"
12
+
13
+ local supported_platforms="iPhoneOS"
14
+
15
+ info_plist="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
16
+ <!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
17
+ <plist version=\"1.0\">
18
+ <dict>
19
+ <key>CFBundleDevelopmentRegion</key>
20
+ <string>en</string>
21
+ <key>CFBundleExecutable</key>
22
+ <string>${framework_name}</string>
23
+ <key>CFBundleIdentifier</key>
24
+ <string>${framework_id}</string>
25
+ <key>CFBundleInfoDictionaryVersion</key>
26
+ <string>6.0</string>
27
+ <key>CFBundleName</key>
28
+ <string>${framework_name}</string>
29
+ <key>CFBundlePackageType</key>
30
+ <string>FMWK</string>
31
+ <key>CFBundleShortVersionString</key>
32
+ <string>7.0.2</string>
33
+ <key>CFBundleVersion</key>
34
+ <string>7.0.2</string>
35
+ <key>CFBundleSignature</key>
36
+ <string>????</string>
37
+ <key>${minimum_version_key}</key>
38
+ <string>${minimum_os_version}</string>
39
+ <key>CFBundleSupportedPlatforms</key>
40
+ <array>
41
+ <string>${supported_platforms}</string>
42
+ </array>
43
+ <key>NSPrincipalClass</key>
44
+ <string></string>
45
+ </dict>
46
+ </plist>"
47
+ echo $info_plist | tee ${file_path} 1>/dev/null
48
+ }
49
+
50
+ dylib_regex="^@rpath/.*\.dylib$"
51
+
52
+ # Creates framework from a dylib file:
53
+ create_framework() {
54
+ local framework_name="$1"
55
+ local ffmpeg_library_path="$2"
56
+ local framework_complete_path="${ffmpeg_library_path}/framework/${framework_name}.framework/${framework_name}"
57
+
58
+ # Create framework directory and copy dylib file to this directory:
59
+ mkdir -p "${ffmpeg_library_path}/framework/${framework_name}.framework"
60
+ cp "${ffmpeg_library_path}/lib/${framework_name}.dylib" "${ffmpeg_library_path}/framework/${framework_name}.framework/${framework_name}"
61
+
62
+ # Change the shared library identification name, removing version number and 'dylib' extension;
63
+ # \c Frameworks part of the name is needed since this is where frameworks will be installed in
64
+ # an application bundle:
65
+ install_name_tool -id @rpath/${framework_name}.framework/${framework_name} "${framework_complete_path}"
66
+
67
+ # Add Info.plist file into the framework directory:
68
+ build_info_plist "${ffmpeg_library_path}/framework/${framework_name}.framework/Info.plist" "${framework_name}" "io.qt.ffmpegkit."${framework_name}
69
+ otool -L "$framework_complete_path" | awk '/\t/ {print $1}' | egrep "$dylib_regex" | while read -r dependency_path; do
70
+ found_name=$(tmp=${dependency_path/*\/}; echo ${tmp/\.*})
71
+ if [ "$found_name" != "$framework_name" ]
72
+ then
73
+ # Change the dependent shared library install name to remove version number and 'dylib' extension:
74
+ install_name_tool -change "$dependency_path" @rpath/${found_name}.framework/${found_name} "${framework_complete_path}"
75
+ fi
76
+ done
77
+ }
78
+
79
+ ffmpeg_libs="libavcodec libavformat libavutil libswresample"
80
+
81
+ for name in $ffmpeg_libs; do
82
+ create_framework $name output/ios/iphoneos
83
+ create_framework $name output/ios/iphonesimulator
84
+ done
85
+
86
+ # Create XCFramework:
87
+ OUTPUT_DIR="output/ios"
88
+
89
+ xcodebuild -create-xcframework \
90
+ -framework "${OUTPUT_DIR}/iphoneos/framework/libavcodec.framework" \
91
+ -framework "${OUTPUT_DIR}/iphonesimulator/framework/libavcodec.framework" \
92
+ -output "${OUTPUT_DIR}/libavcodec.xcframework"
93
+
94
+ xcodebuild -create-xcframework \
95
+ -framework "${OUTPUT_DIR}/iphoneos/framework/libavformat.framework" \
96
+ -framework "${OUTPUT_DIR}/iphonesimulator/framework/libavformat.framework" \
97
+ -output "${OUTPUT_DIR}/libavformat.xcframework"
98
+
99
+ xcodebuild -create-xcframework \
100
+ -framework "${OUTPUT_DIR}/iphoneos/framework/libavutil.framework" \
101
+ -framework "${OUTPUT_DIR}/iphonesimulator/framework/libavutil.framework" \
102
+ -output "${OUTPUT_DIR}/libavutil.xcframework"
103
+
104
+ xcodebuild -create-xcframework \
105
+ -framework "${OUTPUT_DIR}/iphoneos/framework/libswresample.framework" \
106
+ -framework "${OUTPUT_DIR}/iphonesimulator/framework/libswresample.framework" \
107
+ -output "${OUTPUT_DIR}/libswresample.xcframework"
108
+
109
+
110
+
111
+