react-native-audio-api 0.11.0-alpha.0 → 0.11.0-nightly-bfab178-20251107
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.
- package/README.md +13 -11
- package/RNAudioAPI.podspec +20 -15
- package/android/build.gradle +33 -3
- package/android/src/main/cpp/audioapi/CMakeLists.txt +6 -3
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.cpp +5 -0
- package/android/src/main/cpp/audioapi/android/AudioAPIModule.h +1 -0
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.cpp +30 -94
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.h +14 -28
- package/android/src/main/cpp/audioapi/android/core/AudioPlayer.cpp +4 -2
- package/android/src/main/cpp/audioapi/android/core/NativeAudioRecorder.hpp +9 -9
- package/android/src/main/cpp/audioapi/android/core/utils/AudioDecoder.cpp +6 -0
- package/android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt +31 -3
- package/android/src/main/java/com/swmansion/audioapi/system/AudioFocusListener.kt +21 -9
- package/android/src/main/java/com/swmansion/audioapi/system/LockScreenManager.kt +27 -6
- package/android/src/main/java/com/swmansion/audioapi/system/MediaNotificationManager.kt +11 -0
- package/android/src/oldarch/NativeAudioAPIModuleSpec.java +4 -0
- package/common/cpp/audioapi/AudioAPIModuleInstaller.h +30 -2
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.cpp +18 -0
- package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +1 -0
- package/common/cpp/audioapi/HostObjects/effects/BiquadFilterNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.cpp +47 -0
- package/common/cpp/audioapi/HostObjects/effects/ConvolverNodeHostObject.h +20 -0
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.cpp +18 -80
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +6 -15
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferBaseSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/sources/AudioBufferSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/HostObjects/sources/AudioScheduledSourceNodeHostObject.cpp +1 -1
- package/common/cpp/audioapi/core/AudioNode.h +3 -2
- package/common/cpp/audioapi/core/AudioParam.cpp +2 -2
- package/common/cpp/audioapi/core/BaseAudioContext.cpp +10 -0
- package/common/cpp/audioapi/core/BaseAudioContext.h +2 -0
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.cpp +69 -32
- package/common/cpp/audioapi/core/effects/BiquadFilterNode.h +37 -1
- package/common/cpp/audioapi/core/effects/ConvolverNode.cpp +210 -0
- package/common/cpp/audioapi/core/effects/ConvolverNode.h +55 -0
- package/common/cpp/audioapi/core/inputs/AudioRecorder.cpp +49 -102
- package/common/cpp/audioapi/core/inputs/AudioRecorder.h +28 -46
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.cpp +14 -17
- package/common/cpp/audioapi/core/sources/AudioBufferBaseSourceNode.h +0 -1
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.cpp +8 -14
- package/common/cpp/audioapi/core/sources/AudioBufferSourceNode.h +0 -1
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.cpp +14 -18
- package/common/cpp/audioapi/core/sources/AudioScheduledSourceNode.h +2 -2
- package/common/cpp/audioapi/core/sources/StreamerNode.cpp +64 -64
- package/common/cpp/audioapi/core/sources/StreamerNode.h +38 -10
- package/common/cpp/audioapi/core/utils/AudioNodeManager.cpp +5 -0
- package/common/cpp/audioapi/core/utils/Constants.h +2 -1
- package/common/cpp/audioapi/core/utils/worklets/SafeIncludes.h +12 -8
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.cpp +3 -3
- package/common/cpp/audioapi/core/utils/worklets/WorkletsRunner.h +1 -1
- package/common/cpp/audioapi/dsp/AudioUtils.cpp +1 -1
- package/common/cpp/audioapi/dsp/Convolver.cpp +213 -0
- package/common/cpp/audioapi/dsp/Convolver.h +45 -0
- package/common/cpp/audioapi/dsp/FFT.cpp +0 -26
- package/common/cpp/audioapi/dsp/FFT.h +26 -2
- package/common/cpp/audioapi/events/AudioEventHandlerRegistry.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avcodec.h +4 -4
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_desc.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_id.h +3 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_par.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/defs.h +3 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/packet.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/smpte_436m.h +254 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avformat.h +6 -6
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version_major.h +2 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avassert.h +5 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avutil.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/channel_layout.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/csp.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dict.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ffversion.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/film_grain_params.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/frame.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_vivid_metadata.h +3 -3
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_opencl.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_qsv.h +0 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vulkan.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/iamf.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lfg.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/log.h +2 -2
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mathematics.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/opt.h +4 -4
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rational.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rc4.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/refstruct.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/spherical.h +6 -0
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tdrdi.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tx.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/version.h +3 -3
- package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_hint.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libswresample/swresample.h +1 -1
- package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version.h +1 -1
- package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +2 -3
- package/common/cpp/audioapi/libs/ffmpeg/relinking.md +24 -0
- package/common/cpp/audioapi/utils/AlignedAllocator.hpp +50 -0
- package/common/cpp/audioapi/utils/AudioBus.cpp +28 -0
- package/common/cpp/audioapi/utils/AudioBus.h +3 -0
- package/common/cpp/audioapi/utils/ThreadPool.hpp +59 -1
- package/common/cpp/test/CMakeLists.txt +19 -14
- package/common/cpp/test/src/AudioParamTest.cpp +1 -1
- package/common/cpp/test/src/AudioScheduledSourceTest.cpp +134 -0
- package/common/cpp/test/src/ConstantSourceTest.cpp +1 -1
- package/common/cpp/test/src/GainTest.cpp +1 -1
- package/common/cpp/test/src/MockAudioEventHandlerRegistry.h +4 -4
- package/common/cpp/test/src/OscillatorTest.cpp +1 -1
- package/common/cpp/test/src/StereoPannerTest.cpp +1 -1
- package/common/cpp/test/src/biquad/BiquadFilterChromium.cpp +389 -0
- package/common/cpp/test/src/biquad/BiquadFilterChromium.h +64 -0
- package/common/cpp/test/src/biquad/BiquadFilterTest.cpp +284 -0
- package/common/cpp/test/src/biquad/BiquadFilterTest.h +40 -0
- package/ios/audioapi/ios/AudioAPIModule.h +2 -1
- package/ios/audioapi/ios/AudioAPIModule.mm +13 -0
- package/ios/audioapi/ios/core/IOSAudioRecorder.h +9 -18
- package/ios/audioapi/ios/core/IOSAudioRecorder.mm +28 -70
- package/ios/audioapi/ios/core/NativeAudioRecorder.h +6 -2
- package/ios/audioapi/ios/core/NativeAudioRecorder.m +73 -5
- package/ios/audioapi/ios/system/AudioEngine.mm +3 -3
- package/ios/audioapi/ios/system/AudioSessionManager.h +2 -0
- package/ios/audioapi/ios/system/AudioSessionManager.mm +24 -0
- package/ios/audioapi/ios/system/LockScreenManager.h +0 -1
- package/ios/audioapi/ios/system/LockScreenManager.mm +6 -19
- package/lib/commonjs/api.js +141 -76
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/api.web.js +8 -0
- package/lib/commonjs/api.web.js.map +1 -1
- package/lib/commonjs/core/AudioContext.js +1 -1
- package/lib/commonjs/core/AudioContext.js.map +1 -1
- package/lib/commonjs/core/AudioRecorder.js +12 -157
- package/lib/commonjs/core/AudioRecorder.js.map +1 -1
- package/lib/commonjs/core/BaseAudioContext.js +28 -25
- package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
- package/lib/commonjs/core/ConvolverNode.js +37 -0
- package/lib/commonjs/core/ConvolverNode.js.map +1 -0
- package/lib/commonjs/core/OfflineAudioContext.js +1 -1
- package/lib/commonjs/core/OfflineAudioContext.js.map +1 -1
- package/lib/commonjs/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/commonjs/system/AudioManager.js +3 -0
- package/lib/commonjs/system/AudioManager.js.map +1 -1
- package/lib/commonjs/types.js +0 -46
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/index.js +19 -21
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/web-core/AudioContext.js +12 -0
- package/lib/commonjs/web-core/AudioContext.js.map +1 -1
- package/lib/commonjs/web-core/ConvolverNode.js +40 -0
- package/lib/commonjs/web-core/ConvolverNode.js.map +1 -0
- package/lib/commonjs/web-core/ConvolverNodeOptions.js +6 -0
- package/lib/commonjs/web-core/ConvolverNodeOptions.js.map +1 -0
- package/lib/commonjs/web-core/OfflineAudioContext.js +12 -0
- package/lib/commonjs/web-core/OfflineAudioContext.js.map +1 -1
- package/lib/module/api.js +16 -15
- package/lib/module/api.js.map +1 -1
- package/lib/module/api.web.js +1 -0
- package/lib/module/api.web.js.map +1 -1
- package/lib/module/core/AudioContext.js +2 -2
- package/lib/module/core/AudioContext.js.map +1 -1
- package/lib/module/core/AudioRecorder.js +12 -157
- package/lib/module/core/AudioRecorder.js.map +1 -1
- package/lib/module/core/BaseAudioContext.js +29 -26
- package/lib/module/core/BaseAudioContext.js.map +1 -1
- package/lib/module/core/ConvolverNode.js +31 -0
- package/lib/module/core/ConvolverNode.js.map +1 -0
- package/lib/module/core/OfflineAudioContext.js +2 -2
- package/lib/module/core/OfflineAudioContext.js.map +1 -1
- package/lib/module/specs/NativeAudioAPIModule.js.map +1 -1
- package/lib/module/system/AudioManager.js +3 -0
- package/lib/module/system/AudioManager.js.map +1 -1
- package/lib/module/types.js +1 -45
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/index.js +15 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/web-core/AudioContext.js +12 -0
- package/lib/module/web-core/AudioContext.js.map +1 -1
- package/lib/module/web-core/ConvolverNode.js +34 -0
- package/lib/module/web-core/ConvolverNode.js.map +1 -0
- package/lib/module/web-core/ConvolverNodeOptions.js +4 -0
- package/lib/module/web-core/ConvolverNodeOptions.js.map +1 -0
- package/lib/module/web-core/OfflineAudioContext.js +12 -0
- package/lib/module/web-core/OfflineAudioContext.js.map +1 -1
- package/lib/typescript/api.d.ts +19 -17
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/api.web.d.ts +1 -0
- package/lib/typescript/api.web.d.ts.map +1 -1
- package/lib/typescript/core/AudioContext.d.ts.map +1 -1
- package/lib/typescript/core/AudioRecorder.d.ts +6 -58
- package/lib/typescript/core/AudioRecorder.d.ts.map +1 -1
- package/lib/typescript/core/BaseAudioContext.d.ts +3 -1
- package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
- package/lib/typescript/core/ConvolverNode.d.ts +12 -0
- package/lib/typescript/core/ConvolverNode.d.ts.map +1 -0
- package/lib/typescript/events/types.d.ts +0 -16
- package/lib/typescript/events/types.d.ts.map +1 -1
- package/lib/typescript/interfaces.d.ts +8 -39
- package/lib/typescript/interfaces.d.ts.map +1 -1
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts +1 -0
- package/lib/typescript/specs/NativeAudioAPIModule.d.ts.map +1 -1
- package/lib/typescript/system/AudioManager.d.ts +1 -0
- package/lib/typescript/system/AudioManager.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +8 -74
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +5 -2
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/web-core/AudioContext.d.ts +3 -0
- package/lib/typescript/web-core/AudioContext.d.ts.map +1 -1
- package/lib/typescript/web-core/BaseAudioContext.d.ts +2 -0
- package/lib/typescript/web-core/BaseAudioContext.d.ts.map +1 -1
- package/lib/typescript/web-core/ConvolverNode.d.ts +11 -0
- package/lib/typescript/web-core/ConvolverNode.d.ts.map +1 -0
- package/lib/typescript/web-core/ConvolverNodeOptions.d.ts +6 -0
- package/lib/typescript/web-core/ConvolverNodeOptions.d.ts.map +1 -0
- package/lib/typescript/web-core/OfflineAudioContext.d.ts +3 -0
- package/lib/typescript/web-core/OfflineAudioContext.d.ts.map +1 -1
- package/package.json +14 -5
- package/scripts/download-prebuilt-binaries.sh +61 -0
- package/scripts/rnaa_utils.rb +8 -0
- package/scripts/validate-worklets-version.js +28 -0
- package/src/api.ts +45 -18
- package/src/api.web.ts +1 -0
- package/src/core/AudioContext.ts +3 -2
- package/src/core/AudioRecorder.ts +20 -190
- package/src/core/BaseAudioContext.ts +67 -60
- package/src/core/ConvolverNode.ts +35 -0
- package/src/core/OfflineAudioContext.ts +2 -2
- package/src/events/types.ts +0 -18
- package/src/interfaces.ts +15 -47
- package/src/specs/NativeAudioAPIModule.ts +1 -0
- package/src/system/AudioManager.ts +4 -0
- package/src/types.ts +9 -84
- package/src/utils/index.ts +22 -2
- package/src/web-core/AudioContext.tsx +25 -0
- package/src/web-core/BaseAudioContext.tsx +2 -0
- package/src/web-core/ConvolverNode.tsx +43 -0
- package/src/web-core/ConvolverNodeOptions.tsx +6 -0
- package/src/web-core/OfflineAudioContext.tsx +25 -0
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidFileWriterBackend.h +0 -33
- package/android/src/main/cpp/audioapi/android/core/utils/FileUtils.h +0 -34
- package/android/src/main/cpp/audioapi/android/core/utils/FileUtilts.cpp +0 -133
- package/android/src/main/cpp/audioapi/android/core/utils/MiniaudioImplementation.cpp +0 -3
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.cpp +0 -154
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegAudioFileOptions.h +0 -41
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.cpp +0 -431
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.h +0 -112
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.cpp +0 -47
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileOptions.h +0 -28
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.cpp +0 -237
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.h +0 -46
- package/android/src/main/cpp/audioapi/android/system/NativeFileInfo.hpp +0 -31
- package/android/src/main/java/com/swmansion/audioapi/system/NativeFileInfo.kt +0 -18
- package/android/src/main/jniLibs/arm64-v8a/libavcodec.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libavformat.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libavutil.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libswresample.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavcodec.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavformat.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libavutil.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libswresample.so +0 -0
- package/android/src/main/jniLibs/x86/libavcodec.so +0 -0
- package/android/src/main/jniLibs/x86/libavformat.so +0 -0
- package/android/src/main/jniLibs/x86/libavutil.so +0 -0
- package/android/src/main/jniLibs/x86/libswresample.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavcodec.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavformat.so +0 -0
- package/android/src/main/jniLibs/x86_64/libavutil.so +0 -0
- package/android/src/main/jniLibs/x86_64/libswresample.so +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libogg.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libopus.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libssl.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/arm64-v8a/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libogg.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libopus.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libssl.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/armeabi-v7a/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libogg.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libopus.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libssl.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/iphoneos/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libogg.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libopus.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libssl.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/iphonesimulator/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/libavcodec.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
- package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
- package/common/cpp/audioapi/external/libavutil.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
- package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +0 -44
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/Info.plist +0 -1
- package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
- package/common/cpp/audioapi/external/x86/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/x86/libogg.a +0 -0
- package/common/cpp/audioapi/external/x86/libopus.a +0 -0
- package/common/cpp/audioapi/external/x86/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/x86/libssl.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/x86/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libcrypto.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libogg.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libopus.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libopusfile.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libssl.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbis.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbisenc.a +0 -0
- package/common/cpp/audioapi/external/x86_64/libvorbisfile.a +0 -0
- package/common/cpp/audioapi/libs/ffmpeg/INSTRUCTIONS.md +0 -32
- package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +0 -111
- package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +0 -391
- package/ios/audioapi/ios/core/IOSAudioFileOptions.h +0 -35
- package/ios/audioapi/ios/core/IOSAudioFileOptions.mm +0 -135
- package/ios/audioapi/ios/core/IOSAudioFileWriter.h +0 -38
- package/ios/audioapi/ios/core/IOSAudioFileWriter.mm +0 -187
- package/lib/commonjs/utils/bitEnums.js +0 -33
- package/lib/commonjs/utils/bitEnums.js.map +0 -1
- package/lib/module/utils/bitEnums.js +0 -27
- package/lib/module/utils/bitEnums.js.map +0 -1
- package/lib/typescript/utils/bitEnums.d.ts +0 -4
- package/lib/typescript/utils/bitEnums.d.ts.map +0 -1
- package/src/utils/bitEnums.ts +0 -51
|
@@ -16,8 +16,32 @@ class FFT {
|
|
|
16
16
|
explicit FFT(int size);
|
|
17
17
|
~FFT();
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
void
|
|
19
|
+
template<typename Allocator>
|
|
20
|
+
void doFFT(float *in, std::vector<std::complex<float>, Allocator> &out) {
|
|
21
|
+
pffft_transform_ordered(
|
|
22
|
+
pffftSetup_,
|
|
23
|
+
in,
|
|
24
|
+
reinterpret_cast<float *>(&out[0]),
|
|
25
|
+
work_,
|
|
26
|
+
PFFFT_FORWARD);
|
|
27
|
+
// this is a possible place for bugs and mistakes
|
|
28
|
+
// due to pffft implementation and how it stores results
|
|
29
|
+
// keep this information in mind
|
|
30
|
+
// out[0].real = DC component - should be pure real
|
|
31
|
+
// out[0].imag = Nyquist component - should be pure real
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
template<typename Allocator>
|
|
35
|
+
void doInverseFFT(std::vector<std::complex<float>, Allocator> &in, float *out) {
|
|
36
|
+
pffft_transform_ordered(
|
|
37
|
+
pffftSetup_,
|
|
38
|
+
reinterpret_cast<float *>(&in[0]),
|
|
39
|
+
out,
|
|
40
|
+
work_,
|
|
41
|
+
PFFFT_BACKWARD);
|
|
42
|
+
|
|
43
|
+
dsp::multiplyByScalar(out, 1.0f / static_cast<float>(size_), out, size_);
|
|
44
|
+
}
|
|
21
45
|
|
|
22
46
|
private:
|
|
23
47
|
int size_;
|
|
@@ -20,7 +20,7 @@ class AudioEventHandlerRegistry : public IAudioEventHandlerRegistry {
|
|
|
20
20
|
explicit AudioEventHandlerRegistry(
|
|
21
21
|
jsi::Runtime *runtime,
|
|
22
22
|
const std::shared_ptr<react::CallInvoker> &callInvoker);
|
|
23
|
-
~AudioEventHandlerRegistry();
|
|
23
|
+
~AudioEventHandlerRegistry() override;
|
|
24
24
|
|
|
25
25
|
uint64_t registerHandler(const std::string &eventName, const std::shared_ptr<jsi::Function> &handler) override;
|
|
26
26
|
void unregisterHandler(const std::string &eventName, uint64_t listenerId) override;
|
|
@@ -225,7 +225,7 @@ typedef struct RcOverride{
|
|
|
225
225
|
#define AV_CODEC_FLAG_QPEL (1 << 4)
|
|
226
226
|
/**
|
|
227
227
|
* Request the encoder to output reconstructed frames, i.e.\ frames that would
|
|
228
|
-
* be produced by decoding the encoded
|
|
228
|
+
* be produced by decoding the encoded bitstream. These frames may be retrieved
|
|
229
229
|
* by calling avcodec_receive_frame() immediately after a successful call to
|
|
230
230
|
* avcodec_receive_packet().
|
|
231
231
|
*
|
|
@@ -436,7 +436,7 @@ typedef struct AVCodecContext {
|
|
|
436
436
|
const AVClass *av_class;
|
|
437
437
|
int log_level_offset;
|
|
438
438
|
|
|
439
|
-
enum
|
|
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
|
|
1949
|
+
enum AVMediaTypeFFmpeg type;
|
|
1950
1950
|
|
|
1951
1951
|
/**
|
|
1952
1952
|
* Codec implemented by the hardware accelerator.
|
|
@@ -2900,7 +2900,7 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
|
|
2900
2900
|
*
|
|
2901
2901
|
* @note for encoders, this function will only do something if the encoder
|
|
2902
2902
|
* declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder
|
|
2903
|
-
* will drain any remaining packets, and can then be
|
|
2903
|
+
* will drain any remaining packets, and can then be reused for a different
|
|
2904
2904
|
* stream (as opposed to sending a null frame which will leave the encoder
|
|
2905
2905
|
* in a permanent EOF state after draining). This can be desirable if the
|
|
2906
2906
|
* cost of tearing down and replacing the encoder instance is high.
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
*/
|
|
38
38
|
typedef struct AVCodecDescriptor {
|
|
39
39
|
enum AVCodecID id;
|
|
40
|
-
enum
|
|
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
|
|
@@ -330,6 +330,7 @@ enum AVCodecID {
|
|
|
330
330
|
AV_CODEC_ID_RV60,
|
|
331
331
|
AV_CODEC_ID_JPEGXL_ANIM,
|
|
332
332
|
AV_CODEC_ID_APV,
|
|
333
|
+
AV_CODEC_ID_PRORES_RAW,
|
|
333
334
|
|
|
334
335
|
/* various PCM "codecs" */
|
|
335
336
|
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
|
@@ -602,6 +603,7 @@ enum AVCodecID {
|
|
|
602
603
|
AV_CODEC_ID_BIN_DATA,
|
|
603
604
|
AV_CODEC_ID_SMPTE_2038,
|
|
604
605
|
AV_CODEC_ID_LCEVC,
|
|
606
|
+
AV_CODEC_ID_SMPTE_436M_ANC,
|
|
605
607
|
|
|
606
608
|
|
|
607
609
|
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
|
|
@@ -627,7 +629,7 @@ enum AVCodecID {
|
|
|
627
629
|
/**
|
|
628
630
|
* Get the type of the given codec.
|
|
629
631
|
*/
|
|
630
|
-
enum
|
|
632
|
+
enum AVMediaTypeFFmpeg avcodec_get_type(enum AVCodecID codec_id);
|
|
631
633
|
|
|
632
634
|
/**
|
|
633
635
|
* 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
|
|
51
|
+
enum AVMediaTypeFFmpeg codec_type;
|
|
52
52
|
/**
|
|
53
53
|
* Specific type of the encoded data (the codec used).
|
|
54
54
|
*/
|
|
@@ -148,7 +148,7 @@ typedef struct AVCodecParameters {
|
|
|
148
148
|
* durations. Should be set to { 0, 1 } when some frames have differing
|
|
149
149
|
* durations or if the value is not known.
|
|
150
150
|
*
|
|
151
|
-
* @note This field
|
|
151
|
+
* @note This field corresponds to values that are stored in codec-level
|
|
152
152
|
* headers and is typically overridden by container/transport-layer
|
|
153
153
|
* timestamps, when available. It should thus be used only as a last resort,
|
|
154
154
|
* when no higher-level timing information is available.
|
|
@@ -142,7 +142,7 @@ enum AVPacketSideDataType {
|
|
|
142
142
|
AV_PKT_DATA_CPB_PROPERTIES,
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
145
|
+
* Recommends skipping the specified number of samples
|
|
146
146
|
* @code
|
|
147
147
|
* u32le number of samples to skip from start of this packet
|
|
148
148
|
* u32le number of samples to skip from end of this packet
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MXF SMPTE-436M VBI/ANC parsing functions
|
|
3
|
+
* Copyright (c) 2025 Jacob Lifshay
|
|
4
|
+
*
|
|
5
|
+
* This file is part of FFmpeg.
|
|
6
|
+
*
|
|
7
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
8
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
9
|
+
* License as published by the Free Software Foundation; either
|
|
10
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
+
* Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
18
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
#ifndef AVCODEC_SMPTE_436M_H
|
|
23
|
+
#define AVCODEC_SMPTE_436M_H
|
|
24
|
+
|
|
25
|
+
#include <stdint.h>
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Iterator over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data
|
|
29
|
+
*/
|
|
30
|
+
typedef struct AVSmpte436mAncIterator {
|
|
31
|
+
uint16_t anc_packets_left;
|
|
32
|
+
int size_left;
|
|
33
|
+
const uint8_t *data_left;
|
|
34
|
+
} AVSmpte436mAncIterator;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Wrapping Type from Table 7 (page 13) of:
|
|
38
|
+
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
|
39
|
+
*/
|
|
40
|
+
typedef enum AVSmpte436mWrappingType
|
|
41
|
+
{
|
|
42
|
+
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FRAME = 1,
|
|
43
|
+
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_1 = 2,
|
|
44
|
+
AV_SMPTE_436M_WRAPPING_TYPE_VANC_FIELD_2 = 3,
|
|
45
|
+
AV_SMPTE_436M_WRAPPING_TYPE_VANC_PROGRESSIVE_FRAME = 4,
|
|
46
|
+
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FRAME = 0x11,
|
|
47
|
+
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_1 = 0x12,
|
|
48
|
+
AV_SMPTE_436M_WRAPPING_TYPE_HANC_FIELD_2 = 0x13,
|
|
49
|
+
AV_SMPTE_436M_WRAPPING_TYPE_HANC_PROGRESSIVE_FRAME = 0x14,
|
|
50
|
+
/** not a real wrapping type, just here to guarantee the enum is big enough */
|
|
51
|
+
AV_SMPTE_436M_WRAPPING_TYPE_MAX = 0xFF,
|
|
52
|
+
} AVSmpte436mWrappingType;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Payload Sample Coding from Table 4 (page 10) and Table 7 (page 13) of:
|
|
56
|
+
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
|
57
|
+
*/
|
|
58
|
+
typedef enum AVSmpte436mPayloadSampleCoding
|
|
59
|
+
{
|
|
60
|
+
/** only used for VBI */
|
|
61
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA = 1,
|
|
62
|
+
/** only used for VBI */
|
|
63
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_COLOR_DIFF = 2,
|
|
64
|
+
/** only used for VBI */
|
|
65
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_1BIT_LUMA_AND_COLOR_DIFF = 3,
|
|
66
|
+
/** used for VBI and ANC */
|
|
67
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA = 4,
|
|
68
|
+
/** used for VBI and ANC */
|
|
69
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF = 5,
|
|
70
|
+
/** used for VBI and ANC */
|
|
71
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF = 6,
|
|
72
|
+
/** used for VBI and ANC */
|
|
73
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA = 7,
|
|
74
|
+
/** used for VBI and ANC */
|
|
75
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_COLOR_DIFF = 8,
|
|
76
|
+
/** used for VBI and ANC */
|
|
77
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_10BIT_LUMA_AND_COLOR_DIFF = 9,
|
|
78
|
+
/** only used for ANC */
|
|
79
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_WITH_PARITY_ERROR = 10,
|
|
80
|
+
/** only used for ANC */
|
|
81
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_COLOR_DIFF_WITH_PARITY_ERROR = 11,
|
|
82
|
+
/** only used for ANC */
|
|
83
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_8BIT_LUMA_AND_COLOR_DIFF_WITH_PARITY_ERROR = 12,
|
|
84
|
+
/** not a real sample coding, just here to guarantee the enum is big enough */
|
|
85
|
+
AV_SMPTE_436M_PAYLOAD_SAMPLE_CODING_MAX = 0xFF,
|
|
86
|
+
} AVSmpte436mPayloadSampleCoding;
|
|
87
|
+
|
|
88
|
+
/** the payload capacity of AVSmpte291mAnc8bit (and of AVSmpte291mAnc10bit when that gets added) */
|
|
89
|
+
#define AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY 0xFF
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* An ANC packet with an 8-bit payload.
|
|
93
|
+
* This can be decoded from AVSmpte436mCodedAnc::payload.
|
|
94
|
+
*
|
|
95
|
+
* Note: Some ANC packets need a 10-bit payload, if stored in this struct,
|
|
96
|
+
* the most-significant 2 bits of each sample are discarded.
|
|
97
|
+
*/
|
|
98
|
+
typedef struct AVSmpte291mAnc8bit {
|
|
99
|
+
uint8_t did;
|
|
100
|
+
uint8_t sdid_or_dbn;
|
|
101
|
+
uint8_t data_count;
|
|
102
|
+
uint8_t payload[AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY];
|
|
103
|
+
uint8_t checksum;
|
|
104
|
+
} AVSmpte291mAnc8bit;
|
|
105
|
+
|
|
106
|
+
/** max number of samples that can be stored in the payload of AVSmpte436mCodedAnc */
|
|
107
|
+
#define AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY \
|
|
108
|
+
(AV_SMPTE_291M_ANC_PAYLOAD_CAPACITY + 4) /* 4 for did, sdid_or_dbn, data_count, and checksum */
|
|
109
|
+
/** max number of bytes that can be stored in the payload of AVSmpte436mCodedAnc */
|
|
110
|
+
#define AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY (((AV_SMPTE_436M_CODED_ANC_SAMPLE_CAPACITY + 2) / 3) * 4)
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* An encoded ANC packet within a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
|
114
|
+
* The repeated section of Table 7 (page 13) of:
|
|
115
|
+
* https://pub.smpte.org/latest/st436/s436m-2006.pdf
|
|
116
|
+
*/
|
|
117
|
+
typedef struct AVSmpte436mCodedAnc {
|
|
118
|
+
uint16_t line_number;
|
|
119
|
+
AVSmpte436mWrappingType wrapping_type;
|
|
120
|
+
AVSmpte436mPayloadSampleCoding payload_sample_coding;
|
|
121
|
+
uint16_t payload_sample_count;
|
|
122
|
+
uint32_t payload_array_length;
|
|
123
|
+
/** the payload, has size payload_array_length.
|
|
124
|
+
* can be decoded into AVSmpte291mAnc8bit
|
|
125
|
+
*/
|
|
126
|
+
uint8_t payload[AV_SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY];
|
|
127
|
+
} AVSmpte436mCodedAnc;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Validate a AVSmpte436mCodedAnc structure. Doesn't check if the payload is valid.
|
|
131
|
+
* @param[in] anc ANC packet to validate
|
|
132
|
+
* @return 0 on success, AVERROR codes otherwise.
|
|
133
|
+
*/
|
|
134
|
+
int av_smpte_436m_coded_anc_validate(const AVSmpte436mCodedAnc *anc);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Encode ANC packets into a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
|
138
|
+
* @param[in] anc_packet_count number of ANC packets to encode
|
|
139
|
+
* @param[in] anc_packets the ANC packets to encode
|
|
140
|
+
* @param[in] size the size of out. ignored if out is NULL.
|
|
141
|
+
* @param[out] out Output bytes. Doesn't write anything if out is NULL.
|
|
142
|
+
* @return the number of bytes written on success, AVERROR codes otherwise.
|
|
143
|
+
* If out is NULL, returns the number of bytes it would have written.
|
|
144
|
+
*/
|
|
145
|
+
int av_smpte_436m_anc_encode(uint8_t *out, int size, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
|
|
146
|
+
|
|
147
|
+
struct AVPacket;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Append more ANC packets to a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
|
151
|
+
* @param[in] anc_packet_count number of ANC packets to encode
|
|
152
|
+
* @param[in] anc_packets the ANC packets to encode
|
|
153
|
+
* @param pkt the AVPacket to append to.
|
|
154
|
+
* it must either be size 0 or contain valid SMPTE_436M_ANC data.
|
|
155
|
+
* @return 0 on success, AVERROR codes otherwise.
|
|
156
|
+
*/
|
|
157
|
+
int av_smpte_436m_anc_append(struct AVPacket *pkt, int anc_packet_count, const AVSmpte436mCodedAnc *anc_packets);
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Set up iteration over the ANC packets in a single AV_CODEC_ID_SMPTE_436M_ANC AVPacket's data.
|
|
161
|
+
* @param[in] buf Pointer to the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
|
|
162
|
+
* @param[in] buf_size Size of the data from a AV_CODEC_ID_SMPTE_436M_ANC AVPacket.
|
|
163
|
+
* @param[out] iter Pointer to the iterator.
|
|
164
|
+
* @return 0 on success, AVERROR codes otherwise.
|
|
165
|
+
*/
|
|
166
|
+
int av_smpte_436m_anc_iter_init(AVSmpte436mAncIterator *iter, const uint8_t *buf, int buf_size);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Get the next ANC packet from the iterator, advancing the iterator.
|
|
170
|
+
* @param[in,out] iter Pointer to the iterator.
|
|
171
|
+
* @param[out] anc The returned ANC packet.
|
|
172
|
+
* @return 0 on success, AVERROR_EOF when the iterator has reached the end, AVERROR codes otherwise.
|
|
173
|
+
*/
|
|
174
|
+
int av_smpte_436m_anc_iter_next(AVSmpte436mAncIterator *iter, AVSmpte436mCodedAnc *anc);
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Get the minimum number of bytes needed to store a AVSmpte436mCodedAnc payload.
|
|
178
|
+
* @param sample_coding the payload sample coding
|
|
179
|
+
* @param sample_count the number of samples stored in the payload
|
|
180
|
+
* @return returns the minimum number of bytes needed, on error returns < 0.
|
|
181
|
+
* always <= SMPTE_436M_CODED_ANC_PAYLOAD_CAPACITY
|
|
182
|
+
*/
|
|
183
|
+
int av_smpte_436m_coded_anc_payload_size(AVSmpte436mPayloadSampleCoding sample_coding, uint16_t sample_count);
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Decode a AVSmpte436mCodedAnc payload into AVSmpte291mAnc8bit
|
|
187
|
+
* @param[in] sample_coding the payload sample coding
|
|
188
|
+
* @param[in] sample_count the number of samples stored in the payload
|
|
189
|
+
* @param[in] payload the bytes storing the payload,
|
|
190
|
+
* the needed size can be obtained from
|
|
191
|
+
avpriv_smpte_436m_coded_anc_payload_size
|
|
192
|
+
* @param[in] log_ctx context pointer for av_log
|
|
193
|
+
* @param[out] out The decoded ANC packet.
|
|
194
|
+
* @return returns 0 on success, otherwise < 0.
|
|
195
|
+
*/
|
|
196
|
+
int av_smpte_291m_anc_8bit_decode(AVSmpte291mAnc8bit *out,
|
|
197
|
+
AVSmpte436mPayloadSampleCoding sample_coding,
|
|
198
|
+
uint16_t sample_count,
|
|
199
|
+
const uint8_t *payload,
|
|
200
|
+
void *log_ctx);
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Fill in the correct checksum for a AVSmpte291mAnc8bit
|
|
204
|
+
* @param[in,out] anc The ANC packet.
|
|
205
|
+
*/
|
|
206
|
+
void av_smpte_291m_anc_8bit_fill_checksum(AVSmpte291mAnc8bit *anc);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Compute the sample count needed to encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc payload
|
|
210
|
+
* @param[in] anc The ANC packet.
|
|
211
|
+
* @param[in] sample_coding The sample coding.
|
|
212
|
+
* @param[in] log_ctx context pointer for av_log
|
|
213
|
+
* @return returns the sample count on success, otherwise < 0.
|
|
214
|
+
*/
|
|
215
|
+
int av_smpte_291m_anc_8bit_get_sample_count(const AVSmpte291mAnc8bit *anc,
|
|
216
|
+
AVSmpte436mPayloadSampleCoding sample_coding,
|
|
217
|
+
void *log_ctx);
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Encode a AVSmpte291mAnc8bit into a AVSmpte436mCodedAnc
|
|
221
|
+
* @param[in] line_number the line number the ANC packet is on
|
|
222
|
+
* @param[in] wrapping_type the wrapping type
|
|
223
|
+
* @param[in] sample_coding the payload sample coding
|
|
224
|
+
* @param[in] payload the ANC packet to encode.
|
|
225
|
+
* @param[in] log_ctx context pointer for av_log
|
|
226
|
+
* @param[out] out The encoded ANC packet.
|
|
227
|
+
* @return returns 0 on success, otherwise < 0.
|
|
228
|
+
*/
|
|
229
|
+
int av_smpte_291m_anc_8bit_encode(AVSmpte436mCodedAnc *out,
|
|
230
|
+
uint16_t line_number,
|
|
231
|
+
AVSmpte436mWrappingType wrapping_type,
|
|
232
|
+
AVSmpte436mPayloadSampleCoding sample_coding,
|
|
233
|
+
const AVSmpte291mAnc8bit *payload,
|
|
234
|
+
void *log_ctx);
|
|
235
|
+
|
|
236
|
+
/** AVSmpte291mAnc8bit::did when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
|
|
237
|
+
#define AV_SMPTE_291M_ANC_DID_CTA_708 0x61
|
|
238
|
+
|
|
239
|
+
/** AVSmpte291mAnc8bit::sdid_or_dbn when carrying CTA-708 data (for AV_CODEC_ID_EIA_608) */
|
|
240
|
+
#define AV_SMPTE_291M_ANC_SDID_CTA_708 0x1
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Try to decode an ANC packet into EIA-608/CTA-708 data (AV_CODEC_ID_EIA_608). This
|
|
244
|
+
* @param[in] anc The ANC packet.
|
|
245
|
+
* @param[in] log_ctx Context pointer for av_log
|
|
246
|
+
* @param[out] cc_data the buffer to store the extracted EIA-608/CTA-708 data,
|
|
247
|
+
* you can pass NULL to not store the data.
|
|
248
|
+
* the required size is 3 * cc_count bytes.
|
|
249
|
+
* SMPTE_291M_ANC_PAYLOAD_CAPACITY is always enough size.
|
|
250
|
+
* @return returns cc_count (>= 0) on success, AVERROR(EAGAIN) if it wasn't a CTA-708 ANC packet, < 0 on error.
|
|
251
|
+
*/
|
|
252
|
+
int av_smpte_291m_anc_8bit_extract_cta_708(const AVSmpte291mAnc8bit *anc, uint8_t *cc_data, void *log_ctx);
|
|
253
|
+
|
|
254
|
+
#endif /* AVCODEC_SMPTE_436M_H */
|
|
@@ -926,7 +926,7 @@ typedef struct AVStream {
|
|
|
926
926
|
* the sixth @ref AVStreamGroup.streams "stream" in the group is "512,512",
|
|
927
927
|
* etc.
|
|
928
928
|
*
|
|
929
|
-
* The following is an example of a canvas with
|
|
929
|
+
* The following is an example of a canvas with overlapping tiles:
|
|
930
930
|
*
|
|
931
931
|
* +-----------+
|
|
932
932
|
* | %%%%% |
|
|
@@ -1420,7 +1420,7 @@ typedef struct AVFormatContext {
|
|
|
1420
1420
|
#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
|
|
1421
1421
|
#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
|
|
1422
1422
|
#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
|
|
1423
|
-
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the
|
|
1423
|
+
#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the filling code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
|
|
1424
1424
|
#define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible
|
|
1425
1425
|
#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
|
|
1426
1426
|
#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted
|
|
@@ -1670,7 +1670,7 @@ typedef struct AVFormatContext {
|
|
|
1670
1670
|
int use_wallclock_as_timestamps;
|
|
1671
1671
|
|
|
1672
1672
|
/**
|
|
1673
|
-
* Skip duration
|
|
1673
|
+
* Skip duration calculation in estimate_timings_from_pts.
|
|
1674
1674
|
* - encoding: unused
|
|
1675
1675
|
* - decoding: set by user
|
|
1676
1676
|
*
|
|
@@ -1773,7 +1773,7 @@ typedef struct AVFormatContext {
|
|
|
1773
1773
|
|
|
1774
1774
|
/**
|
|
1775
1775
|
* IO repositioned flag.
|
|
1776
|
-
* This is set by avformat when the
|
|
1776
|
+
* This is set by avformat when the underlying IO context read pointer
|
|
1777
1777
|
* is repositioned, for example when doing byte based seeking.
|
|
1778
1778
|
* Demuxers can use the flag to detect such changes.
|
|
1779
1779
|
*/
|
|
@@ -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
|
|
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
|
|
2596
|
+
enum AVMediaTypeFFmpeg type);
|
|
2597
2597
|
|
|
2598
2598
|
/**
|
|
2599
2599
|
* Get timing information for the data currently output.
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
|
|
32
32
|
#include "version_major.h"
|
|
33
33
|
|
|
34
|
-
#define LIBAVFORMAT_VERSION_MINOR
|
|
35
|
-
#define LIBAVFORMAT_VERSION_MICRO
|
|
34
|
+
#define LIBAVFORMAT_VERSION_MINOR 3
|
|
35
|
+
#define LIBAVFORMAT_VERSION_MICRO 100
|
|
36
36
|
|
|
37
37
|
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
|
38
38
|
LIBAVFORMAT_VERSION_MINOR, \
|
|
@@ -101,7 +101,6 @@ do { \
|
|
|
101
101
|
#define av_unreachable(msg) __builtin_unreachable()
|
|
102
102
|
#elif defined(_MSC_VER)
|
|
103
103
|
#define av_unreachable(msg) __assume(0)
|
|
104
|
-
#define av_assume(cond) __assume(cond)
|
|
105
104
|
#elif __STDC_VERSION__ >= 202311L
|
|
106
105
|
#include <stddef.h>
|
|
107
106
|
#define av_unreachable(msg) unreachable()
|
|
@@ -109,7 +108,11 @@ do { \
|
|
|
109
108
|
#define av_unreachable(msg) ((void)0)
|
|
110
109
|
#endif
|
|
111
110
|
|
|
112
|
-
#
|
|
111
|
+
#if AV_HAS_BUILTIN(__builtin_assume)
|
|
112
|
+
#define av_assume(cond) __builtin_assume(cond)
|
|
113
|
+
#elif defined(_MSC_VER)
|
|
114
|
+
#define av_assume(cond) __assume(cond)
|
|
115
|
+
#else
|
|
113
116
|
#define av_assume(cond) do { \
|
|
114
117
|
if (!(cond)) \
|
|
115
118
|
av_unreachable(); \
|
|
@@ -195,7 +195,7 @@ const char *avutil_license(void);
|
|
|
195
195
|
* @brief Media Type
|
|
196
196
|
*/
|
|
197
197
|
|
|
198
|
-
enum
|
|
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
|
|
212
|
+
const char *av_get_media_type_string(enum AVMediaTypeFFmpeg media_type);
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* @defgroup lavu_const Constants
|
|
@@ -307,7 +307,7 @@ typedef struct AVChannelCustom {
|
|
|
307
307
|
* - with a constructor function, such as av_channel_layout_default(),
|
|
308
308
|
* av_channel_layout_from_mask() or av_channel_layout_from_string().
|
|
309
309
|
*
|
|
310
|
-
* The channel layout must be
|
|
310
|
+
* The channel layout must be uninitialized with av_channel_layout_uninit()
|
|
311
311
|
*
|
|
312
312
|
* Copying an AVChannelLayout via assigning is forbidden,
|
|
313
313
|
* av_channel_layout_copy() must be used instead (and its return value should
|
|
@@ -365,7 +365,7 @@ typedef struct AVChannelLayout {
|
|
|
365
365
|
*
|
|
366
366
|
* map[i].name may be filled with a 0-terminated string, in which case
|
|
367
367
|
* it will be used for the purpose of identifying the channel with the
|
|
368
|
-
* convenience functions below.
|
|
368
|
+
* convenience functions below. Otherwise it must be zeroed.
|
|
369
369
|
*/
|
|
370
370
|
AVChannelCustom *map;
|
|
371
371
|
} u;
|
|
@@ -114,7 +114,7 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
|
|
|
114
114
|
* @see enum AVColorPrimaries
|
|
115
115
|
* @param prm A description of the colorspace gamut
|
|
116
116
|
* @return The enum constant associated with this gamut, or
|
|
117
|
-
* AVCOL_PRI_UNSPECIFIED if no clear match can be
|
|
117
|
+
* AVCOL_PRI_UNSPECIFIED if no clear match can be identified.
|
|
118
118
|
*/
|
|
119
119
|
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
|
|
120
120
|
|
|
@@ -225,7 +225,7 @@ void av_dict_free(AVDictionary **m);
|
|
|
225
225
|
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
|
|
226
226
|
*
|
|
227
227
|
* @param[in] m The dictionary
|
|
228
|
-
* @param[out] buffer Pointer to buffer that will be allocated with string
|
|
228
|
+
* @param[out] buffer Pointer to buffer that will be allocated with string containing entries.
|
|
229
229
|
* Buffer must be freed by the caller when is no longer needed.
|
|
230
230
|
* @param[in] key_val_sep Character used to separate key from value
|
|
231
231
|
* @param[in] pairs_sep Character used to separate two pairs from each other
|
|
@@ -124,7 +124,7 @@ typedef struct AVFilmGrainAOMParams {
|
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* This structure describes how to handle film grain synthesis for codecs using
|
|
127
|
-
* the ITU-T H.274 Versatile
|
|
127
|
+
* the ITU-T H.274 Versatile supplemental enhancement information message.
|
|
128
128
|
*
|
|
129
129
|
* @note The struct must be allocated as part of AVFilmGrainParams using
|
|
130
130
|
* av_film_grain_params_alloc(). Its size is not a part of the public ABI.
|
|
@@ -96,7 +96,7 @@ enum AVFrameSideDataType {
|
|
|
96
96
|
*/
|
|
97
97
|
AV_FRAME_DATA_MOTION_VECTORS,
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Recommends skipping the specified number of samples. This is exported
|
|
100
100
|
* only if the "skip_manual" AVOption is set in libavcodec.
|
|
101
101
|
* This has the same format as AV_PKT_DATA_SKIP_SAMPLES.
|
|
102
102
|
* @code
|
|
@@ -83,7 +83,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
|
|
83
83
|
AVRational targeted_system_display_maximum_luminance;
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* This flag indicates that transfer the base
|
|
86
|
+
* This flag indicates that transfer the base parameter(for value of 1)
|
|
87
87
|
*/
|
|
88
88
|
int base_enable_flag;
|
|
89
89
|
|
|
@@ -145,7 +145,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
|
|
145
145
|
int base_param_k3;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* This flag indicates that delta mode of base
|
|
148
|
+
* This flag indicates that delta mode of base parameter(for value of 1)
|
|
149
149
|
*/
|
|
150
150
|
int base_param_Delta_enable_mode;
|
|
151
151
|
|
|
@@ -158,7 +158,7 @@ typedef struct AVHDRVividColorToneMappingParams {
|
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* indicates 3Spline_enable_flag in the base parameter,
|
|
161
|
-
* This flag indicates that transfer three Spline of base
|
|
161
|
+
* This flag indicates that transfer three Spline of base parameter(for value of 1)
|
|
162
162
|
*/
|
|
163
163
|
int three_Spline_enable_flag;
|
|
164
164
|
|
|
@@ -563,7 +563,7 @@ enum {
|
|
|
563
563
|
* values indicate that it failed somehow.
|
|
564
564
|
*
|
|
565
565
|
* On failure, the destination frame will be left blank, except for the
|
|
566
|
-
* hw_frames_ctx/format fields
|
|
566
|
+
* hw_frames_ctx/format fields they may have been set by the caller - those will
|
|
567
567
|
* be preserved as they were.
|
|
568
568
|
*
|
|
569
569
|
* @param dst Destination frame, to contain the mapping.
|