@pproenca/webcodecs-ffmpeg-dev 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/gyp-config.js +11 -0
- package/include/aom/aom.h +127 -0
- package/include/aom/aom_codec.h +594 -0
- package/include/aom/aom_decoder.h +257 -0
- package/include/aom/aom_encoder.h +1154 -0
- package/include/aom/aom_external_partition.h +452 -0
- package/include/aom/aom_frame_buffer.h +84 -0
- package/include/aom/aom_image.h +462 -0
- package/include/aom/aom_integer.h +60 -0
- package/include/aom/aomcx.h +2288 -0
- package/include/aom/aomdx.h +607 -0
- package/include/dav1d/common.h +94 -0
- package/include/dav1d/data.h +117 -0
- package/include/dav1d/dav1d.h +329 -0
- package/include/dav1d/headers.h +444 -0
- package/include/dav1d/picture.h +157 -0
- package/include/dav1d/version.h +50 -0
- package/include/index.js +1 -0
- package/include/lame/lame.h +1342 -0
- package/include/libavcodec/ac3_parser.h +36 -0
- package/include/libavcodec/adts_parser.h +37 -0
- package/include/libavcodec/avcodec.h +3128 -0
- package/include/libavcodec/avdct.h +88 -0
- package/include/libavcodec/avfft.h +149 -0
- package/include/libavcodec/bsf.h +332 -0
- package/include/libavcodec/codec.h +382 -0
- package/include/libavcodec/codec_desc.h +134 -0
- package/include/libavcodec/codec_id.h +669 -0
- package/include/libavcodec/codec_par.h +248 -0
- package/include/libavcodec/d3d11va.h +109 -0
- package/include/libavcodec/defs.h +337 -0
- package/include/libavcodec/dirac.h +135 -0
- package/include/libavcodec/dv_profile.h +82 -0
- package/include/libavcodec/dxva2.h +90 -0
- package/include/libavcodec/jni.h +67 -0
- package/include/libavcodec/mediacodec.h +103 -0
- package/include/libavcodec/packet.h +887 -0
- package/include/libavcodec/qsv.h +109 -0
- package/include/libavcodec/vdpau.h +171 -0
- package/include/libavcodec/version.h +45 -0
- package/include/libavcodec/version_major.h +52 -0
- package/include/libavcodec/videotoolbox.h +85 -0
- package/include/libavcodec/vorbis_parser.h +74 -0
- package/include/libavdevice/avdevice.h +397 -0
- package/include/libavdevice/version.h +45 -0
- package/include/libavdevice/version_major.h +43 -0
- package/include/libavfilter/avfilter.h +1379 -0
- package/include/libavfilter/buffersink.h +173 -0
- package/include/libavfilter/buffersrc.h +215 -0
- package/include/libavfilter/version.h +48 -0
- package/include/libavfilter/version_major.h +40 -0
- package/include/libavformat/avformat.h +3107 -0
- package/include/libavformat/avio.h +831 -0
- package/include/libavformat/version.h +47 -0
- package/include/libavformat/version_major.h +54 -0
- package/include/libavutil/adler32.h +63 -0
- package/include/libavutil/aes.h +69 -0
- package/include/libavutil/aes_ctr.h +99 -0
- package/include/libavutil/ambient_viewing_environment.h +72 -0
- package/include/libavutil/attributes.h +173 -0
- package/include/libavutil/audio_fifo.h +187 -0
- package/include/libavutil/avassert.h +78 -0
- package/include/libavutil/avconfig.h +6 -0
- package/include/libavutil/avstring.h +428 -0
- package/include/libavutil/avutil.h +362 -0
- package/include/libavutil/base64.h +72 -0
- package/include/libavutil/blowfish.h +82 -0
- package/include/libavutil/bprint.h +254 -0
- package/include/libavutil/bswap.h +105 -0
- package/include/libavutil/buffer.h +322 -0
- package/include/libavutil/camellia.h +70 -0
- package/include/libavutil/cast5.h +80 -0
- package/include/libavutil/channel_layout.h +751 -0
- package/include/libavutil/common.h +589 -0
- package/include/libavutil/cpu.h +145 -0
- package/include/libavutil/crc.h +102 -0
- package/include/libavutil/csp.h +150 -0
- package/include/libavutil/des.h +81 -0
- package/include/libavutil/detection_bbox.h +108 -0
- package/include/libavutil/dict.h +241 -0
- package/include/libavutil/display.h +109 -0
- package/include/libavutil/dovi_meta.h +396 -0
- package/include/libavutil/downmix_info.h +115 -0
- package/include/libavutil/encryption_info.h +205 -0
- package/include/libavutil/error.h +129 -0
- package/include/libavutil/eval.h +140 -0
- package/include/libavutil/executor.h +67 -0
- package/include/libavutil/ffversion.h +5 -0
- package/include/libavutil/fifo.h +242 -0
- package/include/libavutil/file.h +62 -0
- package/include/libavutil/film_grain_params.h +322 -0
- package/include/libavutil/frame.h +1175 -0
- package/include/libavutil/hash.h +264 -0
- package/include/libavutil/hdr_dynamic_metadata.h +376 -0
- package/include/libavutil/hdr_dynamic_vivid_metadata.h +346 -0
- package/include/libavutil/hmac.h +99 -0
- package/include/libavutil/hwcontext.h +598 -0
- package/include/libavutil/hwcontext_cuda.h +74 -0
- package/include/libavutil/hwcontext_d3d11va.h +178 -0
- package/include/libavutil/hwcontext_d3d12va.h +142 -0
- package/include/libavutil/hwcontext_drm.h +169 -0
- package/include/libavutil/hwcontext_dxva2.h +75 -0
- package/include/libavutil/hwcontext_mediacodec.h +61 -0
- package/include/libavutil/hwcontext_opencl.h +100 -0
- package/include/libavutil/hwcontext_qsv.h +87 -0
- package/include/libavutil/hwcontext_vaapi.h +117 -0
- package/include/libavutil/hwcontext_vdpau.h +44 -0
- package/include/libavutil/hwcontext_videotoolbox.h +106 -0
- package/include/libavutil/hwcontext_vulkan.h +382 -0
- package/include/libavutil/iamf.h +690 -0
- package/include/libavutil/imgutils.h +377 -0
- package/include/libavutil/intfloat.h +77 -0
- package/include/libavutil/intreadwrite.h +677 -0
- package/include/libavutil/lfg.h +81 -0
- package/include/libavutil/log.h +387 -0
- package/include/libavutil/lzo.h +66 -0
- package/include/libavutil/macros.h +80 -0
- package/include/libavutil/mastering_display_metadata.h +137 -0
- package/include/libavutil/mathematics.h +300 -0
- package/include/libavutil/md5.h +89 -0
- package/include/libavutil/mem.h +607 -0
- package/include/libavutil/motion_vector.h +57 -0
- package/include/libavutil/murmur3.h +115 -0
- package/include/libavutil/opt.h +1187 -0
- package/include/libavutil/parseutils.h +197 -0
- package/include/libavutil/pixdesc.h +440 -0
- package/include/libavutil/pixelutils.h +51 -0
- package/include/libavutil/pixfmt.h +716 -0
- package/include/libavutil/random_seed.h +57 -0
- package/include/libavutil/rational.h +225 -0
- package/include/libavutil/rc4.h +69 -0
- package/include/libavutil/replaygain.h +50 -0
- package/include/libavutil/ripemd.h +83 -0
- package/include/libavutil/samplefmt.h +269 -0
- package/include/libavutil/sha.h +90 -0
- package/include/libavutil/sha512.h +92 -0
- package/include/libavutil/spherical.h +243 -0
- package/include/libavutil/stereo3d.h +325 -0
- package/include/libavutil/tea.h +71 -0
- package/include/libavutil/threadmessage.h +115 -0
- package/include/libavutil/time.h +56 -0
- package/include/libavutil/timecode.h +199 -0
- package/include/libavutil/timestamp.h +85 -0
- package/include/libavutil/tree.h +137 -0
- package/include/libavutil/twofish.h +70 -0
- package/include/libavutil/tx.h +210 -0
- package/include/libavutil/uuid.h +146 -0
- package/include/libavutil/version.h +124 -0
- package/include/libavutil/video_enc_params.h +171 -0
- package/include/libavutil/video_hint.h +107 -0
- package/include/libavutil/xtea.h +94 -0
- package/include/libpostproc/postprocess.h +107 -0
- package/include/libpostproc/version.h +46 -0
- package/include/libpostproc/version_major.h +31 -0
- package/include/libswresample/swresample.h +587 -0
- package/include/libswresample/version.h +46 -0
- package/include/libswresample/version_major.h +31 -0
- package/include/libswscale/swscale.h +460 -0
- package/include/libswscale/version.h +44 -0
- package/include/libswscale/version_major.h +35 -0
- package/include/ogg/config_types.h +26 -0
- package/include/ogg/ogg.h +209 -0
- package/include/ogg/os_types.h +158 -0
- package/include/opus/opus.h +1099 -0
- package/include/opus/opus_defines.h +830 -0
- package/include/opus/opus_multistream.h +660 -0
- package/include/opus/opus_projection.h +568 -0
- package/include/opus/opus_types.h +166 -0
- package/include/svt-av1/EbDebugMacros.h +88 -0
- package/include/svt-av1/EbSvtAv1.h +462 -0
- package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
- package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
- package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
- package/include/svt-av1/EbSvtAv1Formats.h +126 -0
- package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
- package/include/vorbis/codec.h +242 -0
- package/include/vorbis/vorbisenc.h +435 -0
- package/include/vorbis/vorbisfile.h +205 -0
- package/include/vpx/vp8.h +136 -0
- package/include/vpx/vp8cx.h +1118 -0
- package/include/vpx/vp8dx.h +228 -0
- package/include/vpx/vpx_codec.h +475 -0
- package/include/vpx/vpx_decoder.h +367 -0
- package/include/vpx/vpx_encoder.h +1150 -0
- package/include/vpx/vpx_ext_ratectrl.h +590 -0
- package/include/vpx/vpx_frame_buffer.h +83 -0
- package/include/vpx/vpx_image.h +221 -0
- package/include/vpx/vpx_integer.h +40 -0
- package/include/vpx/vpx_tpl.h +68 -0
- package/include/x264.h +1027 -0
- package/include/x264_config.h +8 -0
- package/include/x265.h +2737 -0
- package/include/x265_config.h +34 -0
- package/package.json +26 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Pedro Proenca
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/gyp-config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper for binding.gyp to resolve FFmpeg include paths.
|
|
3
|
+
*
|
|
4
|
+
* Usage in binding.gyp:
|
|
5
|
+
* "include_dirs": ["<!(node -p \"require('@pproenca/webcodecs-ffmpeg-dev/gyp-config').include\")"]
|
|
6
|
+
*/
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
include: path.join(__dirname, 'include')
|
|
11
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016, Alliance for Open Media. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This source code is subject to the terms of the BSD 2 Clause License and
|
|
5
|
+
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
|
6
|
+
* was not distributed with this source code in the LICENSE file, you can
|
|
7
|
+
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
|
8
|
+
* Media Patent License 1.0 was not distributed with this source code in the
|
|
9
|
+
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/*!\defgroup aom AOM
|
|
13
|
+
* \ingroup codecs
|
|
14
|
+
* AOM is aom's newest video compression algorithm that uses motion
|
|
15
|
+
* compensated prediction, Discrete Cosine Transform (DCT) coding of the
|
|
16
|
+
* prediction error signal and context dependent entropy coding techniques
|
|
17
|
+
* based on arithmetic principles. It features:
|
|
18
|
+
* - YUV 4:2:0 image format
|
|
19
|
+
* - Macro-block based coding (16x16 luma plus two 8x8 chroma)
|
|
20
|
+
* - 1/4 (1/8) pixel accuracy motion compensated prediction
|
|
21
|
+
* - 4x4 DCT transform
|
|
22
|
+
* - 128 level linear quantizer
|
|
23
|
+
* - In loop deblocking filter
|
|
24
|
+
* - Context-based entropy coding
|
|
25
|
+
*
|
|
26
|
+
* @{
|
|
27
|
+
*/
|
|
28
|
+
/*!\file
|
|
29
|
+
* \brief Provides controls common to both the AOM encoder and decoder.
|
|
30
|
+
*/
|
|
31
|
+
#ifndef AOM_AOM_AOM_H_
|
|
32
|
+
#define AOM_AOM_AOM_H_
|
|
33
|
+
|
|
34
|
+
#include "aom/aom_codec.h"
|
|
35
|
+
#include "aom/aom_image.h"
|
|
36
|
+
|
|
37
|
+
#ifdef __cplusplus
|
|
38
|
+
extern "C" {
|
|
39
|
+
#endif
|
|
40
|
+
|
|
41
|
+
/*!\brief Control functions
|
|
42
|
+
*
|
|
43
|
+
* The set of macros define the control functions of AOM interface
|
|
44
|
+
* The range for common control IDs is 230-255(max).
|
|
45
|
+
*/
|
|
46
|
+
enum aom_com_control_id {
|
|
47
|
+
/*!\brief Codec control function to get a pointer to a reference frame
|
|
48
|
+
*
|
|
49
|
+
* av1_ref_frame_t* parameter
|
|
50
|
+
*/
|
|
51
|
+
AV1_GET_REFERENCE = 230,
|
|
52
|
+
|
|
53
|
+
/*!\brief Codec control function to write a frame into a reference buffer
|
|
54
|
+
*
|
|
55
|
+
* av1_ref_frame_t* parameter
|
|
56
|
+
*/
|
|
57
|
+
AV1_SET_REFERENCE = 231,
|
|
58
|
+
|
|
59
|
+
/*!\brief Codec control function to get a copy of reference frame from the
|
|
60
|
+
* decoder
|
|
61
|
+
*
|
|
62
|
+
* av1_ref_frame_t* parameter
|
|
63
|
+
*/
|
|
64
|
+
AV1_COPY_REFERENCE = 232,
|
|
65
|
+
|
|
66
|
+
/*!\brief Codec control function to get a pointer to the new frame
|
|
67
|
+
*
|
|
68
|
+
* aom_image_t* parameter
|
|
69
|
+
*/
|
|
70
|
+
AV1_GET_NEW_FRAME_IMAGE = 233,
|
|
71
|
+
|
|
72
|
+
/*!\brief Codec control function to copy the new frame to an external buffer
|
|
73
|
+
*
|
|
74
|
+
* aom_image_t* parameter
|
|
75
|
+
*/
|
|
76
|
+
AV1_COPY_NEW_FRAME_IMAGE = 234,
|
|
77
|
+
|
|
78
|
+
/*!\brief Start point of control IDs for aom_dec_control_id.
|
|
79
|
+
* Any new common control IDs should be added above.
|
|
80
|
+
*/
|
|
81
|
+
AOM_DECODER_CTRL_ID_START = 256
|
|
82
|
+
// No common control IDs should be added after AOM_DECODER_CTRL_ID_START.
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/*!\brief AV1 specific reference frame data struct
|
|
86
|
+
*
|
|
87
|
+
* Define the data struct to access av1 reference frames.
|
|
88
|
+
*/
|
|
89
|
+
typedef struct av1_ref_frame {
|
|
90
|
+
int idx; /**< frame index to get (input) */
|
|
91
|
+
int use_external_ref; /**< Directly use external ref buffer(decoder only) */
|
|
92
|
+
aom_image_t img; /**< img structure to populate (output) */
|
|
93
|
+
} av1_ref_frame_t;
|
|
94
|
+
|
|
95
|
+
/*!\cond */
|
|
96
|
+
/*!\brief aom decoder control function parameter type
|
|
97
|
+
*
|
|
98
|
+
* Defines the data type for each of AOM decoder control function requires.
|
|
99
|
+
*
|
|
100
|
+
* \note For each control ID "X", a macro-define of
|
|
101
|
+
* AOM_CTRL_X is provided. It is used at compile time to determine
|
|
102
|
+
* if the control ID is supported by the libaom library available,
|
|
103
|
+
* when the libaom version cannot be controlled.
|
|
104
|
+
*/
|
|
105
|
+
AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, av1_ref_frame_t *)
|
|
106
|
+
#define AOM_CTRL_AV1_GET_REFERENCE
|
|
107
|
+
|
|
108
|
+
AOM_CTRL_USE_TYPE(AV1_SET_REFERENCE, av1_ref_frame_t *)
|
|
109
|
+
#define AOM_CTRL_AV1_SET_REFERENCE
|
|
110
|
+
|
|
111
|
+
AOM_CTRL_USE_TYPE(AV1_COPY_REFERENCE, av1_ref_frame_t *)
|
|
112
|
+
#define AOM_CTRL_AV1_COPY_REFERENCE
|
|
113
|
+
|
|
114
|
+
AOM_CTRL_USE_TYPE(AV1_GET_NEW_FRAME_IMAGE, aom_image_t *)
|
|
115
|
+
#define AOM_CTRL_AV1_GET_NEW_FRAME_IMAGE
|
|
116
|
+
|
|
117
|
+
AOM_CTRL_USE_TYPE(AV1_COPY_NEW_FRAME_IMAGE, aom_image_t *)
|
|
118
|
+
#define AOM_CTRL_AV1_COPY_NEW_FRAME_IMAGE
|
|
119
|
+
|
|
120
|
+
/*!\endcond */
|
|
121
|
+
/*! @} - end defgroup aom */
|
|
122
|
+
|
|
123
|
+
#ifdef __cplusplus
|
|
124
|
+
} // extern "C"
|
|
125
|
+
#endif
|
|
126
|
+
|
|
127
|
+
#endif // AOM_AOM_AOM_H_
|