@pproenca/ffmpeg-darwin-x64-gpl 0.1.7

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 (215) hide show
  1. package/include/aom/aom.h +127 -0
  2. package/include/aom/aom_codec.h +594 -0
  3. package/include/aom/aom_decoder.h +257 -0
  4. package/include/aom/aom_encoder.h +1154 -0
  5. package/include/aom/aom_external_partition.h +452 -0
  6. package/include/aom/aom_frame_buffer.h +84 -0
  7. package/include/aom/aom_image.h +462 -0
  8. package/include/aom/aom_integer.h +60 -0
  9. package/include/aom/aomcx.h +2288 -0
  10. package/include/aom/aomdx.h +607 -0
  11. package/include/dav1d/common.h +94 -0
  12. package/include/dav1d/data.h +117 -0
  13. package/include/dav1d/dav1d.h +329 -0
  14. package/include/dav1d/headers.h +444 -0
  15. package/include/dav1d/picture.h +157 -0
  16. package/include/dav1d/version.h +50 -0
  17. package/include/index.js +1 -0
  18. package/include/lame/lame.h +1342 -0
  19. package/include/libavcodec/ac3_parser.h +36 -0
  20. package/include/libavcodec/adts_parser.h +37 -0
  21. package/include/libavcodec/avcodec.h +3128 -0
  22. package/include/libavcodec/avdct.h +88 -0
  23. package/include/libavcodec/avfft.h +149 -0
  24. package/include/libavcodec/bsf.h +332 -0
  25. package/include/libavcodec/codec.h +382 -0
  26. package/include/libavcodec/codec_desc.h +134 -0
  27. package/include/libavcodec/codec_id.h +669 -0
  28. package/include/libavcodec/codec_par.h +248 -0
  29. package/include/libavcodec/d3d11va.h +109 -0
  30. package/include/libavcodec/defs.h +337 -0
  31. package/include/libavcodec/dirac.h +135 -0
  32. package/include/libavcodec/dv_profile.h +82 -0
  33. package/include/libavcodec/dxva2.h +90 -0
  34. package/include/libavcodec/jni.h +67 -0
  35. package/include/libavcodec/mediacodec.h +103 -0
  36. package/include/libavcodec/packet.h +887 -0
  37. package/include/libavcodec/qsv.h +109 -0
  38. package/include/libavcodec/vdpau.h +171 -0
  39. package/include/libavcodec/version.h +45 -0
  40. package/include/libavcodec/version_major.h +52 -0
  41. package/include/libavcodec/videotoolbox.h +85 -0
  42. package/include/libavcodec/vorbis_parser.h +74 -0
  43. package/include/libavdevice/avdevice.h +397 -0
  44. package/include/libavdevice/version.h +45 -0
  45. package/include/libavdevice/version_major.h +43 -0
  46. package/include/libavfilter/avfilter.h +1379 -0
  47. package/include/libavfilter/buffersink.h +173 -0
  48. package/include/libavfilter/buffersrc.h +215 -0
  49. package/include/libavfilter/version.h +48 -0
  50. package/include/libavfilter/version_major.h +40 -0
  51. package/include/libavformat/avformat.h +3107 -0
  52. package/include/libavformat/avio.h +831 -0
  53. package/include/libavformat/version.h +47 -0
  54. package/include/libavformat/version_major.h +54 -0
  55. package/include/libavutil/adler32.h +63 -0
  56. package/include/libavutil/aes.h +69 -0
  57. package/include/libavutil/aes_ctr.h +99 -0
  58. package/include/libavutil/ambient_viewing_environment.h +72 -0
  59. package/include/libavutil/attributes.h +173 -0
  60. package/include/libavutil/audio_fifo.h +187 -0
  61. package/include/libavutil/avassert.h +78 -0
  62. package/include/libavutil/avconfig.h +6 -0
  63. package/include/libavutil/avstring.h +428 -0
  64. package/include/libavutil/avutil.h +362 -0
  65. package/include/libavutil/base64.h +72 -0
  66. package/include/libavutil/blowfish.h +82 -0
  67. package/include/libavutil/bprint.h +254 -0
  68. package/include/libavutil/bswap.h +105 -0
  69. package/include/libavutil/buffer.h +322 -0
  70. package/include/libavutil/camellia.h +70 -0
  71. package/include/libavutil/cast5.h +80 -0
  72. package/include/libavutil/channel_layout.h +751 -0
  73. package/include/libavutil/common.h +589 -0
  74. package/include/libavutil/cpu.h +145 -0
  75. package/include/libavutil/crc.h +102 -0
  76. package/include/libavutil/csp.h +150 -0
  77. package/include/libavutil/des.h +81 -0
  78. package/include/libavutil/detection_bbox.h +108 -0
  79. package/include/libavutil/dict.h +241 -0
  80. package/include/libavutil/display.h +109 -0
  81. package/include/libavutil/dovi_meta.h +396 -0
  82. package/include/libavutil/downmix_info.h +115 -0
  83. package/include/libavutil/encryption_info.h +205 -0
  84. package/include/libavutil/error.h +129 -0
  85. package/include/libavutil/eval.h +140 -0
  86. package/include/libavutil/executor.h +67 -0
  87. package/include/libavutil/ffversion.h +5 -0
  88. package/include/libavutil/fifo.h +242 -0
  89. package/include/libavutil/file.h +62 -0
  90. package/include/libavutil/film_grain_params.h +322 -0
  91. package/include/libavutil/frame.h +1175 -0
  92. package/include/libavutil/hash.h +264 -0
  93. package/include/libavutil/hdr_dynamic_metadata.h +376 -0
  94. package/include/libavutil/hdr_dynamic_vivid_metadata.h +346 -0
  95. package/include/libavutil/hmac.h +99 -0
  96. package/include/libavutil/hwcontext.h +598 -0
  97. package/include/libavutil/hwcontext_cuda.h +74 -0
  98. package/include/libavutil/hwcontext_d3d11va.h +178 -0
  99. package/include/libavutil/hwcontext_d3d12va.h +142 -0
  100. package/include/libavutil/hwcontext_drm.h +169 -0
  101. package/include/libavutil/hwcontext_dxva2.h +75 -0
  102. package/include/libavutil/hwcontext_mediacodec.h +61 -0
  103. package/include/libavutil/hwcontext_opencl.h +100 -0
  104. package/include/libavutil/hwcontext_qsv.h +87 -0
  105. package/include/libavutil/hwcontext_vaapi.h +117 -0
  106. package/include/libavutil/hwcontext_vdpau.h +44 -0
  107. package/include/libavutil/hwcontext_videotoolbox.h +106 -0
  108. package/include/libavutil/hwcontext_vulkan.h +382 -0
  109. package/include/libavutil/iamf.h +690 -0
  110. package/include/libavutil/imgutils.h +377 -0
  111. package/include/libavutil/intfloat.h +77 -0
  112. package/include/libavutil/intreadwrite.h +677 -0
  113. package/include/libavutil/lfg.h +81 -0
  114. package/include/libavutil/log.h +387 -0
  115. package/include/libavutil/lzo.h +66 -0
  116. package/include/libavutil/macros.h +80 -0
  117. package/include/libavutil/mastering_display_metadata.h +137 -0
  118. package/include/libavutil/mathematics.h +300 -0
  119. package/include/libavutil/md5.h +89 -0
  120. package/include/libavutil/mem.h +607 -0
  121. package/include/libavutil/motion_vector.h +57 -0
  122. package/include/libavutil/murmur3.h +115 -0
  123. package/include/libavutil/opt.h +1187 -0
  124. package/include/libavutil/parseutils.h +197 -0
  125. package/include/libavutil/pixdesc.h +440 -0
  126. package/include/libavutil/pixelutils.h +51 -0
  127. package/include/libavutil/pixfmt.h +716 -0
  128. package/include/libavutil/random_seed.h +57 -0
  129. package/include/libavutil/rational.h +225 -0
  130. package/include/libavutil/rc4.h +69 -0
  131. package/include/libavutil/replaygain.h +50 -0
  132. package/include/libavutil/ripemd.h +83 -0
  133. package/include/libavutil/samplefmt.h +269 -0
  134. package/include/libavutil/sha.h +90 -0
  135. package/include/libavutil/sha512.h +92 -0
  136. package/include/libavutil/spherical.h +243 -0
  137. package/include/libavutil/stereo3d.h +325 -0
  138. package/include/libavutil/tea.h +71 -0
  139. package/include/libavutil/threadmessage.h +115 -0
  140. package/include/libavutil/time.h +56 -0
  141. package/include/libavutil/timecode.h +199 -0
  142. package/include/libavutil/timestamp.h +85 -0
  143. package/include/libavutil/tree.h +137 -0
  144. package/include/libavutil/twofish.h +70 -0
  145. package/include/libavutil/tx.h +210 -0
  146. package/include/libavutil/uuid.h +146 -0
  147. package/include/libavutil/version.h +124 -0
  148. package/include/libavutil/video_enc_params.h +171 -0
  149. package/include/libavutil/video_hint.h +107 -0
  150. package/include/libavutil/xtea.h +94 -0
  151. package/include/libpostproc/postprocess.h +107 -0
  152. package/include/libpostproc/version.h +46 -0
  153. package/include/libpostproc/version_major.h +31 -0
  154. package/include/libswresample/swresample.h +587 -0
  155. package/include/libswresample/version.h +46 -0
  156. package/include/libswresample/version_major.h +31 -0
  157. package/include/libswscale/swscale.h +460 -0
  158. package/include/libswscale/version.h +44 -0
  159. package/include/libswscale/version_major.h +35 -0
  160. package/include/ogg/config_types.h +26 -0
  161. package/include/ogg/ogg.h +209 -0
  162. package/include/ogg/os_types.h +158 -0
  163. package/include/opus/opus.h +1099 -0
  164. package/include/opus/opus_defines.h +830 -0
  165. package/include/opus/opus_multistream.h +660 -0
  166. package/include/opus/opus_projection.h +568 -0
  167. package/include/opus/opus_types.h +166 -0
  168. package/include/svt-av1/EbDebugMacros.h +88 -0
  169. package/include/svt-av1/EbSvtAv1.h +462 -0
  170. package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
  171. package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
  172. package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
  173. package/include/svt-av1/EbSvtAv1Formats.h +126 -0
  174. package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
  175. package/include/vorbis/codec.h +242 -0
  176. package/include/vorbis/vorbisenc.h +435 -0
  177. package/include/vorbis/vorbisfile.h +205 -0
  178. package/include/vpx/vp8.h +136 -0
  179. package/include/vpx/vp8cx.h +1118 -0
  180. package/include/vpx/vp8dx.h +228 -0
  181. package/include/vpx/vpx_codec.h +475 -0
  182. package/include/vpx/vpx_decoder.h +367 -0
  183. package/include/vpx/vpx_encoder.h +1150 -0
  184. package/include/vpx/vpx_ext_ratectrl.h +590 -0
  185. package/include/vpx/vpx_frame_buffer.h +83 -0
  186. package/include/vpx/vpx_image.h +221 -0
  187. package/include/vpx/vpx_integer.h +40 -0
  188. package/include/vpx/vpx_tpl.h +68 -0
  189. package/include/x264.h +1027 -0
  190. package/include/x264_config.h +6 -0
  191. package/include/x265.h +2737 -0
  192. package/include/x265_config.h +34 -0
  193. package/lib/index.js +1 -0
  194. package/lib/libSvtAv1Enc.a +0 -0
  195. package/lib/libaom.a +0 -0
  196. package/lib/libavcodec.a +0 -0
  197. package/lib/libavdevice.a +0 -0
  198. package/lib/libavfilter.a +0 -0
  199. package/lib/libavformat.a +0 -0
  200. package/lib/libavutil.a +0 -0
  201. package/lib/libdav1d.a +0 -0
  202. package/lib/libmp3lame.a +0 -0
  203. package/lib/libogg.a +0 -0
  204. package/lib/libopus.a +0 -0
  205. package/lib/libpostproc.a +0 -0
  206. package/lib/libswresample.a +0 -0
  207. package/lib/libswscale.a +0 -0
  208. package/lib/libvorbis.a +0 -0
  209. package/lib/libvorbisenc.a +0 -0
  210. package/lib/libvorbisfile.a +0 -0
  211. package/lib/libvpx.a +0 -0
  212. package/lib/libx264.a +0 -0
  213. package/lib/libx265.a +0 -0
  214. package/package.json +35 -0
  215. package/versions.json +1 -0
@@ -0,0 +1,362 @@
1
+ /*
2
+ * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
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 AVUTIL_AVUTIL_H
22
+ #define AVUTIL_AVUTIL_H
23
+
24
+ /**
25
+ * @file
26
+ * @ingroup lavu
27
+ * Convenience header that includes @ref lavu "libavutil"'s core.
28
+ */
29
+
30
+ /**
31
+ * @mainpage
32
+ *
33
+ * @section ffmpeg_intro Introduction
34
+ *
35
+ * This document describes the usage of the different libraries
36
+ * provided by FFmpeg.
37
+ *
38
+ * @li @ref libavc "libavcodec" encoding/decoding library
39
+ * @li @ref lavfi "libavfilter" graph-based frame editing library
40
+ * @li @ref libavf "libavformat" I/O and muxing/demuxing library
41
+ * @li @ref lavd "libavdevice" special devices muxing/demuxing library
42
+ * @li @ref lavu "libavutil" common utility library
43
+ * @li @ref lswr "libswresample" audio resampling, format conversion and mixing
44
+ * @li @ref lpp "libpostproc" post processing library
45
+ * @li @ref libsws "libswscale" color conversion and scaling library
46
+ *
47
+ * @section ffmpeg_versioning Versioning and compatibility
48
+ *
49
+ * Each of the FFmpeg libraries contains a version.h header, which defines a
50
+ * major, minor and micro version number with the
51
+ * <em>LIBRARYNAME_VERSION_{MAJOR,MINOR,MICRO}</em> macros. The major version
52
+ * number is incremented with backward incompatible changes - e.g. removing
53
+ * parts of the public API, reordering public struct members, etc. The minor
54
+ * version number is incremented for backward compatible API changes or major
55
+ * new features - e.g. adding a new public function or a new decoder. The micro
56
+ * version number is incremented for smaller changes that a calling program
57
+ * might still want to check for - e.g. changing behavior in a previously
58
+ * unspecified situation.
59
+ *
60
+ * FFmpeg guarantees backward API and ABI compatibility for each library as long
61
+ * as its major version number is unchanged. This means that no public symbols
62
+ * will be removed or renamed. Types and names of the public struct members and
63
+ * values of public macros and enums will remain the same (unless they were
64
+ * explicitly declared as not part of the public API). Documented behavior will
65
+ * not change.
66
+ *
67
+ * In other words, any correct program that works with a given FFmpeg snapshot
68
+ * should work just as well without any changes with any later snapshot with the
69
+ * same major versions. This applies to both rebuilding the program against new
70
+ * FFmpeg versions or to replacing the dynamic FFmpeg libraries that a program
71
+ * links against.
72
+ *
73
+ * However, new public symbols may be added and new members may be appended to
74
+ * public structs whose size is not part of public ABI (most public structs in
75
+ * FFmpeg). New macros and enum values may be added. Behavior in undocumented
76
+ * situations may change slightly (and be documented). All those are accompanied
77
+ * by an entry in doc/APIchanges and incrementing either the minor or micro
78
+ * version number.
79
+ */
80
+
81
+ /**
82
+ * @defgroup lavu libavutil
83
+ * Common code shared across all FFmpeg libraries.
84
+ *
85
+ * @note
86
+ * libavutil is designed to be modular. In most cases, in order to use the
87
+ * functions provided by one component of libavutil you must explicitly include
88
+ * the specific header containing that feature. If you are only using
89
+ * media-related components, you could simply include libavutil/avutil.h, which
90
+ * brings in most of the "core" components.
91
+ *
92
+ * @{
93
+ *
94
+ * @defgroup lavu_crypto Crypto and Hashing
95
+ *
96
+ * @{
97
+ * @}
98
+ *
99
+ * @defgroup lavu_math Mathematics
100
+ * @{
101
+ *
102
+ * @}
103
+ *
104
+ * @defgroup lavu_string String Manipulation
105
+ *
106
+ * @{
107
+ *
108
+ * @}
109
+ *
110
+ * @defgroup lavu_mem Memory Management
111
+ *
112
+ * @{
113
+ *
114
+ * @}
115
+ *
116
+ * @defgroup lavu_data Data Structures
117
+ * @{
118
+ *
119
+ * @}
120
+ *
121
+ * @defgroup lavu_video Video related
122
+ *
123
+ * @{
124
+ *
125
+ * @}
126
+ *
127
+ * @defgroup lavu_audio Audio related
128
+ *
129
+ * @{
130
+ *
131
+ * @}
132
+ *
133
+ * @defgroup lavu_error Error Codes
134
+ *
135
+ * @{
136
+ *
137
+ * @}
138
+ *
139
+ * @defgroup lavu_log Logging Facility
140
+ *
141
+ * @{
142
+ *
143
+ * @}
144
+ *
145
+ * @defgroup lavu_misc Other
146
+ *
147
+ * @{
148
+ *
149
+ * @defgroup preproc_misc Preprocessor String Macros
150
+ *
151
+ * @{
152
+ *
153
+ * @}
154
+ *
155
+ * @defgroup version_utils Library Version Macros
156
+ *
157
+ * @{
158
+ *
159
+ * @}
160
+ */
161
+
162
+
163
+ /**
164
+ * @addtogroup lavu_ver
165
+ * @{
166
+ */
167
+
168
+ /**
169
+ * Return the LIBAVUTIL_VERSION_INT constant.
170
+ */
171
+ unsigned avutil_version(void);
172
+
173
+ /**
174
+ * Return an informative version string. This usually is the actual release
175
+ * version number or a git commit description. This string has no fixed format
176
+ * and can change any time. It should never be parsed by code.
177
+ */
178
+ const char *av_version_info(void);
179
+
180
+ /**
181
+ * Return the libavutil build-time configuration.
182
+ */
183
+ const char *avutil_configuration(void);
184
+
185
+ /**
186
+ * Return the libavutil license.
187
+ */
188
+ const char *avutil_license(void);
189
+
190
+ /**
191
+ * @}
192
+ */
193
+
194
+ /**
195
+ * @addtogroup lavu_media Media Type
196
+ * @brief Media Type
197
+ */
198
+
199
+ enum AVMediaType {
200
+ AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA
201
+ AVMEDIA_TYPE_VIDEO,
202
+ AVMEDIA_TYPE_AUDIO,
203
+ AVMEDIA_TYPE_DATA, ///< Opaque data information usually continuous
204
+ AVMEDIA_TYPE_SUBTITLE,
205
+ AVMEDIA_TYPE_ATTACHMENT, ///< Opaque data information usually sparse
206
+ AVMEDIA_TYPE_NB
207
+ };
208
+
209
+ /**
210
+ * Return a string describing the media_type enum, NULL if media_type
211
+ * is unknown.
212
+ */
213
+ const char *av_get_media_type_string(enum AVMediaType media_type);
214
+
215
+ /**
216
+ * @defgroup lavu_const Constants
217
+ * @{
218
+ *
219
+ * @defgroup lavu_enc Encoding specific
220
+ *
221
+ * @note those definition should move to avcodec
222
+ * @{
223
+ */
224
+
225
+ #define FF_LAMBDA_SHIFT 7
226
+ #define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)
227
+ #define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda
228
+ #define FF_LAMBDA_MAX (256*128-1)
229
+
230
+ #define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove
231
+
232
+ /**
233
+ * @}
234
+ * @defgroup lavu_time Timestamp specific
235
+ *
236
+ * FFmpeg internal timebase and timestamp definitions
237
+ *
238
+ * @{
239
+ */
240
+
241
+ /**
242
+ * @brief Undefined timestamp value
243
+ *
244
+ * Usually reported by demuxer that work on containers that do not provide
245
+ * either pts or dts.
246
+ */
247
+
248
+ #define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))
249
+
250
+ /**
251
+ * Internal time base represented as integer
252
+ */
253
+
254
+ #define AV_TIME_BASE 1000000
255
+
256
+ /**
257
+ * Internal time base represented as fractional value
258
+ */
259
+
260
+ #ifdef __cplusplus
261
+ /* ISO C++ forbids compound-literals. */
262
+ #define AV_TIME_BASE_Q av_make_q(1, AV_TIME_BASE)
263
+ #else
264
+ #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
265
+ #endif
266
+
267
+ /**
268
+ * @}
269
+ * @}
270
+ * @defgroup lavu_picture Image related
271
+ *
272
+ * AVPicture types, pixel formats and basic image planes manipulation.
273
+ *
274
+ * @{
275
+ */
276
+
277
+ enum AVPictureType {
278
+ AV_PICTURE_TYPE_NONE = 0, ///< Undefined
279
+ AV_PICTURE_TYPE_I, ///< Intra
280
+ AV_PICTURE_TYPE_P, ///< Predicted
281
+ AV_PICTURE_TYPE_B, ///< Bi-dir predicted
282
+ AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG-4
283
+ AV_PICTURE_TYPE_SI, ///< Switching Intra
284
+ AV_PICTURE_TYPE_SP, ///< Switching Predicted
285
+ AV_PICTURE_TYPE_BI, ///< BI type
286
+ };
287
+
288
+ /**
289
+ * Return a single letter to describe the given picture type
290
+ * pict_type.
291
+ *
292
+ * @param[in] pict_type the picture type @return a single character
293
+ * representing the picture type, '?' if pict_type is unknown
294
+ */
295
+ char av_get_picture_type_char(enum AVPictureType pict_type);
296
+
297
+ /**
298
+ * @}
299
+ */
300
+
301
+ #include "common.h"
302
+ #include "rational.h"
303
+ #include "version.h"
304
+ #include "macros.h"
305
+ #include "mathematics.h"
306
+ #include "log.h"
307
+ #include "pixfmt.h"
308
+
309
+ /**
310
+ * Return x default pointer in case p is NULL.
311
+ */
312
+ static inline void *av_x_if_null(const void *p, const void *x)
313
+ {
314
+ return (void *)(intptr_t)(p ? p : x);
315
+ }
316
+
317
+ /**
318
+ * Compute the length of an integer list.
319
+ *
320
+ * @param elsize size in bytes of each list element (only 1, 2, 4 or 8)
321
+ * @param term list terminator (usually 0 or -1)
322
+ * @param list pointer to the list
323
+ * @return length of the list, in elements, not counting the terminator
324
+ */
325
+ unsigned av_int_list_length_for_size(unsigned elsize,
326
+ const void *list, uint64_t term) av_pure;
327
+
328
+ /**
329
+ * Compute the length of an integer list.
330
+ *
331
+ * @param term list terminator (usually 0 or -1)
332
+ * @param list pointer to the list
333
+ * @return length of the list, in elements, not counting the terminator
334
+ */
335
+ #define av_int_list_length(list, term) \
336
+ av_int_list_length_for_size(sizeof(*(list)), list, term)
337
+
338
+ /**
339
+ * Return the fractional representation of the internal time base.
340
+ */
341
+ AVRational av_get_time_base_q(void);
342
+
343
+ #define AV_FOURCC_MAX_STRING_SIZE 32
344
+
345
+ #define av_fourcc2str(fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc)
346
+
347
+ /**
348
+ * Fill the provided buffer with a string containing a FourCC (four-character
349
+ * code) representation.
350
+ *
351
+ * @param buf a buffer with size in bytes of at least AV_FOURCC_MAX_STRING_SIZE
352
+ * @param fourcc the fourcc to represent
353
+ * @return the buffer in input
354
+ */
355
+ char *av_fourcc_make_string(char *buf, uint32_t fourcc);
356
+
357
+ /**
358
+ * @}
359
+ * @}
360
+ */
361
+
362
+ #endif /* AVUTIL_AVUTIL_H */
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com)
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 AVUTIL_BASE64_H
22
+ #define AVUTIL_BASE64_H
23
+
24
+ #include <stdint.h>
25
+
26
+ /**
27
+ * @defgroup lavu_base64 Base64
28
+ * @ingroup lavu_crypto
29
+ * @{
30
+ */
31
+
32
+ /**
33
+ * Decode a base64-encoded string.
34
+ *
35
+ * @param out buffer for decoded data
36
+ * @param in null-terminated input string
37
+ * @param out_size size in bytes of the out buffer, must be at
38
+ * least 3/4 of the length of in, that is AV_BASE64_DECODE_SIZE(strlen(in))
39
+ * @return number of bytes written, or a negative value in case of
40
+ * invalid input
41
+ */
42
+ int av_base64_decode(uint8_t *out, const char *in, int out_size);
43
+
44
+ /**
45
+ * Calculate the output size in bytes needed to decode a base64 string
46
+ * with length x to a data buffer.
47
+ */
48
+ #define AV_BASE64_DECODE_SIZE(x) ((x) * 3LL / 4)
49
+
50
+ /**
51
+ * Encode data to base64 and null-terminate.
52
+ *
53
+ * @param out buffer for encoded data
54
+ * @param out_size size in bytes of the out buffer (including the
55
+ * null terminator), must be at least AV_BASE64_SIZE(in_size)
56
+ * @param in input buffer containing the data to encode
57
+ * @param in_size size in bytes of the in buffer
58
+ * @return out or NULL in case of error
59
+ */
60
+ char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
61
+
62
+ /**
63
+ * Calculate the output size needed to base64-encode x bytes to a
64
+ * null-terminated string.
65
+ */
66
+ #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1)
67
+
68
+ /**
69
+ * @}
70
+ */
71
+
72
+ #endif /* AVUTIL_BASE64_H */
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Blowfish algorithm
3
+ * Copyright (c) 2012 Samuel Pitoiset
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 AVUTIL_BLOWFISH_H
23
+ #define AVUTIL_BLOWFISH_H
24
+
25
+ #include <stdint.h>
26
+
27
+ /**
28
+ * @defgroup lavu_blowfish Blowfish
29
+ * @ingroup lavu_crypto
30
+ * @{
31
+ */
32
+
33
+ #define AV_BF_ROUNDS 16
34
+
35
+ typedef struct AVBlowfish {
36
+ uint32_t p[AV_BF_ROUNDS + 2];
37
+ uint32_t s[4][256];
38
+ } AVBlowfish;
39
+
40
+ /**
41
+ * Allocate an AVBlowfish context.
42
+ */
43
+ AVBlowfish *av_blowfish_alloc(void);
44
+
45
+ /**
46
+ * Initialize an AVBlowfish context.
47
+ *
48
+ * @param ctx an AVBlowfish context
49
+ * @param key a key
50
+ * @param key_len length of the key
51
+ */
52
+ void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
53
+
54
+ /**
55
+ * Encrypt or decrypt a buffer using a previously initialized context.
56
+ *
57
+ * @param ctx an AVBlowfish context
58
+ * @param xl left four bytes halves of input to be encrypted
59
+ * @param xr right four bytes halves of input to be encrypted
60
+ * @param decrypt 0 for encryption, 1 for decryption
61
+ */
62
+ void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
63
+ int decrypt);
64
+
65
+ /**
66
+ * Encrypt or decrypt a buffer using a previously initialized context.
67
+ *
68
+ * @param ctx an AVBlowfish context
69
+ * @param dst destination array, can be equal to src
70
+ * @param src source array, can be equal to dst
71
+ * @param count number of 8 byte blocks
72
+ * @param iv initialization vector for CBC mode, if NULL ECB will be used
73
+ * @param decrypt 0 for encryption, 1 for decryption
74
+ */
75
+ void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
76
+ int count, uint8_t *iv, int decrypt);
77
+
78
+ /**
79
+ * @}
80
+ */
81
+
82
+ #endif /* AVUTIL_BLOWFISH_H */