react-native-audio-api 0.7.2 → 0.8.0-nightly-daaceff-20250902

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 (214) hide show
  1. package/RNAudioAPI.podspec +15 -6
  2. package/android/build.gradle +10 -1
  3. package/android/src/main/cpp/audioapi/CMakeLists.txt +21 -5
  4. package/android/src/main/jniLibs/arm64-v8a/libavcodec.so +0 -0
  5. package/android/src/main/jniLibs/arm64-v8a/libavformat.so +0 -0
  6. package/android/src/main/jniLibs/arm64-v8a/libavutil.so +0 -0
  7. package/android/src/main/jniLibs/arm64-v8a/libswresample.so +0 -0
  8. package/android/src/main/jniLibs/armeabi-v7a/libavcodec.so +0 -0
  9. package/android/src/main/jniLibs/armeabi-v7a/libavformat.so +0 -0
  10. package/android/src/main/jniLibs/armeabi-v7a/libavutil.so +0 -0
  11. package/android/src/main/jniLibs/armeabi-v7a/libswresample.so +0 -0
  12. package/android/src/main/jniLibs/x86/libavcodec.so +0 -0
  13. package/android/src/main/jniLibs/x86/libavformat.so +0 -0
  14. package/android/src/main/jniLibs/x86/libavutil.so +0 -0
  15. package/android/src/main/jniLibs/x86/libswresample.so +0 -0
  16. package/android/src/main/jniLibs/x86_64/libavcodec.so +0 -0
  17. package/android/src/main/jniLibs/x86_64/libavformat.so +0 -0
  18. package/android/src/main/jniLibs/x86_64/libavutil.so +0 -0
  19. package/android/src/main/jniLibs/x86_64/libswresample.so +0 -0
  20. package/common/cpp/audioapi/HostObjects/BaseAudioContextHostObject.h +11 -0
  21. package/common/cpp/audioapi/HostObjects/StreamerNodeHostObject.h +30 -0
  22. package/common/cpp/audioapi/core/BaseAudioContext.cpp +9 -0
  23. package/common/cpp/audioapi/core/BaseAudioContext.h +2 -0
  24. package/common/cpp/audioapi/core/sources/StreamerNode.cpp +299 -0
  25. package/common/cpp/audioapi/core/sources/StreamerNode.h +123 -0
  26. package/common/cpp/audioapi/external/arm64-v8a/libcrypto.a +0 -0
  27. package/common/cpp/audioapi/external/arm64-v8a/libssl.a +0 -0
  28. package/common/cpp/audioapi/external/armeabi-v7a/libcrypto.a +0 -0
  29. package/common/cpp/audioapi/external/armeabi-v7a/libssl.a +0 -0
  30. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/ac3_parser.h +36 -0
  31. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/adts_parser.h +37 -0
  32. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avcodec.h +2947 -0
  33. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/avdct.h +88 -0
  34. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/bsf.h +332 -0
  35. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec.h +367 -0
  36. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_desc.h +134 -0
  37. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_id.h +681 -0
  38. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/codec_par.h +248 -0
  39. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/d3d11va.h +109 -0
  40. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/defs.h +359 -0
  41. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dirac.h +135 -0
  42. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dv_profile.h +82 -0
  43. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/dxva2.h +90 -0
  44. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/jni.h +67 -0
  45. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/mediacodec.h +103 -0
  46. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/packet.h +907 -0
  47. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/qsv.h +109 -0
  48. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/vdpau.h +138 -0
  49. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version.h +45 -0
  50. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/version_major.h +55 -0
  51. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/videotoolbox.h +85 -0
  52. package/common/cpp/audioapi/external/ffmpeg_include/libavcodec/vorbis_parser.h +74 -0
  53. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avformat.h +3004 -0
  54. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/avio.h +831 -0
  55. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version.h +47 -0
  56. package/common/cpp/audioapi/external/ffmpeg_include/libavformat/version_major.h +50 -0
  57. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/adler32.h +63 -0
  58. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/aes.h +69 -0
  59. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/aes_ctr.h +99 -0
  60. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ambient_viewing_environment.h +72 -0
  61. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/attributes.h +175 -0
  62. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/audio_fifo.h +187 -0
  63. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avassert.h +120 -0
  64. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avconfig.h +6 -0
  65. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avstring.h +428 -0
  66. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/avutil.h +364 -0
  67. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/base64.h +72 -0
  68. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/blowfish.h +82 -0
  69. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/bprint.h +254 -0
  70. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/bswap.h +105 -0
  71. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/buffer.h +322 -0
  72. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/camellia.h +70 -0
  73. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/cast5.h +80 -0
  74. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/channel_layout.h +762 -0
  75. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/common.h +589 -0
  76. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/container_fifo.h +130 -0
  77. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/cpu.h +150 -0
  78. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/crc.h +102 -0
  79. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/csp.h +192 -0
  80. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/des.h +81 -0
  81. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/detection_bbox.h +108 -0
  82. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dict.h +242 -0
  83. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/display.h +109 -0
  84. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/dovi_meta.h +396 -0
  85. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/downmix_info.h +115 -0
  86. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/encryption_info.h +205 -0
  87. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/error.h +129 -0
  88. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/eval.h +140 -0
  89. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/executor.h +67 -0
  90. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ffversion.h +5 -0
  91. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/fifo.h +242 -0
  92. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/file.h +62 -0
  93. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/film_grain_params.h +282 -0
  94. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/frame.h +1163 -0
  95. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hash.h +264 -0
  96. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_metadata.h +376 -0
  97. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hdr_dynamic_vivid_metadata.h +292 -0
  98. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hmac.h +99 -0
  99. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext.h +601 -0
  100. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_amf.h +46 -0
  101. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_cuda.h +74 -0
  102. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_d3d11va.h +178 -0
  103. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_d3d12va.h +142 -0
  104. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_drm.h +169 -0
  105. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_dxva2.h +75 -0
  106. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_mediacodec.h +61 -0
  107. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_oh.h +34 -0
  108. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_opencl.h +100 -0
  109. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_qsv.h +87 -0
  110. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vaapi.h +117 -0
  111. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vdpau.h +44 -0
  112. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_videotoolbox.h +106 -0
  113. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/hwcontext_vulkan.h +377 -0
  114. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/iamf.h +694 -0
  115. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/imgutils.h +377 -0
  116. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/intfloat.h +77 -0
  117. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/intreadwrite.h +677 -0
  118. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lfg.h +81 -0
  119. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/log.h +427 -0
  120. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/lzo.h +66 -0
  121. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/macros.h +80 -0
  122. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mastering_display_metadata.h +137 -0
  123. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mathematics.h +300 -0
  124. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/md5.h +89 -0
  125. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/mem.h +607 -0
  126. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/motion_vector.h +57 -0
  127. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/murmur3.h +115 -0
  128. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/opt.h +1194 -0
  129. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/parseutils.h +197 -0
  130. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixdesc.h +440 -0
  131. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixelutils.h +51 -0
  132. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/pixfmt.h +797 -0
  133. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/random_seed.h +57 -0
  134. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rational.h +225 -0
  135. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/rc4.h +69 -0
  136. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/refstruct.h +297 -0
  137. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/replaygain.h +50 -0
  138. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/ripemd.h +83 -0
  139. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/samplefmt.h +269 -0
  140. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/sha.h +90 -0
  141. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/sha512.h +92 -0
  142. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/spherical.h +243 -0
  143. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/stereo3d.h +325 -0
  144. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tdrdi.h +164 -0
  145. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tea.h +71 -0
  146. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/threadmessage.h +115 -0
  147. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/timecode.h +199 -0
  148. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/timestamp.h +85 -0
  149. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tree.h +137 -0
  150. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/twofish.h +70 -0
  151. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/tx.h +210 -0
  152. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/uuid.h +146 -0
  153. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/version.h +119 -0
  154. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_enc_params.h +171 -0
  155. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/video_hint.h +107 -0
  156. package/common/cpp/audioapi/external/ffmpeg_include/libavutil/xtea.h +94 -0
  157. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/swresample.h +587 -0
  158. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version.h +46 -0
  159. package/common/cpp/audioapi/external/ffmpeg_include/libswresample/version_major.h +31 -0
  160. package/common/cpp/audioapi/external/libavcodec.xcframework/Info.plist +44 -0
  161. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/Info.plist +1 -0
  162. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64/libavcodec.framework/libavcodec +0 -0
  163. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/Info.plist +1 -0
  164. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec +0 -0
  165. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec.framework/Info.plist +1 -0
  166. package/common/cpp/audioapi/external/libavcodec.xcframework/ios-arm64_x86_64-simulator/libavcodec.framework/libavcodec.framework/libavcodec +0 -0
  167. package/common/cpp/audioapi/external/libavformat.xcframework/Info.plist +44 -0
  168. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/Info.plist +1 -0
  169. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64/libavformat.framework/libavformat +0 -0
  170. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/Info.plist +1 -0
  171. package/common/cpp/audioapi/external/libavformat.xcframework/ios-arm64_x86_64-simulator/libavformat.framework/libavformat +0 -0
  172. package/common/cpp/audioapi/external/libavutil.xcframework/Info.plist +44 -0
  173. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/Info.plist +1 -0
  174. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64/libavutil.framework/libavutil +0 -0
  175. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/Info.plist +1 -0
  176. package/common/cpp/audioapi/external/libavutil.xcframework/ios-arm64_x86_64-simulator/libavutil.framework/libavutil +0 -0
  177. package/common/cpp/audioapi/external/libswresample.xcframework/Info.plist +44 -0
  178. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/Info.plist +1 -0
  179. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64/libswresample.framework/libswresample +0 -0
  180. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/Info.plist +1 -0
  181. package/common/cpp/audioapi/external/libswresample.xcframework/ios-arm64_x86_64-simulator/libswresample.framework/libswresample +0 -0
  182. package/common/cpp/audioapi/external/x86/libcrypto.a +0 -0
  183. package/common/cpp/audioapi/external/x86/libssl.a +0 -0
  184. package/common/cpp/audioapi/external/x86_64/libcrypto.a +0 -0
  185. package/common/cpp/audioapi/external/x86_64/libssl.a +0 -0
  186. package/common/cpp/audioapi/libs/ffmpeg/INSTRUCTIONS.md +26 -0
  187. package/common/cpp/audioapi/libs/ffmpeg/create_xcframework.sh +111 -0
  188. package/common/cpp/audioapi/libs/ffmpeg/ffmpeg_setup.sh +360 -0
  189. package/common/cpp/test/CMakeLists.txt +5 -1
  190. package/lib/commonjs/api.js +7 -0
  191. package/lib/commonjs/api.js.map +1 -1
  192. package/lib/commonjs/core/BaseAudioContext.js +4 -0
  193. package/lib/commonjs/core/BaseAudioContext.js.map +1 -1
  194. package/lib/commonjs/core/StreamerNode.js +15 -0
  195. package/lib/commonjs/core/StreamerNode.js.map +1 -0
  196. package/lib/module/api.js +1 -0
  197. package/lib/module/api.js.map +1 -1
  198. package/lib/module/core/BaseAudioContext.js +4 -0
  199. package/lib/module/core/BaseAudioContext.js.map +1 -1
  200. package/lib/module/core/StreamerNode.js +9 -0
  201. package/lib/module/core/StreamerNode.js.map +1 -0
  202. package/lib/typescript/api.d.ts +1 -0
  203. package/lib/typescript/api.d.ts.map +1 -1
  204. package/lib/typescript/core/BaseAudioContext.d.ts +2 -0
  205. package/lib/typescript/core/BaseAudioContext.d.ts.map +1 -1
  206. package/lib/typescript/core/StreamerNode.d.ts +5 -0
  207. package/lib/typescript/core/StreamerNode.d.ts.map +1 -0
  208. package/lib/typescript/interfaces.d.ts +4 -0
  209. package/lib/typescript/interfaces.d.ts.map +1 -1
  210. package/package.json +1 -1
  211. package/src/api.ts +1 -0
  212. package/src/core/BaseAudioContext.ts +5 -0
  213. package/src/core/StreamerNode.ts +8 -0
  214. package/src/interfaces.ts +5 -0
@@ -0,0 +1,359 @@
1
+ /*
2
+ *
3
+ * This file is part of FFmpeg.
4
+ *
5
+ * FFmpeg is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * FFmpeg is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with FFmpeg; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ #ifndef AVCODEC_DEFS_H
21
+ #define AVCODEC_DEFS_H
22
+
23
+ /**
24
+ * @file
25
+ * @ingroup libavc
26
+ * Misc types and constants that do not belong anywhere else.
27
+ */
28
+
29
+ #include <stdint.h>
30
+ #include <stdlib.h>
31
+
32
+ /**
33
+ * @ingroup lavc_decoding
34
+ * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
35
+ * This is mainly needed because some optimized bitstream readers read
36
+ * 32 or 64 bit at once and could read over the end.<br>
37
+ * Note: If the first 23 bits of the additional bytes are not 0, then damaged
38
+ * MPEG bitstreams could cause overread and segfault.
39
+ */
40
+ #define AV_INPUT_BUFFER_PADDING_SIZE 64
41
+
42
+ /**
43
+ * Verify checksums embedded in the bitstream (could be of either encoded or
44
+ * decoded data, depending on the format) and print an error message on mismatch.
45
+ * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
46
+ * decoder/demuxer returning an error.
47
+ */
48
+ #define AV_EF_CRCCHECK (1<<0)
49
+ #define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
50
+ #define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
51
+ #define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
52
+
53
+ #define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
54
+ #define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
55
+ #define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
56
+ #define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error
57
+
58
+ #define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
59
+ #define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
60
+ #define FF_COMPLIANCE_NORMAL 0
61
+ #define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
62
+ #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
63
+
64
+
65
+ #define AV_PROFILE_UNKNOWN -99
66
+ #define AV_PROFILE_RESERVED -100
67
+
68
+ #define AV_PROFILE_AAC_MAIN 0
69
+ #define AV_PROFILE_AAC_LOW 1
70
+ #define AV_PROFILE_AAC_SSR 2
71
+ #define AV_PROFILE_AAC_LTP 3
72
+ #define AV_PROFILE_AAC_HE 4
73
+ #define AV_PROFILE_AAC_HE_V2 28
74
+ #define AV_PROFILE_AAC_LD 22
75
+ #define AV_PROFILE_AAC_ELD 38
76
+ #define AV_PROFILE_AAC_USAC 41
77
+ #define AV_PROFILE_MPEG2_AAC_LOW 128
78
+ #define AV_PROFILE_MPEG2_AAC_HE 131
79
+
80
+ #define AV_PROFILE_DNXHD 0
81
+ #define AV_PROFILE_DNXHR_LB 1
82
+ #define AV_PROFILE_DNXHR_SQ 2
83
+ #define AV_PROFILE_DNXHR_HQ 3
84
+ #define AV_PROFILE_DNXHR_HQX 4
85
+ #define AV_PROFILE_DNXHR_444 5
86
+
87
+ #define AV_PROFILE_DTS 20
88
+ #define AV_PROFILE_DTS_ES 30
89
+ #define AV_PROFILE_DTS_96_24 40
90
+ #define AV_PROFILE_DTS_HD_HRA 50
91
+ #define AV_PROFILE_DTS_HD_MA 60
92
+ #define AV_PROFILE_DTS_EXPRESS 70
93
+ #define AV_PROFILE_DTS_HD_MA_X 61
94
+ #define AV_PROFILE_DTS_HD_MA_X_IMAX 62
95
+
96
+ #define AV_PROFILE_EAC3_DDP_ATMOS 30
97
+
98
+ #define AV_PROFILE_TRUEHD_ATMOS 30
99
+
100
+ #define AV_PROFILE_MPEG2_422 0
101
+ #define AV_PROFILE_MPEG2_HIGH 1
102
+ #define AV_PROFILE_MPEG2_SS 2
103
+ #define AV_PROFILE_MPEG2_SNR_SCALABLE 3
104
+ #define AV_PROFILE_MPEG2_MAIN 4
105
+ #define AV_PROFILE_MPEG2_SIMPLE 5
106
+
107
+ #define AV_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
108
+ #define AV_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
109
+
110
+ #define AV_PROFILE_H264_BASELINE 66
111
+ #define AV_PROFILE_H264_CONSTRAINED_BASELINE (66|AV_PROFILE_H264_CONSTRAINED)
112
+ #define AV_PROFILE_H264_MAIN 77
113
+ #define AV_PROFILE_H264_EXTENDED 88
114
+ #define AV_PROFILE_H264_HIGH 100
115
+ #define AV_PROFILE_H264_HIGH_10 110
116
+ #define AV_PROFILE_H264_HIGH_10_INTRA (110|AV_PROFILE_H264_INTRA)
117
+ #define AV_PROFILE_H264_MULTIVIEW_HIGH 118
118
+ #define AV_PROFILE_H264_HIGH_422 122
119
+ #define AV_PROFILE_H264_HIGH_422_INTRA (122|AV_PROFILE_H264_INTRA)
120
+ #define AV_PROFILE_H264_STEREO_HIGH 128
121
+ #define AV_PROFILE_H264_HIGH_444 144
122
+ #define AV_PROFILE_H264_HIGH_444_PREDICTIVE 244
123
+ #define AV_PROFILE_H264_HIGH_444_INTRA (244|AV_PROFILE_H264_INTRA)
124
+ #define AV_PROFILE_H264_CAVLC_444 44
125
+
126
+ #define AV_PROFILE_VC1_SIMPLE 0
127
+ #define AV_PROFILE_VC1_MAIN 1
128
+ #define AV_PROFILE_VC1_COMPLEX 2
129
+ #define AV_PROFILE_VC1_ADVANCED 3
130
+
131
+ #define AV_PROFILE_MPEG4_SIMPLE 0
132
+ #define AV_PROFILE_MPEG4_SIMPLE_SCALABLE 1
133
+ #define AV_PROFILE_MPEG4_CORE 2
134
+ #define AV_PROFILE_MPEG4_MAIN 3
135
+ #define AV_PROFILE_MPEG4_N_BIT 4
136
+ #define AV_PROFILE_MPEG4_SCALABLE_TEXTURE 5
137
+ #define AV_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
138
+ #define AV_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
139
+ #define AV_PROFILE_MPEG4_HYBRID 8
140
+ #define AV_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
141
+ #define AV_PROFILE_MPEG4_CORE_SCALABLE 10
142
+ #define AV_PROFILE_MPEG4_ADVANCED_CODING 11
143
+ #define AV_PROFILE_MPEG4_ADVANCED_CORE 12
144
+ #define AV_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
145
+ #define AV_PROFILE_MPEG4_SIMPLE_STUDIO 14
146
+ #define AV_PROFILE_MPEG4_ADVANCED_SIMPLE 15
147
+
148
+ #define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
149
+ #define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
150
+ #define AV_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
151
+ #define AV_PROFILE_JPEG2000_DCINEMA_2K 3
152
+ #define AV_PROFILE_JPEG2000_DCINEMA_4K 4
153
+
154
+ #define AV_PROFILE_VP9_0 0
155
+ #define AV_PROFILE_VP9_1 1
156
+ #define AV_PROFILE_VP9_2 2
157
+ #define AV_PROFILE_VP9_3 3
158
+
159
+ #define AV_PROFILE_HEVC_MAIN 1
160
+ #define AV_PROFILE_HEVC_MAIN_10 2
161
+ #define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3
162
+ #define AV_PROFILE_HEVC_REXT 4
163
+ #define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6
164
+ #define AV_PROFILE_HEVC_SCC 9
165
+
166
+ #define AV_PROFILE_VVC_MAIN_10 1
167
+ #define AV_PROFILE_VVC_MAIN_10_444 33
168
+
169
+ #define AV_PROFILE_AV1_MAIN 0
170
+ #define AV_PROFILE_AV1_HIGH 1
171
+ #define AV_PROFILE_AV1_PROFESSIONAL 2
172
+
173
+ #define AV_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
174
+ #define AV_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
175
+ #define AV_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
176
+ #define AV_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
177
+ #define AV_PROFILE_MJPEG_JPEG_LS 0xf7
178
+
179
+ #define AV_PROFILE_SBC_MSBC 1
180
+
181
+ #define AV_PROFILE_PRORES_PROXY 0
182
+ #define AV_PROFILE_PRORES_LT 1
183
+ #define AV_PROFILE_PRORES_STANDARD 2
184
+ #define AV_PROFILE_PRORES_HQ 3
185
+ #define AV_PROFILE_PRORES_4444 4
186
+ #define AV_PROFILE_PRORES_XQ 5
187
+
188
+ #define AV_PROFILE_ARIB_PROFILE_A 0
189
+ #define AV_PROFILE_ARIB_PROFILE_C 1
190
+
191
+ #define AV_PROFILE_KLVA_SYNC 0
192
+ #define AV_PROFILE_KLVA_ASYNC 1
193
+
194
+ #define AV_PROFILE_EVC_BASELINE 0
195
+ #define AV_PROFILE_EVC_MAIN 1
196
+
197
+ #define AV_PROFILE_APV_422_10 33
198
+ #define AV_PROFILE_APV_422_12 44
199
+ #define AV_PROFILE_APV_444_10 55
200
+ #define AV_PROFILE_APV_444_12 66
201
+ #define AV_PROFILE_APV_4444_10 77
202
+ #define AV_PROFILE_APV_4444_12 88
203
+ #define AV_PROFILE_APV_400_10 99
204
+
205
+
206
+ #define AV_LEVEL_UNKNOWN -99
207
+
208
+ enum AVFieldOrder {
209
+ AV_FIELD_UNKNOWN,
210
+ AV_FIELD_PROGRESSIVE,
211
+ AV_FIELD_TT, ///< Top coded_first, top displayed first
212
+ AV_FIELD_BB, ///< Bottom coded first, bottom displayed first
213
+ AV_FIELD_TB, ///< Top coded first, bottom displayed first
214
+ AV_FIELD_BT, ///< Bottom coded first, top displayed first
215
+ };
216
+
217
+ /**
218
+ * @ingroup lavc_decoding
219
+ */
220
+ enum AVDiscard{
221
+ /* We leave some space between them for extensions (drop some
222
+ * keyframes for intra-only or drop just some bidir frames). */
223
+ AVDISCARD_NONE =-16, ///< discard nothing
224
+ AVDISCARD_DEFAULT = 0, ///< discard useless packets like 0 size packets in avi
225
+ AVDISCARD_NONREF = 8, ///< discard all non reference
226
+ AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames
227
+ AVDISCARD_NONINTRA= 24, ///< discard all non intra frames
228
+ AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
229
+ AVDISCARD_ALL = 48, ///< discard all
230
+ };
231
+
232
+ enum AVAudioServiceType {
233
+ AV_AUDIO_SERVICE_TYPE_MAIN = 0,
234
+ AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
235
+ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
236
+ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
237
+ AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
238
+ AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
239
+ AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
240
+ AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
241
+ AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
242
+ AV_AUDIO_SERVICE_TYPE_NB , ///< Not part of ABI
243
+ };
244
+
245
+ /**
246
+ * Pan Scan area.
247
+ * This specifies the area which should be displayed.
248
+ * Note there may be multiple such areas for one frame.
249
+ */
250
+ typedef struct AVPanScan {
251
+ /**
252
+ * id
253
+ * - encoding: Set by user.
254
+ * - decoding: Set by libavcodec.
255
+ */
256
+ int id;
257
+
258
+ /**
259
+ * width and height in 1/16 pel
260
+ * - encoding: Set by user.
261
+ * - decoding: Set by libavcodec.
262
+ */
263
+ int width;
264
+ int height;
265
+
266
+ /**
267
+ * position of the top left corner in 1/16 pel for up to 3 fields/frames
268
+ * - encoding: Set by user.
269
+ * - decoding: Set by libavcodec.
270
+ */
271
+ int16_t position[3][2];
272
+ } AVPanScan;
273
+
274
+ /**
275
+ * This structure describes the bitrate properties of an encoded bitstream. It
276
+ * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD
277
+ * parameters for H.264/HEVC.
278
+ */
279
+ typedef struct AVCPBProperties {
280
+ /**
281
+ * Maximum bitrate of the stream, in bits per second.
282
+ * Zero if unknown or unspecified.
283
+ */
284
+ int64_t max_bitrate;
285
+ /**
286
+ * Minimum bitrate of the stream, in bits per second.
287
+ * Zero if unknown or unspecified.
288
+ */
289
+ int64_t min_bitrate;
290
+ /**
291
+ * Average bitrate of the stream, in bits per second.
292
+ * Zero if unknown or unspecified.
293
+ */
294
+ int64_t avg_bitrate;
295
+
296
+ /**
297
+ * The size of the buffer to which the ratecontrol is applied, in bits.
298
+ * Zero if unknown or unspecified.
299
+ */
300
+ int64_t buffer_size;
301
+
302
+ /**
303
+ * The delay between the time the packet this structure is associated with
304
+ * is received and the time when it should be decoded, in periods of a 27MHz
305
+ * clock.
306
+ *
307
+ * UINT64_MAX when unknown or unspecified.
308
+ */
309
+ uint64_t vbv_delay;
310
+ } AVCPBProperties;
311
+
312
+ /**
313
+ * Allocate a CPB properties structure and initialize its fields to default
314
+ * values.
315
+ *
316
+ * @param size if non-NULL, the size of the allocated struct will be written
317
+ * here. This is useful for embedding it in side data.
318
+ *
319
+ * @return the newly allocated struct or NULL on failure
320
+ */
321
+ AVCPBProperties *av_cpb_properties_alloc(size_t *size);
322
+
323
+ /**
324
+ * This structure supplies correlation between a packet timestamp and a wall clock
325
+ * production time. The definition follows the Producer Reference Time ('prft')
326
+ * as defined in ISO/IEC 14496-12
327
+ */
328
+ typedef struct AVProducerReferenceTime {
329
+ /**
330
+ * A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()).
331
+ */
332
+ int64_t wallclock;
333
+ int flags;
334
+ } AVProducerReferenceTime;
335
+
336
+ /**
337
+ * RTCP SR (Sender Report) information
338
+ *
339
+ * The received sender report information for an RTSP
340
+ * stream, exposed as AV_PKT_DATA_RTCP_SR side data.
341
+ */
342
+ typedef struct AVRTCPSenderReport {
343
+ uint32_t ssrc; ///< Synchronization source identifier
344
+ uint64_t ntp_timestamp; ///< NTP time when the report was sent
345
+ uint32_t rtp_timestamp; ///< RTP time when the report was sent
346
+ uint32_t sender_nb_packets; ///< Total number of packets sent
347
+ uint32_t sender_nb_bytes; ///< Total number of bytes sent (excluding headers or padding)
348
+ } AVRTCPSenderReport;
349
+
350
+ /**
351
+ * Encode extradata length to a buffer. Used by xiph codecs.
352
+ *
353
+ * @param s buffer to write to; must be at least (v/255+1) bytes long
354
+ * @param v size of extradata in bytes
355
+ * @return number of bytes written to the buffer.
356
+ */
357
+ unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
358
+
359
+ #endif // AVCODEC_DEFS_H
@@ -0,0 +1,135 @@
1
+ /*
2
+ * Copyright (C) 2007 Marco Gerards <marco@gnu.org>
3
+ * Copyright (C) 2009 David Conrad
4
+ * Copyright (C) 2011 Jordi Ortiz
5
+ *
6
+ * This file is part of FFmpeg.
7
+ *
8
+ * FFmpeg is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU Lesser General Public
10
+ * License as published by the Free Software Foundation; either
11
+ * version 2.1 of the License, or (at your option) any later version.
12
+ *
13
+ * FFmpeg is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ * Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public
19
+ * License along with FFmpeg; if not, write to the Free Software
20
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
+ */
22
+
23
+ #ifndef AVCODEC_DIRAC_H
24
+ #define AVCODEC_DIRAC_H
25
+
26
+ /**
27
+ * @file
28
+ * Interface to Dirac Decoder/Encoder
29
+ * @author Marco Gerards <marco@gnu.org>
30
+ * @author David Conrad
31
+ * @author Jordi Ortiz
32
+ */
33
+
34
+ #include <stddef.h>
35
+ #include <stdint.h>
36
+
37
+ #include "libavutil/pixfmt.h"
38
+ #include "libavutil/rational.h"
39
+
40
+ /**
41
+ * The spec limits the number of wavelet decompositions to 4 for both
42
+ * level 1 (VC-2) and 128 (long-gop default).
43
+ * 5 decompositions is the maximum before >16-bit buffers are needed.
44
+ * Schroedinger allows this for DD 9,7 and 13,7 wavelets only, limiting
45
+ * the others to 4 decompositions (or 3 for the fidelity filter).
46
+ *
47
+ * We use this instead of MAX_DECOMPOSITIONS to save some memory.
48
+ */
49
+ #define MAX_DWT_LEVELS 5
50
+
51
+ /**
52
+ * Parse code values:
53
+ *
54
+ * Dirac Specification ->
55
+ * 9.6.1 Table 9.1
56
+ *
57
+ * VC-2 Specification ->
58
+ * 10.4.1 Table 10.1
59
+ */
60
+
61
+ enum DiracParseCodes {
62
+ DIRAC_PCODE_SEQ_HEADER = 0x00,
63
+ DIRAC_PCODE_END_SEQ = 0x10,
64
+ DIRAC_PCODE_AUX = 0x20,
65
+ DIRAC_PCODE_PAD = 0x30,
66
+ DIRAC_PCODE_PICTURE_CODED = 0x08,
67
+ DIRAC_PCODE_PICTURE_RAW = 0x48,
68
+ DIRAC_PCODE_PICTURE_LOW_DEL = 0xC8,
69
+ DIRAC_PCODE_PICTURE_HQ = 0xE8,
70
+ DIRAC_PCODE_INTER_NOREF_CO1 = 0x0A,
71
+ DIRAC_PCODE_INTER_NOREF_CO2 = 0x09,
72
+ DIRAC_PCODE_INTER_REF_CO1 = 0x0D,
73
+ DIRAC_PCODE_INTER_REF_CO2 = 0x0E,
74
+ DIRAC_PCODE_INTRA_REF_CO = 0x0C,
75
+ DIRAC_PCODE_INTRA_REF_RAW = 0x4C,
76
+ DIRAC_PCODE_INTRA_REF_PICT = 0xCC,
77
+ DIRAC_PCODE_MAGIC = 0x42424344,
78
+ };
79
+
80
+ typedef struct DiracVersionInfo {
81
+ int major;
82
+ int minor;
83
+ } DiracVersionInfo;
84
+
85
+ typedef struct AVDiracSeqHeader {
86
+ unsigned width;
87
+ unsigned height;
88
+ uint8_t chroma_format; ///< 0: 444 1: 422 2: 420
89
+
90
+ uint8_t interlaced;
91
+ uint8_t top_field_first;
92
+
93
+ uint8_t frame_rate_index; ///< index into dirac_frame_rate[]
94
+ uint8_t aspect_ratio_index; ///< index into dirac_aspect_ratio[]
95
+
96
+ uint16_t clean_width;
97
+ uint16_t clean_height;
98
+ uint16_t clean_left_offset;
99
+ uint16_t clean_right_offset;
100
+
101
+ uint8_t pixel_range_index; ///< index into dirac_pixel_range_presets[]
102
+ uint8_t color_spec_index; ///< index into dirac_color_spec_presets[]
103
+
104
+ int profile;
105
+ int level;
106
+
107
+ AVRational framerate;
108
+ AVRational sample_aspect_ratio;
109
+
110
+ enum AVPixelFormat pix_fmt;
111
+ enum AVColorRange color_range;
112
+ enum AVColorPrimaries color_primaries;
113
+ enum AVColorTransferCharacteristic color_trc;
114
+ enum AVColorSpace colorspace;
115
+
116
+ DiracVersionInfo version;
117
+ int bit_depth;
118
+ } AVDiracSeqHeader;
119
+
120
+ /**
121
+ * Parse a Dirac sequence header.
122
+ *
123
+ * @param dsh this function will allocate and fill an AVDiracSeqHeader struct
124
+ * and write it into this pointer. The caller must free it with
125
+ * av_free().
126
+ * @param buf the data buffer
127
+ * @param buf_size the size of the data buffer in bytes
128
+ * @param log_ctx if non-NULL, this function will log errors here
129
+ * @return 0 on success, a negative AVERROR code on failure
130
+ */
131
+ int av_dirac_parse_sequence_header(AVDiracSeqHeader **dsh,
132
+ const uint8_t *buf, size_t buf_size,
133
+ void *log_ctx);
134
+
135
+ #endif /* AVCODEC_DIRAC_H */
@@ -0,0 +1,82 @@
1
+ /*
2
+ * This file is part of FFmpeg.
3
+ *
4
+ * FFmpeg is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU Lesser General Public
6
+ * License as published by the Free Software Foundation; either
7
+ * version 2.1 of the License, or (at your option) any later version.
8
+ *
9
+ * FFmpeg is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ * Lesser General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Lesser General Public
15
+ * License along with FFmpeg; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
+ */
18
+
19
+ #ifndef AVCODEC_DV_PROFILE_H
20
+ #define AVCODEC_DV_PROFILE_H
21
+
22
+ #include <stdint.h>
23
+
24
+ #include "libavutil/pixfmt.h"
25
+ #include "libavutil/rational.h"
26
+
27
+ /* minimum number of bytes to read from a DV stream in order to
28
+ * determine the profile */
29
+ #define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */
30
+
31
+
32
+ /*
33
+ * AVDVProfile is used to express the differences between various
34
+ * DV flavors. For now it's primarily used for differentiating
35
+ * 525/60 and 625/50, but the plans are to use it for various
36
+ * DV specs as well (e.g. SMPTE314M vs. IEC 61834).
37
+ */
38
+ typedef struct AVDVProfile {
39
+ int dsf; /* value of the dsf in the DV header */
40
+ int video_stype; /* stype for VAUX source pack */
41
+ int frame_size; /* total size of one frame in bytes */
42
+ int difseg_size; /* number of DIF segments per DIF channel */
43
+ int n_difchan; /* number of DIF channels per frame */
44
+ AVRational time_base; /* 1/framerate */
45
+ int ltc_divisor; /* FPS from the LTS standpoint */
46
+ int height; /* picture height in pixels */
47
+ int width; /* picture width in pixels */
48
+ AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */
49
+ enum AVPixelFormat pix_fmt; /* picture pixel format */
50
+ int bpm; /* blocks per macroblock */
51
+ const uint8_t *block_sizes; /* AC block sizes, in bits */
52
+ int audio_stride; /* size of audio_shuffle table */
53
+ int audio_min_samples[3]; /* min amount of audio samples */
54
+ /* for 48kHz, 44.1kHz and 32kHz */
55
+ int audio_samples_dist[5]; /* how many samples are supposed to be */
56
+ /* in each frame in a 5 frames window */
57
+ const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */
58
+ } AVDVProfile;
59
+
60
+ /**
61
+ * Get a DV profile for the provided compressed frame.
62
+ *
63
+ * @param sys the profile used for the previous frame, may be NULL
64
+ * @param frame the compressed data buffer
65
+ * @param buf_size size of the buffer in bytes
66
+ * @return the DV profile for the supplied data or NULL on failure
67
+ */
68
+ const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys,
69
+ const uint8_t *frame, unsigned buf_size);
70
+
71
+ /**
72
+ * Get a DV profile for the provided stream parameters.
73
+ */
74
+ const AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt);
75
+
76
+ /**
77
+ * Get a DV profile for the provided stream parameters.
78
+ * The frame rate is used as a best-effort parameter.
79
+ */
80
+ const AVDVProfile *av_dv_codec_profile2(int width, int height, enum AVPixelFormat pix_fmt, AVRational frame_rate);
81
+
82
+ #endif /* AVCODEC_DV_PROFILE_H */
@@ -0,0 +1,90 @@
1
+ /*
2
+ * DXVA2 HW acceleration
3
+ *
4
+ * copyright (c) 2009 Laurent Aimar
5
+ *
6
+ * This file is part of FFmpeg.
7
+ *
8
+ * FFmpeg is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU Lesser General Public
10
+ * License as published by the Free Software Foundation; either
11
+ * version 2.1 of the License, or (at your option) any later version.
12
+ *
13
+ * FFmpeg is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ * Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public
19
+ * License along with FFmpeg; if not, write to the Free Software
20
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
+ */
22
+
23
+ #ifndef AVCODEC_DXVA2_H
24
+ #define AVCODEC_DXVA2_H
25
+
26
+ /**
27
+ * @file
28
+ * @ingroup lavc_codec_hwaccel_dxva2
29
+ * Public libavcodec DXVA2 header.
30
+ */
31
+
32
+ #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
33
+ #undef _WIN32_WINNT
34
+ #define _WIN32_WINNT 0x0602
35
+ #endif
36
+
37
+ #include <stdint.h>
38
+ #include <d3d9.h>
39
+ #include <dxva2api.h>
40
+
41
+ /**
42
+ * @defgroup lavc_codec_hwaccel_dxva2 DXVA2
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 DXVA2 FFmpeg HWAccel implementation.
51
+ *
52
+ * The application must make it available as AVCodecContext.hwaccel_context.
53
+ */
54
+ struct dxva_context {
55
+ /**
56
+ * DXVA2 decoder object
57
+ */
58
+ IDirectXVideoDecoder *decoder;
59
+
60
+ /**
61
+ * DXVA2 configuration used to create the decoder
62
+ */
63
+ const DXVA2_ConfigPictureDecode *cfg;
64
+
65
+ /**
66
+ * The number of surface in the surface array
67
+ */
68
+ unsigned surface_count;
69
+
70
+ /**
71
+ * The array of Direct3D surfaces used to create the decoder
72
+ */
73
+ LPDIRECT3DSURFACE9 *surface;
74
+
75
+ /**
76
+ * A bit field configuring the workarounds needed for using the decoder
77
+ */
78
+ uint64_t workaround;
79
+
80
+ /**
81
+ * Private to the FFmpeg AVHWAccel implementation
82
+ */
83
+ unsigned report_id;
84
+ };
85
+
86
+ /**
87
+ * @}
88
+ */
89
+
90
+ #endif /* AVCODEC_DXVA2_H */