@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,367 @@
1
+ /*
2
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+ #ifndef VPX_VPX_VPX_DECODER_H_
11
+ #define VPX_VPX_VPX_DECODER_H_
12
+
13
+ /*!\defgroup decoder Decoder Algorithm Interface
14
+ * \ingroup codec
15
+ * This abstraction allows applications using this decoder to easily support
16
+ * multiple video formats with minimal code duplication. This section describes
17
+ * the interface common to all decoders.
18
+ * @{
19
+ */
20
+
21
+ /*!\file
22
+ * \brief Describes the decoder algorithm interface to applications.
23
+ *
24
+ * This file describes the interface between an application and a
25
+ * video decoder algorithm.
26
+ *
27
+ */
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ #include "./vpx_codec.h" // IWYU pragma: export
33
+ #include "./vpx_frame_buffer.h"
34
+
35
+ /*!\brief Current ABI version number
36
+ *
37
+ * \internal
38
+ * If this file is altered in any way that changes the ABI, this value
39
+ * must be bumped. Examples include, but are not limited to, changing
40
+ * types, removing or reassigning enums, adding/removing/rearranging
41
+ * fields to structures
42
+ */
43
+ #define VPX_DECODER_ABI_VERSION \
44
+ (3 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
45
+
46
+ /*! \brief Decoder capabilities bitfield
47
+ *
48
+ * Each decoder advertises the capabilities it supports as part of its
49
+ * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
50
+ * or functionality, and are not required to be supported by a decoder.
51
+ *
52
+ * The available flags are specified by VPX_CODEC_CAP_* defines.
53
+ */
54
+ #define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
55
+ #define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
56
+ #define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
57
+ /*!\brief Can conceal errors due to packet loss */
58
+ #define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000
59
+ /*!\brief Can receive encoded frames one fragment at a time */
60
+ #define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000
61
+ /*!\brief Can support frame-based multi-threading */
62
+ #define VPX_CODEC_CAP_FRAME_THREADING 0x200000
63
+ /*!brief Can support external frame buffers */
64
+ #define VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000
65
+
66
+ /*! \brief Initialization-time Feature Enabling
67
+ *
68
+ * Certain codec features must be known at initialization time, to allow for
69
+ * proper memory allocation.
70
+ *
71
+ * The available flags are specified by VPX_CODEC_USE_* defines.
72
+ */
73
+ #define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
74
+ /*!\brief Conceal errors in decoded frames */
75
+ #define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000
76
+ /*!\brief The input frame should be passed to the decoder one fragment at a
77
+ * time */
78
+ #define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000
79
+ /*!\brief Enable frame-based multi-threading */
80
+ #define VPX_CODEC_USE_FRAME_THREADING 0x80000
81
+
82
+ /*!\brief Stream properties
83
+ *
84
+ * This structure is used to query or set properties of the decoded
85
+ * stream. Algorithms may extend this structure with data specific
86
+ * to their bitstream by setting the sz member appropriately.
87
+ */
88
+ typedef struct vpx_codec_stream_info {
89
+ unsigned int sz; /**< Size of this structure */
90
+ unsigned int w; /**< Width (or 0 for unknown/default) */
91
+ unsigned int h; /**< Height (or 0 for unknown/default) */
92
+ unsigned int is_kf; /**< Current frame is a keyframe */
93
+ } vpx_codec_stream_info_t;
94
+
95
+ /* REQUIRED FUNCTIONS
96
+ *
97
+ * The following functions are required to be implemented for all decoders.
98
+ * They represent the base case functionality expected of all decoders.
99
+ */
100
+
101
+ /*!\brief Initialization Configurations
102
+ *
103
+ * This structure is used to pass init time configuration options to the
104
+ * decoder.
105
+ */
106
+ typedef struct vpx_codec_dec_cfg {
107
+ unsigned int threads; /**< Maximum number of threads to use, default 1 */
108
+ unsigned int w; /**< Width */
109
+ unsigned int h; /**< Height */
110
+ } vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */
111
+
112
+ /*!\brief Initialize a decoder instance
113
+ *
114
+ * Initializes a decoder context using the given interface. Applications
115
+ * should call the vpx_codec_dec_init convenience macro instead of this
116
+ * function directly, to ensure that the ABI version number parameter
117
+ * is properly initialized.
118
+ *
119
+ * If the library was configured with --disable-multithread, this call
120
+ * is not thread safe and should be guarded with a lock if being used
121
+ * in a multithreaded context.
122
+ *
123
+ * \param[in] ctx Pointer to this instance's context.
124
+ * \param[in] iface Pointer to the algorithm interface to use.
125
+ * \param[in] cfg Configuration to use, if known. May be NULL.
126
+ * \param[in] flags Bitfield of VPX_CODEC_USE_* flags
127
+ * \param[in] ver ABI version number. Must be set to
128
+ * VPX_DECODER_ABI_VERSION
129
+ * \retval #VPX_CODEC_OK
130
+ * The decoder algorithm has been initialized.
131
+ * \retval #VPX_CODEC_MEM_ERROR
132
+ * Memory allocation failed.
133
+ */
134
+ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
135
+ vpx_codec_iface_t *iface,
136
+ const vpx_codec_dec_cfg_t *cfg,
137
+ vpx_codec_flags_t flags, int ver);
138
+
139
+ /*!\brief Convenience macro for vpx_codec_dec_init_ver()
140
+ *
141
+ * Ensures the ABI version parameter is properly set.
142
+ */
143
+ #define vpx_codec_dec_init(ctx, iface, cfg, flags) \
144
+ vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)
145
+
146
+ /*!\brief Parse stream info from a buffer
147
+ *
148
+ * Performs high level parsing of the bitstream. Construction of a decoder
149
+ * context is not necessary. Can be used to determine if the bitstream is
150
+ * of the proper format, and to extract information from the stream.
151
+ *
152
+ * \param[in] iface Pointer to the algorithm interface
153
+ * \param[in] data Pointer to a block of data to parse
154
+ * \param[in] data_sz Size of the data buffer
155
+ * \param[in,out] si Pointer to stream info to update. The sz member
156
+ * \ref MUST be properly initialized, but \ref MAY be
157
+ * clobbered by the algorithm. This parameter \ref MAY
158
+ * be NULL.
159
+ *
160
+ * \retval #VPX_CODEC_OK
161
+ * Bitstream is parsable and stream information updated
162
+ */
163
+ vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
164
+ const uint8_t *data,
165
+ unsigned int data_sz,
166
+ vpx_codec_stream_info_t *si);
167
+
168
+ /*!\brief Return information about the current stream.
169
+ *
170
+ * Returns information about the stream that has been parsed during decoding.
171
+ *
172
+ * \param[in] ctx Pointer to this instance's context
173
+ * \param[in,out] si Pointer to stream info to update. The sz member
174
+ * \ref MUST be properly initialized, but \ref MAY be
175
+ * clobbered by the algorithm. This parameter \ref MAY
176
+ * be NULL.
177
+ *
178
+ * \retval #VPX_CODEC_OK
179
+ * Bitstream is parsable and stream information updated
180
+ */
181
+ vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
182
+ vpx_codec_stream_info_t *si);
183
+
184
+ /*!\brief Decode data
185
+ *
186
+ * Processes a buffer of coded data. If the processing results in a new
187
+ * decoded frame becoming available, put_slice and put_frame callbacks may be
188
+ * invoked, as appropriate. Encoded data \ref MUST be passed in DTS (decode
189
+ * time stamp) order. Frames produced will always be in PTS (presentation
190
+ * time stamp) order.
191
+ * If the decoder is configured with VPX_CODEC_USE_INPUT_FRAGMENTS enabled,
192
+ * data and data_sz can contain a fragment of the encoded frame. Fragment
193
+ * \#n must contain at least partition \#n, but can also contain subsequent
194
+ * partitions (\#n+1 - \#n+i), and if so, fragments \#n+1, .., \#n+i must
195
+ * be empty. When no more data is available, this function should be called
196
+ * with NULL as data and 0 as data_sz. The memory passed to this function
197
+ * must be available until the frame has been decoded.
198
+ *
199
+ * \param[in] ctx Pointer to this instance's context
200
+ * \param[in] data Pointer to this block of new coded data. If
201
+ * NULL, the put_frame callback is invoked for
202
+ * the previously decoded frame.
203
+ * \param[in] data_sz Size of the coded data, in bytes.
204
+ * \param[in] user_priv Application specific data to associate with
205
+ * this frame.
206
+ * \param[in] deadline Soft deadline the decoder should attempt to meet,
207
+ * in us. Set to zero for unlimited.
208
+ * NOTE: The deadline parameter is ignored. Always
209
+ * pass 0.
210
+ *
211
+ * \return Returns #VPX_CODEC_OK if the coded data was processed completely
212
+ * and future pictures can be decoded without error. Otherwise,
213
+ * see the descriptions of the other error codes in ::vpx_codec_err_t
214
+ * for recoverability capabilities.
215
+ */
216
+ vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data,
217
+ unsigned int data_sz, void *user_priv,
218
+ long deadline);
219
+
220
+ /*!\brief Decoded frames iterator
221
+ *
222
+ * Iterates over a list of the frames available for display. The iterator
223
+ * storage should be initialized to NULL to start the iteration. Iteration is
224
+ * complete when this function returns NULL.
225
+ *
226
+ * The list of available frames becomes valid upon completion of the
227
+ * vpx_codec_decode call, and remains valid until the next call to
228
+ * vpx_codec_decode.
229
+ *
230
+ * \param[in] ctx Pointer to this instance's context
231
+ * \param[in,out] iter Iterator storage, initialized to NULL
232
+ *
233
+ * \return Returns a pointer to an image, if one is ready for display. Frames
234
+ * produced will always be in PTS (presentation time stamp) order.
235
+ */
236
+ vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter);
237
+
238
+ /*!\defgroup cap_put_frame Frame-Based Decoding Functions
239
+ *
240
+ * The following function is required to be implemented for all decoders
241
+ * that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling this
242
+ * function for codecs that don't advertise this capability will result in
243
+ * an error code being returned, usually VPX_CODEC_INCAPABLE.
244
+ * @{
245
+ */
246
+
247
+ /*!\brief put frame callback prototype
248
+ *
249
+ * This callback is invoked by the decoder to notify the application of
250
+ * the availability of decoded image data.
251
+ */
252
+ typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv,
253
+ const vpx_image_t *img);
254
+
255
+ /*!\brief Register for notification of frame completion.
256
+ *
257
+ * Registers a given function to be called when a decoded frame is
258
+ * available.
259
+ *
260
+ * \param[in] ctx Pointer to this instance's context
261
+ * \param[in] cb Pointer to the callback function
262
+ * \param[in] user_priv User's private data
263
+ *
264
+ * \retval #VPX_CODEC_OK
265
+ * Callback successfully registered.
266
+ * \retval #VPX_CODEC_ERROR
267
+ * Decoder context not initialized.
268
+ * \retval #VPX_CODEC_INCAPABLE
269
+ * Algorithm not capable of posting frame completion.
270
+ */
271
+ vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx,
272
+ vpx_codec_put_frame_cb_fn_t cb,
273
+ void *user_priv);
274
+
275
+ /*!@} - end defgroup cap_put_frame */
276
+
277
+ /*!\defgroup cap_put_slice Slice-Based Decoding Functions
278
+ *
279
+ * The following function is required to be implemented for all decoders
280
+ * that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling this
281
+ * function for codecs that don't advertise this capability will result in
282
+ * an error code being returned, usually VPX_CODEC_INCAPABLE.
283
+ * @{
284
+ */
285
+
286
+ /*!\brief put slice callback prototype
287
+ *
288
+ * This callback is invoked by the decoder to notify the application of
289
+ * the availability of partially decoded image data.
290
+ */
291
+ typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv,
292
+ const vpx_image_t *img,
293
+ const vpx_image_rect_t *valid,
294
+ const vpx_image_rect_t *update);
295
+
296
+ /*!\brief Register for notification of slice completion.
297
+ *
298
+ * Registers a given function to be called when a decoded slice is
299
+ * available.
300
+ *
301
+ * \param[in] ctx Pointer to this instance's context
302
+ * \param[in] cb Pointer to the callback function
303
+ * \param[in] user_priv User's private data
304
+ *
305
+ * \retval #VPX_CODEC_OK
306
+ * Callback successfully registered.
307
+ * \retval #VPX_CODEC_ERROR
308
+ * Decoder context not initialized.
309
+ * \retval #VPX_CODEC_INCAPABLE
310
+ * Algorithm not capable of posting slice completion.
311
+ */
312
+ vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx,
313
+ vpx_codec_put_slice_cb_fn_t cb,
314
+ void *user_priv);
315
+
316
+ /*!@} - end defgroup cap_put_slice*/
317
+
318
+ /*!\defgroup cap_external_frame_buffer External Frame Buffer Functions
319
+ *
320
+ * The following function is required to be implemented for all decoders
321
+ * that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.
322
+ * Calling this function for codecs that don't advertise this capability
323
+ * will result in an error code being returned, usually VPX_CODEC_INCAPABLE.
324
+ *
325
+ * \note
326
+ * Currently this only works with VP9.
327
+ * @{
328
+ */
329
+
330
+ /*!\brief Pass in external frame buffers for the decoder to use.
331
+ *
332
+ * Registers functions to be called when libvpx needs a frame buffer
333
+ * to decode the current frame and a function to be called when libvpx does
334
+ * not internally reference the frame buffer. This set function must
335
+ * be called before the first call to decode or libvpx will assume the
336
+ * default behavior of allocating frame buffers internally.
337
+ *
338
+ * \param[in] ctx Pointer to this instance's context
339
+ * \param[in] cb_get Pointer to the get callback function
340
+ * \param[in] cb_release Pointer to the release callback function
341
+ * \param[in] cb_priv Callback's private data
342
+ *
343
+ * \retval #VPX_CODEC_OK
344
+ * External frame buffers will be used by libvpx.
345
+ * \retval #VPX_CODEC_INVALID_PARAM
346
+ * One or more of the callbacks were NULL.
347
+ * \retval #VPX_CODEC_ERROR
348
+ * Decoder context not initialized.
349
+ * \retval #VPX_CODEC_INCAPABLE
350
+ * Algorithm not capable of using external frame buffers.
351
+ *
352
+ * \note
353
+ * When decoding VP9, the application may be required to pass in at least
354
+ * #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS external frame
355
+ * buffers.
356
+ */
357
+ vpx_codec_err_t vpx_codec_set_frame_buffer_functions(
358
+ vpx_codec_ctx_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get,
359
+ vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv);
360
+
361
+ /*!@} - end defgroup cap_external_frame_buffer */
362
+
363
+ /*!@} - end defgroup decoder*/
364
+ #ifdef __cplusplus
365
+ }
366
+ #endif
367
+ #endif // VPX_VPX_VPX_DECODER_H_