@pproenca/ffmpeg-darwin-x64 0.1.7 → 0.1.9

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 (218) hide show
  1. package/LICENSE +28 -0
  2. package/lib/libSvtAv1Enc.a +0 -0
  3. package/lib/libaom.a +0 -0
  4. package/lib/libavcodec.a +0 -0
  5. package/lib/libavdevice.a +0 -0
  6. package/lib/libavfilter.a +0 -0
  7. package/lib/libavformat.a +0 -0
  8. package/lib/libavutil.a +0 -0
  9. package/lib/libdav1d.a +0 -0
  10. package/lib/libogg.a +0 -0
  11. package/lib/libopus.a +0 -0
  12. package/lib/libswresample.a +0 -0
  13. package/lib/libswscale.a +0 -0
  14. package/lib/libvorbis.a +0 -0
  15. package/lib/libvorbisenc.a +0 -0
  16. package/lib/libvorbisfile.a +0 -0
  17. package/lib/libvpx.a +0 -0
  18. package/lib/pkgconfig/SvtAv1Enc.pc +12 -0
  19. package/lib/pkgconfig/aom.pc +14 -0
  20. package/lib/pkgconfig/dav1d.pc +9 -0
  21. package/lib/pkgconfig/libavcodec.pc +14 -0
  22. package/lib/pkgconfig/libavdevice.pc +14 -0
  23. package/lib/pkgconfig/libavfilter.pc +14 -0
  24. package/lib/pkgconfig/libavformat.pc +14 -0
  25. package/lib/pkgconfig/libavutil.pc +14 -0
  26. package/lib/pkgconfig/libswresample.pc +14 -0
  27. package/lib/pkgconfig/libswscale.pc +14 -0
  28. package/lib/pkgconfig/ogg.pc +14 -0
  29. package/lib/pkgconfig/opus.pc +16 -0
  30. package/lib/pkgconfig/vorbis.pc +15 -0
  31. package/lib/pkgconfig/vorbisenc.pc +14 -0
  32. package/lib/pkgconfig/vorbisfile.pc +14 -0
  33. package/lib/pkgconfig/vpx.pc +14 -0
  34. package/package.json +2 -3
  35. package/include/aom/aom.h +0 -127
  36. package/include/aom/aom_codec.h +0 -594
  37. package/include/aom/aom_decoder.h +0 -257
  38. package/include/aom/aom_encoder.h +0 -1154
  39. package/include/aom/aom_external_partition.h +0 -452
  40. package/include/aom/aom_frame_buffer.h +0 -84
  41. package/include/aom/aom_image.h +0 -462
  42. package/include/aom/aom_integer.h +0 -60
  43. package/include/aom/aomcx.h +0 -2288
  44. package/include/aom/aomdx.h +0 -607
  45. package/include/dav1d/common.h +0 -94
  46. package/include/dav1d/data.h +0 -117
  47. package/include/dav1d/dav1d.h +0 -329
  48. package/include/dav1d/headers.h +0 -444
  49. package/include/dav1d/picture.h +0 -157
  50. package/include/dav1d/version.h +0 -50
  51. package/include/libavcodec/ac3_parser.h +0 -36
  52. package/include/libavcodec/adts_parser.h +0 -37
  53. package/include/libavcodec/avcodec.h +0 -3128
  54. package/include/libavcodec/avdct.h +0 -88
  55. package/include/libavcodec/avfft.h +0 -149
  56. package/include/libavcodec/bsf.h +0 -332
  57. package/include/libavcodec/codec.h +0 -382
  58. package/include/libavcodec/codec_desc.h +0 -134
  59. package/include/libavcodec/codec_id.h +0 -669
  60. package/include/libavcodec/codec_par.h +0 -248
  61. package/include/libavcodec/d3d11va.h +0 -109
  62. package/include/libavcodec/defs.h +0 -337
  63. package/include/libavcodec/dirac.h +0 -135
  64. package/include/libavcodec/dv_profile.h +0 -82
  65. package/include/libavcodec/dxva2.h +0 -90
  66. package/include/libavcodec/jni.h +0 -67
  67. package/include/libavcodec/mediacodec.h +0 -103
  68. package/include/libavcodec/packet.h +0 -887
  69. package/include/libavcodec/qsv.h +0 -109
  70. package/include/libavcodec/vdpau.h +0 -171
  71. package/include/libavcodec/version.h +0 -45
  72. package/include/libavcodec/version_major.h +0 -52
  73. package/include/libavcodec/videotoolbox.h +0 -85
  74. package/include/libavcodec/vorbis_parser.h +0 -74
  75. package/include/libavdevice/avdevice.h +0 -397
  76. package/include/libavdevice/version.h +0 -45
  77. package/include/libavdevice/version_major.h +0 -43
  78. package/include/libavfilter/avfilter.h +0 -1379
  79. package/include/libavfilter/buffersink.h +0 -173
  80. package/include/libavfilter/buffersrc.h +0 -215
  81. package/include/libavfilter/version.h +0 -48
  82. package/include/libavfilter/version_major.h +0 -40
  83. package/include/libavformat/avformat.h +0 -3107
  84. package/include/libavformat/avio.h +0 -831
  85. package/include/libavformat/version.h +0 -47
  86. package/include/libavformat/version_major.h +0 -54
  87. package/include/libavutil/adler32.h +0 -63
  88. package/include/libavutil/aes.h +0 -69
  89. package/include/libavutil/aes_ctr.h +0 -99
  90. package/include/libavutil/ambient_viewing_environment.h +0 -72
  91. package/include/libavutil/attributes.h +0 -173
  92. package/include/libavutil/audio_fifo.h +0 -187
  93. package/include/libavutil/avassert.h +0 -78
  94. package/include/libavutil/avconfig.h +0 -6
  95. package/include/libavutil/avstring.h +0 -428
  96. package/include/libavutil/avutil.h +0 -362
  97. package/include/libavutil/base64.h +0 -72
  98. package/include/libavutil/blowfish.h +0 -82
  99. package/include/libavutil/bprint.h +0 -254
  100. package/include/libavutil/bswap.h +0 -105
  101. package/include/libavutil/buffer.h +0 -322
  102. package/include/libavutil/camellia.h +0 -70
  103. package/include/libavutil/cast5.h +0 -80
  104. package/include/libavutil/channel_layout.h +0 -751
  105. package/include/libavutil/common.h +0 -589
  106. package/include/libavutil/cpu.h +0 -145
  107. package/include/libavutil/crc.h +0 -102
  108. package/include/libavutil/csp.h +0 -150
  109. package/include/libavutil/des.h +0 -81
  110. package/include/libavutil/detection_bbox.h +0 -108
  111. package/include/libavutil/dict.h +0 -241
  112. package/include/libavutil/display.h +0 -109
  113. package/include/libavutil/dovi_meta.h +0 -396
  114. package/include/libavutil/downmix_info.h +0 -115
  115. package/include/libavutil/encryption_info.h +0 -205
  116. package/include/libavutil/error.h +0 -129
  117. package/include/libavutil/eval.h +0 -140
  118. package/include/libavutil/executor.h +0 -67
  119. package/include/libavutil/ffversion.h +0 -5
  120. package/include/libavutil/fifo.h +0 -242
  121. package/include/libavutil/file.h +0 -62
  122. package/include/libavutil/film_grain_params.h +0 -322
  123. package/include/libavutil/frame.h +0 -1175
  124. package/include/libavutil/hash.h +0 -264
  125. package/include/libavutil/hdr_dynamic_metadata.h +0 -376
  126. package/include/libavutil/hdr_dynamic_vivid_metadata.h +0 -346
  127. package/include/libavutil/hmac.h +0 -99
  128. package/include/libavutil/hwcontext.h +0 -598
  129. package/include/libavutil/hwcontext_cuda.h +0 -74
  130. package/include/libavutil/hwcontext_d3d11va.h +0 -178
  131. package/include/libavutil/hwcontext_d3d12va.h +0 -142
  132. package/include/libavutil/hwcontext_drm.h +0 -169
  133. package/include/libavutil/hwcontext_dxva2.h +0 -75
  134. package/include/libavutil/hwcontext_mediacodec.h +0 -61
  135. package/include/libavutil/hwcontext_opencl.h +0 -100
  136. package/include/libavutil/hwcontext_qsv.h +0 -87
  137. package/include/libavutil/hwcontext_vaapi.h +0 -117
  138. package/include/libavutil/hwcontext_vdpau.h +0 -44
  139. package/include/libavutil/hwcontext_videotoolbox.h +0 -106
  140. package/include/libavutil/hwcontext_vulkan.h +0 -382
  141. package/include/libavutil/iamf.h +0 -690
  142. package/include/libavutil/imgutils.h +0 -377
  143. package/include/libavutil/intfloat.h +0 -77
  144. package/include/libavutil/intreadwrite.h +0 -677
  145. package/include/libavutil/lfg.h +0 -81
  146. package/include/libavutil/log.h +0 -387
  147. package/include/libavutil/lzo.h +0 -66
  148. package/include/libavutil/macros.h +0 -80
  149. package/include/libavutil/mastering_display_metadata.h +0 -137
  150. package/include/libavutil/mathematics.h +0 -300
  151. package/include/libavutil/md5.h +0 -89
  152. package/include/libavutil/mem.h +0 -607
  153. package/include/libavutil/motion_vector.h +0 -57
  154. package/include/libavutil/murmur3.h +0 -115
  155. package/include/libavutil/opt.h +0 -1187
  156. package/include/libavutil/parseutils.h +0 -197
  157. package/include/libavutil/pixdesc.h +0 -440
  158. package/include/libavutil/pixelutils.h +0 -51
  159. package/include/libavutil/pixfmt.h +0 -716
  160. package/include/libavutil/random_seed.h +0 -57
  161. package/include/libavutil/rational.h +0 -225
  162. package/include/libavutil/rc4.h +0 -69
  163. package/include/libavutil/replaygain.h +0 -50
  164. package/include/libavutil/ripemd.h +0 -83
  165. package/include/libavutil/samplefmt.h +0 -269
  166. package/include/libavutil/sha.h +0 -90
  167. package/include/libavutil/sha512.h +0 -92
  168. package/include/libavutil/spherical.h +0 -243
  169. package/include/libavutil/stereo3d.h +0 -325
  170. package/include/libavutil/tea.h +0 -71
  171. package/include/libavutil/threadmessage.h +0 -115
  172. package/include/libavutil/time.h +0 -56
  173. package/include/libavutil/timecode.h +0 -199
  174. package/include/libavutil/timestamp.h +0 -85
  175. package/include/libavutil/tree.h +0 -137
  176. package/include/libavutil/twofish.h +0 -70
  177. package/include/libavutil/tx.h +0 -210
  178. package/include/libavutil/uuid.h +0 -146
  179. package/include/libavutil/version.h +0 -124
  180. package/include/libavutil/video_enc_params.h +0 -171
  181. package/include/libavutil/video_hint.h +0 -107
  182. package/include/libavutil/xtea.h +0 -94
  183. package/include/libswresample/swresample.h +0 -587
  184. package/include/libswresample/version.h +0 -46
  185. package/include/libswresample/version_major.h +0 -31
  186. package/include/libswscale/swscale.h +0 -460
  187. package/include/libswscale/version.h +0 -44
  188. package/include/libswscale/version_major.h +0 -35
  189. package/include/ogg/config_types.h +0 -26
  190. package/include/ogg/ogg.h +0 -209
  191. package/include/ogg/os_types.h +0 -158
  192. package/include/opus/opus.h +0 -1099
  193. package/include/opus/opus_defines.h +0 -830
  194. package/include/opus/opus_multistream.h +0 -660
  195. package/include/opus/opus_projection.h +0 -568
  196. package/include/opus/opus_types.h +0 -166
  197. package/include/svt-av1/EbDebugMacros.h +0 -88
  198. package/include/svt-av1/EbSvtAv1.h +0 -462
  199. package/include/svt-av1/EbSvtAv1Enc.h +0 -1112
  200. package/include/svt-av1/EbSvtAv1ErrorCodes.h +0 -67
  201. package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +0 -64
  202. package/include/svt-av1/EbSvtAv1Formats.h +0 -126
  203. package/include/svt-av1/EbSvtAv1Metadata.h +0 -156
  204. package/include/vorbis/codec.h +0 -242
  205. package/include/vorbis/vorbisenc.h +0 -435
  206. package/include/vorbis/vorbisfile.h +0 -205
  207. package/include/vpx/vp8.h +0 -136
  208. package/include/vpx/vp8cx.h +0 -1118
  209. package/include/vpx/vp8dx.h +0 -228
  210. package/include/vpx/vpx_codec.h +0 -475
  211. package/include/vpx/vpx_decoder.h +0 -367
  212. package/include/vpx/vpx_encoder.h +0 -1150
  213. package/include/vpx/vpx_ext_ratectrl.h +0 -590
  214. package/include/vpx/vpx_frame_buffer.h +0 -83
  215. package/include/vpx/vpx_image.h +0 -221
  216. package/include/vpx/vpx_integer.h +0 -40
  217. package/include/vpx/vpx_tpl.h +0 -68
  218. /package/{include → lib/pkgconfig}/index.js +0 -0
@@ -1,660 +0,0 @@
1
- /* Copyright (c) 2011 Xiph.Org Foundation
2
- Written by Jean-Marc Valin */
3
- /*
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions
6
- are met:
7
-
8
- - Redistributions of source code must retain the above copyright
9
- notice, this list of conditions and the following disclaimer.
10
-
11
- - Redistributions in binary form must reproduce the above copyright
12
- notice, this list of conditions and the following disclaimer in the
13
- documentation and/or other materials provided with the distribution.
14
-
15
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
19
- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
- */
27
-
28
- /**
29
- * @file opus_multistream.h
30
- * @brief Opus reference implementation multistream API
31
- */
32
-
33
- #ifndef OPUS_MULTISTREAM_H
34
- #define OPUS_MULTISTREAM_H
35
-
36
- #include "opus.h"
37
-
38
- #ifdef __cplusplus
39
- extern "C" {
40
- #endif
41
-
42
- /** @cond OPUS_INTERNAL_DOC */
43
-
44
- /** Macros to trigger compilation errors when the wrong types are provided to a
45
- * CTL. */
46
- /**@{*/
47
- #define __opus_check_encstate_ptr(ptr) ((ptr) + ((ptr) - (OpusEncoder**)(ptr)))
48
- #define __opus_check_decstate_ptr(ptr) ((ptr) + ((ptr) - (OpusDecoder**)(ptr)))
49
- /**@}*/
50
-
51
- /** These are the actual encoder and decoder CTL ID numbers.
52
- * They should not be used directly by applications.
53
- * In general, SETs should be even and GETs should be odd.*/
54
- /**@{*/
55
- #define OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST 5120
56
- #define OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST 5122
57
- /**@}*/
58
-
59
- /** @endcond */
60
-
61
- /** @defgroup opus_multistream_ctls Multistream specific encoder and decoder CTLs
62
- *
63
- * These are convenience macros that are specific to the
64
- * opus_multistream_encoder_ctl() and opus_multistream_decoder_ctl()
65
- * interface.
66
- * The CTLs from @ref opus_genericctls, @ref opus_encoderctls, and
67
- * @ref opus_decoderctls may be applied to a multistream encoder or decoder as
68
- * well.
69
- * In addition, you may retrieve the encoder or decoder state for an specific
70
- * stream via #OPUS_MULTISTREAM_GET_ENCODER_STATE or
71
- * #OPUS_MULTISTREAM_GET_DECODER_STATE and apply CTLs to it individually.
72
- */
73
- /**@{*/
74
-
75
- /** Gets the encoder state for an individual stream of a multistream encoder.
76
- * @param[in] x <tt>opus_int32</tt>: The index of the stream whose encoder you
77
- * wish to retrieve.
78
- * This must be non-negative and less than
79
- * the <code>streams</code> parameter used
80
- * to initialize the encoder.
81
- * @param[out] y <tt>OpusEncoder**</tt>: Returns a pointer to the given
82
- * encoder state.
83
- * @retval OPUS_BAD_ARG The index of the requested stream was out of range.
84
- * @hideinitializer
85
- */
86
- #define OPUS_MULTISTREAM_GET_ENCODER_STATE(x,y) OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST, __opus_check_int(x), __opus_check_encstate_ptr(y)
87
-
88
- /** Gets the decoder state for an individual stream of a multistream decoder.
89
- * @param[in] x <tt>opus_int32</tt>: The index of the stream whose decoder you
90
- * wish to retrieve.
91
- * This must be non-negative and less than
92
- * the <code>streams</code> parameter used
93
- * to initialize the decoder.
94
- * @param[out] y <tt>OpusDecoder**</tt>: Returns a pointer to the given
95
- * decoder state.
96
- * @retval OPUS_BAD_ARG The index of the requested stream was out of range.
97
- * @hideinitializer
98
- */
99
- #define OPUS_MULTISTREAM_GET_DECODER_STATE(x,y) OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST, __opus_check_int(x), __opus_check_decstate_ptr(y)
100
-
101
- /**@}*/
102
-
103
- /** @defgroup opus_multistream Opus Multistream API
104
- * @{
105
- *
106
- * The multistream API allows individual Opus streams to be combined into a
107
- * single packet, enabling support for up to 255 channels. Unlike an
108
- * elementary Opus stream, the encoder and decoder must negotiate the channel
109
- * configuration before the decoder can successfully interpret the data in the
110
- * packets produced by the encoder. Some basic information, such as packet
111
- * duration, can be computed without any special negotiation.
112
- *
113
- * The format for multistream Opus packets is defined in
114
- * <a href="https://tools.ietf.org/html/rfc7845">RFC 7845</a>
115
- * and is based on the self-delimited Opus framing described in Appendix B of
116
- * <a href="https://tools.ietf.org/html/rfc6716">RFC 6716</a>.
117
- * Normal Opus packets are just a degenerate case of multistream Opus packets,
118
- * and can be encoded or decoded with the multistream API by setting
119
- * <code>streams</code> to <code>1</code> when initializing the encoder or
120
- * decoder.
121
- *
122
- * Multistream Opus streams can contain up to 255 elementary Opus streams.
123
- * These may be either "uncoupled" or "coupled", indicating that the decoder
124
- * is configured to decode them to either 1 or 2 channels, respectively.
125
- * The streams are ordered so that all coupled streams appear at the
126
- * beginning.
127
- *
128
- * A <code>mapping</code> table defines which decoded channel <code>i</code>
129
- * should be used for each input/output (I/O) channel <code>j</code>. This table is
130
- * typically provided as an unsigned char array.
131
- * Let <code>i = mapping[j]</code> be the index for I/O channel <code>j</code>.
132
- * If <code>i < 2*coupled_streams</code>, then I/O channel <code>j</code> is
133
- * encoded as the left channel of stream <code>(i/2)</code> if <code>i</code>
134
- * is even, or as the right channel of stream <code>(i/2)</code> if
135
- * <code>i</code> is odd. Otherwise, I/O channel <code>j</code> is encoded as
136
- * mono in stream <code>(i - coupled_streams)</code>, unless it has the special
137
- * value 255, in which case it is omitted from the encoding entirely (the
138
- * decoder will reproduce it as silence). Each value <code>i</code> must either
139
- * be the special value 255 or be less than <code>streams + coupled_streams</code>.
140
- *
141
- * The output channels specified by the encoder
142
- * should use the
143
- * <a href="https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810004.3.9">Vorbis
144
- * channel ordering</a>. A decoder may wish to apply an additional permutation
145
- * to the mapping the encoder used to achieve a different output channel
146
- * order (e.g. for outputting in WAV order).
147
- *
148
- * Each multistream packet contains an Opus packet for each stream, and all of
149
- * the Opus packets in a single multistream packet must have the same
150
- * duration. Therefore the duration of a multistream packet can be extracted
151
- * from the TOC sequence of the first stream, which is located at the
152
- * beginning of the packet, just like an elementary Opus stream:
153
- *
154
- * @code
155
- * int nb_samples;
156
- * int nb_frames;
157
- * nb_frames = opus_packet_get_nb_frames(data, len);
158
- * if (nb_frames < 1)
159
- * return nb_frames;
160
- * nb_samples = opus_packet_get_samples_per_frame(data, 48000) * nb_frames;
161
- * @endcode
162
- *
163
- * The general encoding and decoding process proceeds exactly the same as in
164
- * the normal @ref opus_encoder and @ref opus_decoder APIs.
165
- * See their documentation for an overview of how to use the corresponding
166
- * multistream functions.
167
- */
168
-
169
- /** Opus multistream encoder state.
170
- * This contains the complete state of a multistream Opus encoder.
171
- * It is position independent and can be freely copied.
172
- * @see opus_multistream_encoder_create
173
- * @see opus_multistream_encoder_init
174
- */
175
- typedef struct OpusMSEncoder OpusMSEncoder;
176
-
177
- /** Opus multistream decoder state.
178
- * This contains the complete state of a multistream Opus decoder.
179
- * It is position independent and can be freely copied.
180
- * @see opus_multistream_decoder_create
181
- * @see opus_multistream_decoder_init
182
- */
183
- typedef struct OpusMSDecoder OpusMSDecoder;
184
-
185
- /**\name Multistream encoder functions */
186
- /**@{*/
187
-
188
- /** Gets the size of an OpusMSEncoder structure.
189
- * @param streams <tt>int</tt>: The total number of streams to encode from the
190
- * input.
191
- * This must be no more than 255.
192
- * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
193
- * to encode.
194
- * This must be no larger than the total
195
- * number of streams.
196
- * Additionally, The total number of
197
- * encoded channels (<code>streams +
198
- * coupled_streams</code>) must be no
199
- * more than 255.
200
- * @returns The size in bytes on success, or a negative error code
201
- * (see @ref opus_errorcodes) on error.
202
- */
203
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get_size(
204
- int streams,
205
- int coupled_streams
206
- );
207
-
208
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_encoder_get_size(
209
- int channels,
210
- int mapping_family
211
- );
212
-
213
-
214
- /** Allocates and initializes a multistream encoder state.
215
- * Call opus_multistream_encoder_destroy() to release
216
- * this object when finished.
217
- * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
218
- * This must be one of 8000, 12000, 16000,
219
- * 24000, or 48000.
220
- * @param channels <tt>int</tt>: Number of channels in the input signal.
221
- * This must be at most 255.
222
- * It may be greater than the number of
223
- * coded channels (<code>streams +
224
- * coupled_streams</code>).
225
- * @param streams <tt>int</tt>: The total number of streams to encode from the
226
- * input.
227
- * This must be no more than the number of channels.
228
- * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
229
- * to encode.
230
- * This must be no larger than the total
231
- * number of streams.
232
- * Additionally, The total number of
233
- * encoded channels (<code>streams +
234
- * coupled_streams</code>) must be no
235
- * more than the number of input channels.
236
- * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
237
- * encoded channels to input channels, as described in
238
- * @ref opus_multistream. As an extra constraint, the
239
- * multistream encoder does not allow encoding coupled
240
- * streams for which one channel is unused since this
241
- * is never a good idea.
242
- * @param application <tt>int</tt>: The target encoder application.
243
- * This must be one of the following:
244
- * <dl>
245
- * <dt>#OPUS_APPLICATION_VOIP</dt>
246
- * <dd>Process signal for improved speech intelligibility.</dd>
247
- * <dt>#OPUS_APPLICATION_AUDIO</dt>
248
- * <dd>Favor faithfulness to the original input.</dd>
249
- * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
250
- * <dd>Configure the minimum possible coding delay by disabling certain modes
251
- * of operation.</dd>
252
- * </dl>
253
- * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
254
- * code (see @ref opus_errorcodes) on
255
- * failure.
256
- */
257
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder_create(
258
- opus_int32 Fs,
259
- int channels,
260
- int streams,
261
- int coupled_streams,
262
- const unsigned char *mapping,
263
- int application,
264
- int *error
265
- ) OPUS_ARG_NONNULL(5);
266
-
267
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surround_encoder_create(
268
- opus_int32 Fs,
269
- int channels,
270
- int mapping_family,
271
- int *streams,
272
- int *coupled_streams,
273
- unsigned char *mapping,
274
- int application,
275
- int *error
276
- ) OPUS_ARG_NONNULL(4) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6);
277
-
278
- /** Initialize a previously allocated multistream encoder state.
279
- * The memory pointed to by \a st must be at least the size returned by
280
- * opus_multistream_encoder_get_size().
281
- * This is intended for applications which use their own allocator instead of
282
- * malloc.
283
- * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
284
- * @see opus_multistream_encoder_create
285
- * @see opus_multistream_encoder_get_size
286
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
287
- * @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).
288
- * This must be one of 8000, 12000, 16000,
289
- * 24000, or 48000.
290
- * @param channels <tt>int</tt>: Number of channels in the input signal.
291
- * This must be at most 255.
292
- * It may be greater than the number of
293
- * coded channels (<code>streams +
294
- * coupled_streams</code>).
295
- * @param streams <tt>int</tt>: The total number of streams to encode from the
296
- * input.
297
- * This must be no more than the number of channels.
298
- * @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams
299
- * to encode.
300
- * This must be no larger than the total
301
- * number of streams.
302
- * Additionally, The total number of
303
- * encoded channels (<code>streams +
304
- * coupled_streams</code>) must be no
305
- * more than the number of input channels.
306
- * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
307
- * encoded channels to input channels, as described in
308
- * @ref opus_multistream. As an extra constraint, the
309
- * multistream encoder does not allow encoding coupled
310
- * streams for which one channel is unused since this
311
- * is never a good idea.
312
- * @param application <tt>int</tt>: The target encoder application.
313
- * This must be one of the following:
314
- * <dl>
315
- * <dt>#OPUS_APPLICATION_VOIP</dt>
316
- * <dd>Process signal for improved speech intelligibility.</dd>
317
- * <dt>#OPUS_APPLICATION_AUDIO</dt>
318
- * <dd>Favor faithfulness to the original input.</dd>
319
- * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>
320
- * <dd>Configure the minimum possible coding delay by disabling certain modes
321
- * of operation.</dd>
322
- * </dl>
323
- * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
324
- * on failure.
325
- */
326
- OPUS_EXPORT int opus_multistream_encoder_init(
327
- OpusMSEncoder *st,
328
- opus_int32 Fs,
329
- int channels,
330
- int streams,
331
- int coupled_streams,
332
- const unsigned char *mapping,
333
- int application
334
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
335
-
336
- OPUS_EXPORT int opus_multistream_surround_encoder_init(
337
- OpusMSEncoder *st,
338
- opus_int32 Fs,
339
- int channels,
340
- int mapping_family,
341
- int *streams,
342
- int *coupled_streams,
343
- unsigned char *mapping,
344
- int application
345
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(5) OPUS_ARG_NONNULL(6) OPUS_ARG_NONNULL(7);
346
-
347
- /** Encodes a multistream Opus frame.
348
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
349
- * @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved
350
- * samples.
351
- * This must contain
352
- * <code>frame_size*channels</code>
353
- * samples.
354
- * @param frame_size <tt>int</tt>: Number of samples per channel in the input
355
- * signal.
356
- * This must be an Opus frame size for the
357
- * encoder's sampling rate.
358
- * For example, at 48 kHz the permitted values
359
- * are 120, 240, 480, 960, 1920, and 2880.
360
- * Passing in a duration of less than 10 ms
361
- * (480 samples at 48 kHz) will prevent the
362
- * encoder from using the LPC or hybrid modes.
363
- * @param[out] data <tt>unsigned char*</tt>: Output payload.
364
- * This must contain storage for at
365
- * least \a max_data_bytes.
366
- * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
367
- * memory for the output
368
- * payload. This may be
369
- * used to impose an upper limit on
370
- * the instant bitrate, but should
371
- * not be used as the only bitrate
372
- * control. Use #OPUS_SET_BITRATE to
373
- * control the bitrate.
374
- * @returns The length of the encoded packet (in bytes) on success or a
375
- * negative error code (see @ref opus_errorcodes) on failure.
376
- */
377
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode(
378
- OpusMSEncoder *st,
379
- const opus_int16 *pcm,
380
- int frame_size,
381
- unsigned char *data,
382
- opus_int32 max_data_bytes
383
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
384
-
385
- /** Encodes a multistream Opus frame from floating point input.
386
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
387
- * @param[in] pcm <tt>const float*</tt>: The input signal as interleaved
388
- * samples with a normal range of
389
- * +/-1.0.
390
- * Samples with a range beyond +/-1.0
391
- * are supported but will be clipped by
392
- * decoders using the integer API and
393
- * should only be used if it is known
394
- * that the far end supports extended
395
- * dynamic range.
396
- * This must contain
397
- * <code>frame_size*channels</code>
398
- * samples.
399
- * @param frame_size <tt>int</tt>: Number of samples per channel in the input
400
- * signal.
401
- * This must be an Opus frame size for the
402
- * encoder's sampling rate.
403
- * For example, at 48 kHz the permitted values
404
- * are 120, 240, 480, 960, 1920, and 2880.
405
- * Passing in a duration of less than 10 ms
406
- * (480 samples at 48 kHz) will prevent the
407
- * encoder from using the LPC or hybrid modes.
408
- * @param[out] data <tt>unsigned char*</tt>: Output payload.
409
- * This must contain storage for at
410
- * least \a max_data_bytes.
411
- * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
412
- * memory for the output
413
- * payload. This may be
414
- * used to impose an upper limit on
415
- * the instant bitrate, but should
416
- * not be used as the only bitrate
417
- * control. Use #OPUS_SET_BITRATE to
418
- * control the bitrate.
419
- * @returns The length of the encoded packet (in bytes) on success or a
420
- * negative error code (see @ref opus_errorcodes) on failure.
421
- */
422
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode_float(
423
- OpusMSEncoder *st,
424
- const float *pcm,
425
- int frame_size,
426
- unsigned char *data,
427
- opus_int32 max_data_bytes
428
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4);
429
-
430
- /** Frees an <code>OpusMSEncoder</code> allocated by
431
- * opus_multistream_encoder_create().
432
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to be freed.
433
- */
434
- OPUS_EXPORT void opus_multistream_encoder_destroy(OpusMSEncoder *st);
435
-
436
- /** Perform a CTL function on a multistream Opus encoder.
437
- *
438
- * Generally the request and subsequent arguments are generated by a
439
- * convenience macro.
440
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.
441
- * @param request This and all remaining parameters should be replaced by one
442
- * of the convenience macros in @ref opus_genericctls,
443
- * @ref opus_encoderctls, or @ref opus_multistream_ctls.
444
- * @see opus_genericctls
445
- * @see opus_encoderctls
446
- * @see opus_multistream_ctls
447
- */
448
- OPUS_EXPORT int opus_multistream_encoder_ctl(OpusMSEncoder *st, int request, ...) OPUS_ARG_NONNULL(1);
449
-
450
- /**@}*/
451
-
452
- /**\name Multistream decoder functions */
453
- /**@{*/
454
-
455
- /** Gets the size of an <code>OpusMSDecoder</code> structure.
456
- * @param streams <tt>int</tt>: The total number of streams coded in the
457
- * input.
458
- * This must be no more than 255.
459
- * @param coupled_streams <tt>int</tt>: Number streams to decode as coupled
460
- * (2 channel) streams.
461
- * This must be no larger than the total
462
- * number of streams.
463
- * Additionally, The total number of
464
- * coded channels (<code>streams +
465
- * coupled_streams</code>) must be no
466
- * more than 255.
467
- * @returns The size in bytes on success, or a negative error code
468
- * (see @ref opus_errorcodes) on error.
469
- */
470
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_decoder_get_size(
471
- int streams,
472
- int coupled_streams
473
- );
474
-
475
- /** Allocates and initializes a multistream decoder state.
476
- * Call opus_multistream_decoder_destroy() to release
477
- * this object when finished.
478
- * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
479
- * This must be one of 8000, 12000, 16000,
480
- * 24000, or 48000.
481
- * @param channels <tt>int</tt>: Number of channels to output.
482
- * This must be at most 255.
483
- * It may be different from the number of coded
484
- * channels (<code>streams +
485
- * coupled_streams</code>).
486
- * @param streams <tt>int</tt>: The total number of streams coded in the
487
- * input.
488
- * This must be no more than 255.
489
- * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
490
- * (2 channel) streams.
491
- * This must be no larger than the total
492
- * number of streams.
493
- * Additionally, The total number of
494
- * coded channels (<code>streams +
495
- * coupled_streams</code>) must be no
496
- * more than 255.
497
- * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
498
- * coded channels to output channels, as described in
499
- * @ref opus_multistream.
500
- * @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error
501
- * code (see @ref opus_errorcodes) on
502
- * failure.
503
- */
504
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSDecoder *opus_multistream_decoder_create(
505
- opus_int32 Fs,
506
- int channels,
507
- int streams,
508
- int coupled_streams,
509
- const unsigned char *mapping,
510
- int *error
511
- ) OPUS_ARG_NONNULL(5);
512
-
513
- /** Intialize a previously allocated decoder state object.
514
- * The memory pointed to by \a st must be at least the size returned by
515
- * opus_multistream_encoder_get_size().
516
- * This is intended for applications which use their own allocator instead of
517
- * malloc.
518
- * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.
519
- * @see opus_multistream_decoder_create
520
- * @see opus_multistream_deocder_get_size
521
- * @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.
522
- * @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).
523
- * This must be one of 8000, 12000, 16000,
524
- * 24000, or 48000.
525
- * @param channels <tt>int</tt>: Number of channels to output.
526
- * This must be at most 255.
527
- * It may be different from the number of coded
528
- * channels (<code>streams +
529
- * coupled_streams</code>).
530
- * @param streams <tt>int</tt>: The total number of streams coded in the
531
- * input.
532
- * This must be no more than 255.
533
- * @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled
534
- * (2 channel) streams.
535
- * This must be no larger than the total
536
- * number of streams.
537
- * Additionally, The total number of
538
- * coded channels (<code>streams +
539
- * coupled_streams</code>) must be no
540
- * more than 255.
541
- * @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from
542
- * coded channels to output channels, as described in
543
- * @ref opus_multistream.
544
- * @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)
545
- * on failure.
546
- */
547
- OPUS_EXPORT int opus_multistream_decoder_init(
548
- OpusMSDecoder *st,
549
- opus_int32 Fs,
550
- int channels,
551
- int streams,
552
- int coupled_streams,
553
- const unsigned char *mapping
554
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6);
555
-
556
- /** Decode a multistream Opus packet.
557
- * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
558
- * @param[in] data <tt>const unsigned char*</tt>: Input payload.
559
- * Use a <code>NULL</code>
560
- * pointer to indicate packet
561
- * loss.
562
- * @param len <tt>opus_int32</tt>: Number of bytes in payload.
563
- * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
564
- * samples.
565
- * This must contain room for
566
- * <code>frame_size*channels</code>
567
- * samples.
568
- * @param frame_size <tt>int</tt>: The number of samples per channel of
569
- * available space in \a pcm.
570
- * If this is less than the maximum packet duration
571
- * (120 ms; 5760 for 48kHz), this function will not be capable
572
- * of decoding some packets. In the case of PLC (data==NULL)
573
- * or FEC (decode_fec=1), then frame_size needs to be exactly
574
- * the duration of audio that is missing, otherwise the
575
- * decoder will not be in the optimal state to decode the
576
- * next incoming packet. For the PLC and FEC cases, frame_size
577
- * <b>must</b> be a multiple of 2.5 ms.
578
- * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
579
- * forward error correction data be decoded.
580
- * If no such data is available, the frame is
581
- * decoded as if it were lost.
582
- * @returns Number of samples decoded on success or a negative error code
583
- * (see @ref opus_errorcodes) on failure.
584
- */
585
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode(
586
- OpusMSDecoder *st,
587
- const unsigned char *data,
588
- opus_int32 len,
589
- opus_int16 *pcm,
590
- int frame_size,
591
- int decode_fec
592
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
593
-
594
- /** Decode a multistream Opus packet with floating point output.
595
- * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
596
- * @param[in] data <tt>const unsigned char*</tt>: Input payload.
597
- * Use a <code>NULL</code>
598
- * pointer to indicate packet
599
- * loss.
600
- * @param len <tt>opus_int32</tt>: Number of bytes in payload.
601
- * @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved
602
- * samples.
603
- * This must contain room for
604
- * <code>frame_size*channels</code>
605
- * samples.
606
- * @param frame_size <tt>int</tt>: The number of samples per channel of
607
- * available space in \a pcm.
608
- * If this is less than the maximum packet duration
609
- * (120 ms; 5760 for 48kHz), this function will not be capable
610
- * of decoding some packets. In the case of PLC (data==NULL)
611
- * or FEC (decode_fec=1), then frame_size needs to be exactly
612
- * the duration of audio that is missing, otherwise the
613
- * decoder will not be in the optimal state to decode the
614
- * next incoming packet. For the PLC and FEC cases, frame_size
615
- * <b>must</b> be a multiple of 2.5 ms.
616
- * @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band
617
- * forward error correction data be decoded.
618
- * If no such data is available, the frame is
619
- * decoded as if it were lost.
620
- * @returns Number of samples decoded on success or a negative error code
621
- * (see @ref opus_errorcodes) on failure.
622
- */
623
- OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_decode_float(
624
- OpusMSDecoder *st,
625
- const unsigned char *data,
626
- opus_int32 len,
627
- float *pcm,
628
- int frame_size,
629
- int decode_fec
630
- ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4);
631
-
632
- /** Perform a CTL function on a multistream Opus decoder.
633
- *
634
- * Generally the request and subsequent arguments are generated by a
635
- * convenience macro.
636
- * @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.
637
- * @param request This and all remaining parameters should be replaced by one
638
- * of the convenience macros in @ref opus_genericctls,
639
- * @ref opus_decoderctls, or @ref opus_multistream_ctls.
640
- * @see opus_genericctls
641
- * @see opus_decoderctls
642
- * @see opus_multistream_ctls
643
- */
644
- OPUS_EXPORT int opus_multistream_decoder_ctl(OpusMSDecoder *st, int request, ...) OPUS_ARG_NONNULL(1);
645
-
646
- /** Frees an <code>OpusMSDecoder</code> allocated by
647
- * opus_multistream_decoder_create().
648
- * @param st <tt>OpusMSDecoder</tt>: Multistream decoder state to be freed.
649
- */
650
- OPUS_EXPORT void opus_multistream_decoder_destroy(OpusMSDecoder *st);
651
-
652
- /**@}*/
653
-
654
- /**@}*/
655
-
656
- #ifdef __cplusplus
657
- }
658
- #endif
659
-
660
- #endif /* OPUS_MULTISTREAM_H */