react-native-audio-api 0.8.0-nightly-5a12f24-20250901 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/RNAudioAPI.podspec +15 -6
  2. package/android/build.gradle +11 -2
  3. package/android/src/main/cpp/audioapi/CMakeLists.txt +24 -17
  4. package/android/src/main/cpp/audioapi/android/core/AudioDecoder.cpp +51 -21
  5. package/android/src/main/jniLibs/arm64-v8a/libavcodec.so +0 -0
  6. package/android/src/main/jniLibs/arm64-v8a/libavformat.so +0 -0
  7. package/android/src/main/jniLibs/arm64-v8a/libavutil.so +0 -0
  8. package/android/src/main/jniLibs/arm64-v8a/libswresample.so +0 -0
  9. package/android/src/main/jniLibs/armeabi-v7a/libavcodec.so +0 -0
  10. package/android/src/main/jniLibs/armeabi-v7a/libavformat.so +0 -0
  11. package/android/src/main/jniLibs/armeabi-v7a/libavutil.so +0 -0
  12. package/android/src/main/jniLibs/armeabi-v7a/libswresample.so +0 -0
  13. package/android/src/main/jniLibs/x86/libavcodec.so +0 -0
  14. package/android/src/main/jniLibs/x86/libavformat.so +0 -0
  15. package/android/src/main/jniLibs/x86/libavutil.so +0 -0
  16. package/android/src/main/jniLibs/x86/libswresample.so +0 -0
  17. package/android/src/main/jniLibs/x86_64/libavcodec.so +0 -0
  18. package/android/src/main/jniLibs/x86_64/libavformat.so +0 -0
  19. package/android/src/main/jniLibs/x86_64/libavutil.so +0 -0
  20. package/android/src/main/jniLibs/x86_64/libswresample.so +0 -0
  21. package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +11 -0
  22. package/common/cpp/audioapi/HostObjects/StreamerNodeHostObject.h +30 -0
  23. package/common/cpp/audioapi/core/BaseAudioContext.cpp +9 -0
  24. package/common/cpp/audioapi/core/BaseAudioContext.h +2 -0
  25. package/common/cpp/audioapi/core/sources/StreamerNode.cpp +299 -0
  26. package/common/cpp/audioapi/core/sources/StreamerNode.h +123 -0
  27. package/common/cpp/audioapi/core/utils/AudioDecoder.h +61 -0
  28. package/common/cpp/audioapi/core/utils/AudioNodeManager.cpp +14 -2
  29. package/common/cpp/audioapi/core/utils/AudioNodeManager.h +3 -0
  30. package/common/cpp/audioapi/external/arm64-v8a/libcrypto.a +0 -0
  31. package/common/cpp/audioapi/external/arm64-v8a/libssl.a +0 -0
  32. package/common/cpp/audioapi/external/armeabi-v7a/libcrypto.a +0 -0
  33. package/common/cpp/audioapi/external/armeabi-v7a/libssl.a +0 -0
  34. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/ac3_parser.h +36 -0
  35. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/adts_parser.h +37 -0
  36. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avcodec.h +2947 -0
  37. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avdct.h +88 -0
  38. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/bsf.h +332 -0
  39. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec.h +367 -0
  40. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_desc.h +134 -0
  41. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_id.h +681 -0
  42. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_par.h +248 -0
  43. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/d3d11va.h +109 -0
  44. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/defs.h +359 -0
  45. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dirac.h +135 -0
  46. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dv_profile.h +82 -0
  47. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dxva2.h +90 -0
  48. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/jni.h +67 -0
  49. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/mediacodec.h +103 -0
  50. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/packet.h +907 -0
  51. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/qsv.h +109 -0
  52. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/vdpau.h +138 -0
  53. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version.h +45 -0
  54. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version_major.h +55 -0
  55. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/videotoolbox.h +85 -0
  56. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/vorbis_parser.h +74 -0
  57. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avformat.h +3004 -0
  58. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avio.h +831 -0
  59. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version.h +47 -0
  60. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version_major.h +50 -0
  61. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/adler32.h +63 -0
  62. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/aes.h +69 -0
  63. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/aes_ctr.h +99 -0
  64. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ambient_viewing_environment.h +72 -0
  65. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/attributes.h +175 -0
  66. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/audio_fifo.h +187 -0
  67. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avassert.h +120 -0
  68. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avconfig.h +6 -0
  69. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avstring.h +428 -0
  70. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avutil.h +364 -0
  71. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/base64.h +72 -0
  72. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/blowfish.h +82 -0
  73. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/bprint.h +254 -0
  74. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/bswap.h +105 -0
  75. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/buffer.h +322 -0
  76. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/camellia.h +70 -0
  77. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/cast5.h +80 -0
  78. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/channel_layout.h +762 -0
  79. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/common.h +589 -0
  80. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/container_fifo.h +130 -0
  81. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/cpu.h +150 -0
  82. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/crc.h +102 -0
  83. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/csp.h +192 -0
  84. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/des.h +81 -0
  85. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/detection_bbox.h +108 -0
  86. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dict.h +242 -0
  87. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/display.h +109 -0
  88. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dovi_meta.h +396 -0
  89. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/downmix_info.h +115 -0
  90. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/encryption_info.h +205 -0
  91. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/error.h +129 -0
  92. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/eval.h +140 -0
  93. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/executor.h +67 -0
  94. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ffversion.h +5 -0
  95. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/fifo.h +242 -0
  96. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/file.h +62 -0
  97. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/film_grain_params.h +282 -0
  98. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/frame.h +1163 -0
  99. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hash.h +264 -0
  100. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_metadata.h +376 -0
  101. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_vivid_metadata.h +292 -0
  102. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hmac.h +99 -0
  103. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext.h +601 -0
  104. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_amf.h +46 -0
  105. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_cuda.h +74 -0
  106. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_d3d11va.h +178 -0
  107. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_d3d12va.h +142 -0
  108. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_drm.h +169 -0
  109. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_dxva2.h +75 -0
  110. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_mediacodec.h +61 -0
  111. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_oh.h +34 -0
  112. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_opencl.h +100 -0
  113. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_qsv.h +87 -0
  114. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vaapi.h +117 -0
  115. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vdpau.h +44 -0
  116. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_videotoolbox.h +106 -0
  117. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vulkan.h +377 -0
  118. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/iamf.h +694 -0
  119. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/imgutils.h +377 -0
  120. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/intfloat.h +77 -0
  121. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/intreadwrite.h +677 -0
  122. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lfg.h +81 -0
  123. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/log.h +427 -0
  124. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lzo.h +66 -0
  125. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/macros.h +80 -0
  126. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mastering_display_metadata.h +137 -0
  127. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mathematics.h +300 -0
  128. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/md5.h +89 -0
  129. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mem.h +607 -0
  130. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/motion_vector.h +57 -0
  131. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/murmur3.h +115 -0
  132. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/opt.h +1194 -0
  133. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/parseutils.h +197 -0
  134. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixdesc.h +440 -0
  135. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixelutils.h +51 -0
  136. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixfmt.h +797 -0
  137. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/random_seed.h +57 -0
  138. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rational.h +225 -0
  139. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rc4.h +69 -0
  140. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/refstruct.h +297 -0
  141. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/replaygain.h +50 -0
  142. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ripemd.h +83 -0
  143. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/samplefmt.h +269 -0
  144. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/sha.h +90 -0
  145. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/sha512.h +92 -0
  146. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/spherical.h +243 -0
  147. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/stereo3d.h +325 -0
  148. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tdrdi.h +164 -0
  149. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tea.h +71 -0
  150. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/threadmessage.h +115 -0
  151. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/timecode.h +199 -0
  152. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/timestamp.h +85 -0
  153. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tree.h +137 -0
  154. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/twofish.h +70 -0
  155. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tx.h +210 -0
  156. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/uuid.h +146 -0
  157. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/version.h +119 -0
  158. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_enc_params.h +171 -0
  159. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_hint.h +107 -0
  160. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/xtea.h +94 -0
  161. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/swresample.h +587 -0
  162. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version.h +46 -0
  163. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version_major.h +31 -0
  164. package/common/cpp/audioapi/external/libavcodec.xcframework/Info.plist +44 -0
  165. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/Info.plist +1 -0
  166. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
  167. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/Info.plist +1 -0
  168. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
  169. package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +44 -0
  170. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/Info.plist +1 -0
  171. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
  172. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/Info.plist +1 -0
  173. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
  174. package/common/cpp/audioapi/external/libavutil.xcframework/Info.plist +44 -0
  175. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/Info.plist +1 -0
  176. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
  177. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/Info.plist +1 -0
  178. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
  179. package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +44 -0
  180. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/Info.plist +1 -0
  181. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
  182. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/Info.plist +1 -0
  183. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
  184. package/common/cpp/audioapi/external/x86/libcrypto.a +0 -0
  185. package/common/cpp/audioapi/external/x86/libssl.a +0 -0
  186. package/common/cpp/audioapi/external/x86_64/libcrypto.a +0 -0
  187. package/common/cpp/audioapi/external/x86_64/libssl.a +0 -0
  188. package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.cpp +402 -0
  189. package/common/cpp/audioapi/libs/ffmpeg/FFmpegDecoding.h +27 -0
  190. package/common/cpp/audioapi/libs/ffmpeg/INSTRUCTIONS.md +26 -0
  191. package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +111 -0
  192. package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +361 -0
  193. package/common/cpp/audioapi/utils/SpscChannel.hpp +47 -38
  194. package/common/cpp/test/CMakeLists.txt +7 -1
  195. package/ios/audioapi/ios/core/AudioDecoder.mm +22 -2
  196. package/lib/commonjs/api.js +7 -0
  197. package/lib/commonjs/api.js.map +1 -1
  198. package/lib/commonjs/core/AudioContext.js.map +1 -1
  199. package/lib/commonjs/core/BaseAudioContext.js +4 -0
  200. package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
  201. package/lib/commonjs/core/StreamerNode.js +15 -0
  202. package/lib/commonjs/core/StreamerNode.js.map +1 -0
  203. package/lib/module/api.js +1 -0
  204. package/lib/module/api.js.map +1 -1
  205. package/lib/module/core/AudioContext.js.map +1 -1
  206. package/lib/module/core/BaseAudioContext.js +4 -0
  207. package/lib/module/core/BaseAudioContext.js.map +1 -1
  208. package/lib/module/core/StreamerNode.js +9 -0
  209. package/lib/module/core/StreamerNode.js.map +1 -0
  210. package/lib/typescript/api.d.ts +1 -0
  211. package/lib/typescript/api.d.ts.map +1 -1
  212. package/lib/typescript/core/AudioContext.d.ts +1 -1
  213. package/lib/typescript/core/AudioContext.d.ts.map +1 -1
  214. package/lib/typescript/core/BaseAudioContext.d.ts +2 -0
  215. package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
  216. package/lib/typescript/core/StreamerNode.d.ts +5 -0
  217. package/lib/typescript/core/StreamerNode.d.ts.map +1 -0
  218. package/lib/typescript/interfaces.d.ts +5 -1
  219. package/lib/typescript/interfaces.d.ts.map +1 -1
  220. package/package.json +1 -1
  221. package/src/api.ts +1 -0
  222. package/src/core/AudioContext.ts +1 -1
  223. package/src/core/BaseAudioContext.ts +5 -0
  224. package/src/core/StreamerNode.ts +8 -0
  225. package/src/interfaces.ts +6 -1
@@ -0,0 +1,248 @@
1
+ /*
2
+ * Codec parameters public API
3
+ *
4
+ * This file is part of FFmpeg.
5
+ *
6
+ * FFmpeg is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * FFmpeg is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with FFmpeg; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
+ */
20
+
21
+ #ifndef AVCODEC_CODEC_PAR_H
22
+ #define AVCODEC_CODEC_PAR_H
23
+
24
+ #include <stdint.h>
25
+
26
+ #include "libavutil/avutil.h"
27
+ #include "libavutil/channel_layout.h"
28
+ #include "libavutil/rational.h"
29
+ #include "libavutil/pixfmt.h"
30
+
31
+ #include "codec_id.h"
32
+ #include "defs.h"
33
+ #include "packet.h"
34
+
35
+ /**
36
+ * @addtogroup lavc_core
37
+ * @{
38
+ */
39
+
40
+ /**
41
+ * This struct describes the properties of an encoded stream.
42
+ *
43
+ * sizeof(AVCodecParameters) is not a part of the public ABI, this struct must
44
+ * be allocated with avcodec_parameters_alloc() and freed with
45
+ * avcodec_parameters_free().
46
+ */
47
+ typedef struct AVCodecParameters {
48
+ /**
49
+ * General type of the encoded data.
50
+ */
51
+ enum AVMediaTypeFFmpeg codec_type;
52
+ /**
53
+ * Specific type of the encoded data (the codec used).
54
+ */
55
+ enum AVCodecID codec_id;
56
+ /**
57
+ * Additional information about the codec (corresponds to the AVI FOURCC).
58
+ */
59
+ uint32_t codec_tag;
60
+
61
+ /**
62
+ * Extra binary data needed for initializing the decoder, codec-dependent.
63
+ *
64
+ * Must be allocated with av_malloc() and will be freed by
65
+ * avcodec_parameters_free(). The allocated size of extradata must be at
66
+ * least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding
67
+ * bytes zeroed.
68
+ */
69
+ uint8_t *extradata;
70
+ /**
71
+ * Size of the extradata content in bytes.
72
+ */
73
+ int extradata_size;
74
+
75
+ /**
76
+ * Additional data associated with the entire stream.
77
+ *
78
+ * Should be allocated with av_packet_side_data_new() or
79
+ * av_packet_side_data_add(), and will be freed by avcodec_parameters_free().
80
+ */
81
+ AVPacketSideData *coded_side_data;
82
+
83
+ /**
84
+ * Amount of entries in @ref coded_side_data.
85
+ */
86
+ int nb_coded_side_data;
87
+
88
+ /**
89
+ * - video: the pixel format, the value corresponds to enum AVPixelFormat.
90
+ * - audio: the sample format, the value corresponds to enum AVSampleFormat.
91
+ */
92
+ int format;
93
+
94
+ /**
95
+ * The average bitrate of the encoded data (in bits per second).
96
+ */
97
+ int64_t bit_rate;
98
+
99
+ /**
100
+ * The number of bits per sample in the codedwords.
101
+ *
102
+ * This is basically the bitrate per sample. It is mandatory for a bunch of
103
+ * formats to actually decode them. It's the number of bits for one sample in
104
+ * the actual coded bitstream.
105
+ *
106
+ * This could be for example 4 for ADPCM
107
+ * For PCM formats this matches bits_per_raw_sample
108
+ * Can be 0
109
+ */
110
+ int bits_per_coded_sample;
111
+
112
+ /**
113
+ * This is the number of valid bits in each output sample. If the
114
+ * sample format has more bits, the least significant bits are additional
115
+ * padding bits, which are always 0. Use right shifts to reduce the sample
116
+ * to its actual size. For example, audio formats with 24 bit samples will
117
+ * have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32.
118
+ * To get the original sample use "(int32_t)sample >> 8"."
119
+ *
120
+ * For ADPCM this might be 12 or 16 or similar
121
+ * Can be 0
122
+ */
123
+ int bits_per_raw_sample;
124
+
125
+ /**
126
+ * Codec-specific bitstream restrictions that the stream conforms to.
127
+ */
128
+ int profile;
129
+ int level;
130
+
131
+ /**
132
+ * Video only. The dimensions of the video frame in pixels.
133
+ */
134
+ int width;
135
+ int height;
136
+
137
+ /**
138
+ * Video only. The aspect ratio (width / height) which a single pixel
139
+ * should have when displayed.
140
+ *
141
+ * When the aspect ratio is unknown / undefined, the numerator should be
142
+ * set to 0 (the denominator may have any value).
143
+ */
144
+ AVRational sample_aspect_ratio;
145
+
146
+ /**
147
+ * Video only. Number of frames per second, for streams with constant frame
148
+ * durations. Should be set to { 0, 1 } when some frames have differing
149
+ * durations or if the value is not known.
150
+ *
151
+ * @note This field correponds to values that are stored in codec-level
152
+ * headers and is typically overridden by container/transport-layer
153
+ * timestamps, when available. It should thus be used only as a last resort,
154
+ * when no higher-level timing information is available.
155
+ */
156
+ AVRational framerate;
157
+
158
+ /**
159
+ * Video only. The order of the fields in interlaced video.
160
+ */
161
+ enum AVFieldOrder field_order;
162
+
163
+ /**
164
+ * Video only. Additional colorspace characteristics.
165
+ */
166
+ enum AVColorRange color_range;
167
+ enum AVColorPrimaries color_primaries;
168
+ enum AVColorTransferCharacteristic color_trc;
169
+ enum AVColorSpace color_space;
170
+ enum AVChromaLocation chroma_location;
171
+
172
+ /**
173
+ * Video only. Number of delayed frames.
174
+ */
175
+ int video_delay;
176
+
177
+ /**
178
+ * Audio only. The channel layout and number of channels.
179
+ */
180
+ AVChannelLayout ch_layout;
181
+ /**
182
+ * Audio only. The number of audio samples per second.
183
+ */
184
+ int sample_rate;
185
+ /**
186
+ * Audio only. The number of bytes per coded audio frame, required by some
187
+ * formats.
188
+ *
189
+ * Corresponds to nBlockAlign in WAVEFORMATEX.
190
+ */
191
+ int block_align;
192
+ /**
193
+ * Audio only. Audio frame size, if known. Required by some formats to be static.
194
+ */
195
+ int frame_size;
196
+
197
+ /**
198
+ * Audio only. The amount of padding (in samples) inserted by the encoder at
199
+ * the beginning of the audio. I.e. this number of leading decoded samples
200
+ * must be discarded by the caller to get the original audio without leading
201
+ * padding.
202
+ */
203
+ int initial_padding;
204
+ /**
205
+ * Audio only. The amount of padding (in samples) appended by the encoder to
206
+ * the end of the audio. I.e. this number of decoded samples must be
207
+ * discarded by the caller from the end of the stream to get the original
208
+ * audio without any trailing padding.
209
+ */
210
+ int trailing_padding;
211
+ /**
212
+ * Audio only. Number of samples to skip after a discontinuity.
213
+ */
214
+ int seek_preroll;
215
+ } AVCodecParameters;
216
+
217
+ /**
218
+ * Allocate a new AVCodecParameters and set its fields to default values
219
+ * (unknown/invalid/0). The returned struct must be freed with
220
+ * avcodec_parameters_free().
221
+ */
222
+ AVCodecParameters *avcodec_parameters_alloc(void);
223
+
224
+ /**
225
+ * Free an AVCodecParameters instance and everything associated with it and
226
+ * write NULL to the supplied pointer.
227
+ */
228
+ void avcodec_parameters_free(AVCodecParameters **par);
229
+
230
+ /**
231
+ * Copy the contents of src to dst. Any allocated fields in dst are freed and
232
+ * replaced with newly allocated duplicates of the corresponding fields in src.
233
+ *
234
+ * @return >= 0 on success, a negative AVERROR code on failure.
235
+ */
236
+ int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src);
237
+
238
+ /**
239
+ * This function is the same as av_get_audio_frame_duration(), except it works
240
+ * with AVCodecParameters instead of an AVCodecContext.
241
+ */
242
+ int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
243
+
244
+ /**
245
+ * @}
246
+ */
247
+
248
+ #endif // AVCODEC_CODEC_PAR_H
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Direct3D11 HW acceleration
3
+ *
4
+ * copyright (c) 2009 Laurent Aimar
5
+ * copyright (c) 2015 Steve Lhomme
6
+ *
7
+ * This file is part of FFmpeg.
8
+ *
9
+ * FFmpeg is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU Lesser General Public
11
+ * License as published by the Free Software Foundation; either
12
+ * version 2.1 of the License, or (at your option) any later version.
13
+ *
14
+ * FFmpeg is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+ * Lesser General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Lesser General Public
20
+ * License along with FFmpeg; if not, write to the Free Software
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
+ */
23
+
24
+ #ifndef AVCODEC_D3D11VA_H
25
+ #define AVCODEC_D3D11VA_H
26
+
27
+ /**
28
+ * @file
29
+ * @ingroup lavc_codec_hwaccel_d3d11va
30
+ * Public libavcodec D3D11VA header.
31
+ */
32
+
33
+ #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
34
+ #undef _WIN32_WINNT
35
+ #define _WIN32_WINNT 0x0602
36
+ #endif
37
+
38
+ #include <stdint.h>
39
+ #include <d3d11.h>
40
+
41
+ /**
42
+ * @defgroup lavc_codec_hwaccel_d3d11va Direct3D11
43
+ * @ingroup lavc_codec_hwaccel
44
+ *
45
+ * @{
46
+ */
47
+
48
+ /**
49
+ * This structure is used to provides the necessary configurations and data
50
+ * to the Direct3D11 FFmpeg HWAccel implementation.
51
+ *
52
+ * The application must make it available as AVCodecContext.hwaccel_context.
53
+ *
54
+ * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext.
55
+ */
56
+ typedef struct AVD3D11VAContext {
57
+ /**
58
+ * D3D11 decoder object
59
+ */
60
+ ID3D11VideoDecoder *decoder;
61
+
62
+ /**
63
+ * D3D11 VideoContext
64
+ */
65
+ ID3D11VideoContext *video_context;
66
+
67
+ /**
68
+ * D3D11 configuration used to create the decoder
69
+ */
70
+ D3D11_VIDEO_DECODER_CONFIG *cfg;
71
+
72
+ /**
73
+ * The number of surface in the surface array
74
+ */
75
+ unsigned surface_count;
76
+
77
+ /**
78
+ * The array of Direct3D surfaces used to create the decoder
79
+ */
80
+ ID3D11VideoDecoderOutputView **surface;
81
+
82
+ /**
83
+ * A bit field configuring the workarounds needed for using the decoder
84
+ */
85
+ uint64_t workaround;
86
+
87
+ /**
88
+ * Private to the FFmpeg AVHWAccel implementation
89
+ */
90
+ unsigned report_id;
91
+
92
+ /**
93
+ * Mutex to access video_context
94
+ */
95
+ HANDLE context_mutex;
96
+ } AVD3D11VAContext;
97
+
98
+ /**
99
+ * Allocate an AVD3D11VAContext.
100
+ *
101
+ * @return Newly-allocated AVD3D11VAContext or NULL on failure.
102
+ */
103
+ AVD3D11VAContext *av_d3d11va_alloc_context(void);
104
+
105
+ /**
106
+ * @}
107
+ */
108
+
109
+ #endif /* AVCODEC_D3D11VA_H */