react-native-audio-api 0.11.0-alpha.1 → 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 -142
- package/android/src/main/cpp/audioapi/android/core/AndroidAudioRecorder.h +13 -40
- 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 -97
- package/common/cpp/audioapi/HostObjects/inputs/AudioRecorderHostObject.h +6 -18
- 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 +82 -36
- package/common/cpp/audioapi/core/inputs/AudioRecorder.h +31 -52
- 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 +10 -28
- package/ios/audioapi/ios/core/IOSAudioRecorder.mm +30 -117
- package/ios/audioapi/ios/core/NativeAudioRecorder.h +9 -4
- package/ios/audioapi/ios/core/NativeAudioRecorder.m +71 -29
- package/ios/audioapi/ios/core/utils/AudioDecoder.mm +0 -1
- 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 +13 -171
- 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 +13 -171
- 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 +7 -62
- 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 +9 -42
- 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 -79
- 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 +24 -211
- 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 +16 -52
- package/src/specs/NativeAudioAPIModule.ts +1 -0
- package/src/system/AudioManager.ts +4 -0
- package/src/types.ts +9 -90
- 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 -37
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.cpp +0 -187
- package/android/src/main/cpp/audioapi/android/core/utils/AndroidRecorderCallback.h +0 -57
- 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 -429
- package/android/src/main/cpp/audioapi/android/core/utils/ffmpegBackend/FFmpegFileWriter.h +0 -113
- 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 -269
- package/android/src/main/cpp/audioapi/android/core/utils/miniaudioBackend/MiniAudioFileWriter.h +0 -47
- 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 -36
- package/ios/audioapi/ios/core/IOSAudioFileOptions.mm +0 -140
- package/ios/audioapi/ios/core/IOSAudioFileWriter.h +0 -51
- package/ios/audioapi/ios/core/IOSAudioFileWriter.mm +0 -223
- package/ios/audioapi/ios/core/IOSRecorderCallback.h +0 -57
- package/ios/audioapi/ios/core/IOSRecorderCallback.mm +0 -189
- 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
|
@@ -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.
|
|
@@ -75,7 +75,7 @@ typedef struct AVOpenCLDeviceContext {
|
|
|
75
75
|
/**
|
|
76
76
|
* The default command queue for this device, which will be used by all
|
|
77
77
|
* frames contexts which do not have their own command queue. If not
|
|
78
|
-
*
|
|
78
|
+
* initialised by the user, a default queue will be created on the
|
|
79
79
|
* primary device.
|
|
80
80
|
*/
|
|
81
81
|
cl_command_queue command_queue;
|
|
@@ -115,7 +115,7 @@ typedef struct AVVulkanDeviceContext {
|
|
|
115
115
|
#if FF_API_VULKAN_FIXED_QUEUES
|
|
116
116
|
/**
|
|
117
117
|
* Queue family index for graphics operations, and the number of queues
|
|
118
|
-
* enabled for it. If
|
|
118
|
+
* enabled for it. If unavailable, will be set to -1. Not required.
|
|
119
119
|
* av_hwdevice_create() will attempt to find a dedicated queue for each
|
|
120
120
|
* queue family, or pick the one with the least unrelated flags set.
|
|
121
121
|
* Queue indices here may overlap if a queue has to share capabilities.
|
|
@@ -213,11 +213,11 @@ typedef struct AVIAMFParamDefinition {
|
|
|
213
213
|
enum AVIAMFParamDefinitionType type;
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
|
-
* Identifier for the
|
|
216
|
+
* Identifier for the parameter substream.
|
|
217
217
|
*/
|
|
218
218
|
unsigned int parameter_id;
|
|
219
219
|
/**
|
|
220
|
-
* Sample rate for the
|
|
220
|
+
* Sample rate for the parameter substream. It must not be 0.
|
|
221
221
|
*/
|
|
222
222
|
unsigned int parameter_rate;
|
|
223
223
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* Context structure for the Lagged Fibonacci PRNG.
|
|
29
29
|
* The exact layout, types and content of this struct may change and should
|
|
30
30
|
* not be accessed directly. Only its `sizeof()` is guaranteed to stay the same
|
|
31
|
-
* to allow easy
|
|
31
|
+
* to allow easy instantiation.
|
|
32
32
|
*/
|
|
33
33
|
typedef struct AVLFG {
|
|
34
34
|
unsigned int state[64];
|
|
@@ -73,7 +73,7 @@ static inline unsigned int av_mlfg_get(AVLFG *c){
|
|
|
73
73
|
* Get the next two numbers generated by a Box-Muller Gaussian
|
|
74
74
|
* generator using the random numbers issued by lfg.
|
|
75
75
|
*
|
|
76
|
-
* @param lfg pointer to the
|
|
76
|
+
* @param lfg pointer to the context structure
|
|
77
77
|
* @param out array where the two generated numbers are placed
|
|
78
78
|
*/
|
|
79
79
|
void av_bmg_get(AVLFG *lfg, double out[2]);
|
|
@@ -277,9 +277,9 @@ void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4);
|
|
|
277
277
|
* @param avcl A pointer to an arbitrary struct of which the first field is a
|
|
278
278
|
* pointer to an AVClass struct or NULL if general log.
|
|
279
279
|
* @param initial_level importance level of the message expressed using a @ref
|
|
280
|
-
* lavu_log_constants "Logging Constant" for the first
|
|
280
|
+
* lavu_log_constants "Logging Constant" for the first occurrence.
|
|
281
281
|
* @param subsequent_level importance level of the message expressed using a @ref
|
|
282
|
-
* lavu_log_constants "Logging Constant" after the first
|
|
282
|
+
* lavu_log_constants "Logging Constant" after the first occurrence.
|
|
283
283
|
* @param fmt The format string (printf-compatible) that specifies how
|
|
284
284
|
* subsequent arguments are converted to output.
|
|
285
285
|
* @param state a variable to keep trak of if a message has already been printed
|
|
@@ -278,7 +278,7 @@ int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int
|
|
|
278
278
|
/**
|
|
279
279
|
* Add a value to a timestamp.
|
|
280
280
|
*
|
|
281
|
-
* This function guarantees that when the same value is
|
|
281
|
+
* This function guarantees that when the same value is repeatedly added that
|
|
282
282
|
* no accumulation of rounding errors occurs.
|
|
283
283
|
*
|
|
284
284
|
* @param[in] ts Input timestamp
|
|
@@ -542,7 +542,7 @@ typedef struct AVOptionRanges {
|
|
|
542
542
|
*/
|
|
543
543
|
int nb_ranges;
|
|
544
544
|
/**
|
|
545
|
-
* Number of
|
|
545
|
+
* Number of components.
|
|
546
546
|
*/
|
|
547
547
|
int nb_components;
|
|
548
548
|
} AVOptionRanges;
|
|
@@ -1137,7 +1137,7 @@ int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
|
|
|
1137
1137
|
* @param[in] obj AVClass object to serialize
|
|
1138
1138
|
* @param[in] opt_flags serialize options with all the specified flags set (AV_OPT_FLAG)
|
|
1139
1139
|
* @param[in] flags combination of AV_OPT_SERIALIZE_* flags
|
|
1140
|
-
* @param[out] buffer Pointer to buffer that will be allocated with string
|
|
1140
|
+
* @param[out] buffer Pointer to buffer that will be allocated with string containing serialized options.
|
|
1141
1141
|
* Buffer must be freed by the caller when is no longer needed.
|
|
1142
1142
|
* @param[in] key_val_sep character used to separate key from value
|
|
1143
1143
|
* @param[in] pairs_sep character used to separate two pairs from each other
|
|
@@ -1167,7 +1167,7 @@ void av_opt_freep_ranges(AVOptionRanges **ranges);
|
|
|
1167
1167
|
*
|
|
1168
1168
|
* The result must be freed with av_opt_freep_ranges.
|
|
1169
1169
|
*
|
|
1170
|
-
* @return number of
|
|
1170
|
+
* @return number of components returned on success, a negative error code otherwise
|
|
1171
1171
|
*/
|
|
1172
1172
|
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);
|
|
1173
1173
|
|
|
@@ -1183,7 +1183,7 @@ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags
|
|
|
1183
1183
|
*
|
|
1184
1184
|
* The result must be freed with av_opt_free_ranges.
|
|
1185
1185
|
*
|
|
1186
|
-
* @return number of
|
|
1186
|
+
* @return number of components returned on success, a negative error code otherwise
|
|
1187
1187
|
*/
|
|
1188
1188
|
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
|
|
1189
1189
|
|
|
@@ -43,7 +43,7 @@ AVRC4 *av_rc4_alloc(void);
|
|
|
43
43
|
* @brief Initializes an AVRC4 context.
|
|
44
44
|
*
|
|
45
45
|
* @param d pointer to the AVRC4 context
|
|
46
|
-
* @param key buffer
|
|
46
|
+
* @param key buffer containing the key
|
|
47
47
|
* @param key_bits must be a multiple of 8
|
|
48
48
|
* @param decrypt 0 for encryption, 1 for decryption, currently has no effect
|
|
49
49
|
* @return zero on success, negative value otherwise
|
|
@@ -161,7 +161,7 @@ int av_refstruct_exclusive(const void *obj);
|
|
|
161
161
|
*
|
|
162
162
|
* Frequently allocating and freeing large or complicated objects may be slow
|
|
163
163
|
* and wasteful. This API is meant to solve this in cases when the caller
|
|
164
|
-
* needs a set of
|
|
164
|
+
* needs a set of interchangeable objects.
|
|
165
165
|
*
|
|
166
166
|
* At the beginning, the user must call allocate the pool via
|
|
167
167
|
* av_refstruct_pool_alloc() or its analogue av_refstruct_pool_alloc_ext().
|
|
@@ -82,6 +82,12 @@ enum AVSphericalProjection {
|
|
|
82
82
|
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/fisheye
|
|
83
83
|
*/
|
|
84
84
|
AV_SPHERICAL_FISHEYE,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Parametric Immersive projection (Apple).
|
|
88
|
+
* See: https://developer.apple.com/documentation/coremedia/cmprojectiontype/parametricimmersive
|
|
89
|
+
*/
|
|
90
|
+
AV_SPHERICAL_PARAMETRIC_IMMERSIVE,
|
|
85
91
|
};
|
|
86
92
|
|
|
87
93
|
/**
|