node-av 1.1.0 → 1.2.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.
Files changed (134) hide show
  1. package/README.md +51 -38
  2. package/dist/api/bitstream-filter.d.ts +180 -123
  3. package/dist/api/bitstream-filter.js +180 -125
  4. package/dist/api/bitstream-filter.js.map +1 -1
  5. package/dist/api/decoder.d.ts +279 -132
  6. package/dist/api/decoder.js +285 -142
  7. package/dist/api/decoder.js.map +1 -1
  8. package/dist/api/encoder.d.ts +246 -162
  9. package/dist/api/encoder.js +272 -208
  10. package/dist/api/encoder.js.map +1 -1
  11. package/dist/api/filter-presets.d.ts +690 -94
  12. package/dist/api/filter-presets.js +686 -102
  13. package/dist/api/filter-presets.js.map +1 -1
  14. package/dist/api/filter.d.ts +249 -213
  15. package/dist/api/filter.js +252 -242
  16. package/dist/api/filter.js.map +1 -1
  17. package/dist/api/hardware.d.ts +224 -117
  18. package/dist/api/hardware.js +380 -214
  19. package/dist/api/hardware.js.map +1 -1
  20. package/dist/api/index.d.ts +3 -3
  21. package/dist/api/index.js +1 -1
  22. package/dist/api/index.js.map +1 -1
  23. package/dist/api/io-stream.d.ts +65 -61
  24. package/dist/api/io-stream.js +43 -46
  25. package/dist/api/io-stream.js.map +1 -1
  26. package/dist/api/media-input.d.ts +242 -140
  27. package/dist/api/media-input.js +205 -103
  28. package/dist/api/media-input.js.map +1 -1
  29. package/dist/api/media-output.d.ts +206 -128
  30. package/dist/api/media-output.js +210 -128
  31. package/dist/api/media-output.js.map +1 -1
  32. package/dist/api/pipeline.d.ts +168 -38
  33. package/dist/api/pipeline.js +238 -14
  34. package/dist/api/pipeline.js.map +1 -1
  35. package/dist/api/types.d.ts +21 -187
  36. package/dist/api/utils.d.ts +1 -2
  37. package/dist/api/utils.js +9 -0
  38. package/dist/api/utils.js.map +1 -1
  39. package/dist/lib/audio-fifo.d.ts +127 -170
  40. package/dist/lib/audio-fifo.js +130 -173
  41. package/dist/lib/audio-fifo.js.map +1 -1
  42. package/dist/lib/binding.js +5 -0
  43. package/dist/lib/binding.js.map +1 -1
  44. package/dist/lib/bitstream-filter-context.d.ts +139 -184
  45. package/dist/lib/bitstream-filter-context.js +139 -188
  46. package/dist/lib/bitstream-filter-context.js.map +1 -1
  47. package/dist/lib/bitstream-filter.d.ts +68 -54
  48. package/dist/lib/bitstream-filter.js +68 -54
  49. package/dist/lib/bitstream-filter.js.map +1 -1
  50. package/dist/lib/codec-context.d.ts +316 -380
  51. package/dist/lib/codec-context.js +316 -381
  52. package/dist/lib/codec-context.js.map +1 -1
  53. package/dist/lib/codec-parameters.d.ts +160 -170
  54. package/dist/lib/codec-parameters.js +162 -172
  55. package/dist/lib/codec-parameters.js.map +1 -1
  56. package/dist/lib/codec-parser.d.ts +91 -104
  57. package/dist/lib/codec-parser.js +92 -103
  58. package/dist/lib/codec-parser.js.map +1 -1
  59. package/dist/lib/codec.d.ts +264 -281
  60. package/dist/lib/codec.js +268 -285
  61. package/dist/lib/codec.js.map +1 -1
  62. package/dist/lib/dictionary.d.ts +149 -203
  63. package/dist/lib/dictionary.js +158 -212
  64. package/dist/lib/dictionary.js.map +1 -1
  65. package/dist/lib/error.d.ts +96 -130
  66. package/dist/lib/error.js +98 -128
  67. package/dist/lib/error.js.map +1 -1
  68. package/dist/lib/filter-context.d.ts +284 -218
  69. package/dist/lib/filter-context.js +290 -227
  70. package/dist/lib/filter-context.js.map +1 -1
  71. package/dist/lib/filter-graph.d.ts +251 -292
  72. package/dist/lib/filter-graph.js +253 -294
  73. package/dist/lib/filter-graph.js.map +1 -1
  74. package/dist/lib/filter-inout.d.ts +87 -95
  75. package/dist/lib/filter-inout.js +87 -95
  76. package/dist/lib/filter-inout.js.map +1 -1
  77. package/dist/lib/filter.d.ts +93 -111
  78. package/dist/lib/filter.js +93 -111
  79. package/dist/lib/filter.js.map +1 -1
  80. package/dist/lib/format-context.d.ts +320 -428
  81. package/dist/lib/format-context.js +313 -385
  82. package/dist/lib/format-context.js.map +1 -1
  83. package/dist/lib/frame.d.ts +262 -405
  84. package/dist/lib/frame.js +263 -408
  85. package/dist/lib/frame.js.map +1 -1
  86. package/dist/lib/hardware-device-context.d.ts +149 -203
  87. package/dist/lib/hardware-device-context.js +149 -203
  88. package/dist/lib/hardware-device-context.js.map +1 -1
  89. package/dist/lib/hardware-frames-context.d.ts +170 -180
  90. package/dist/lib/hardware-frames-context.js +171 -181
  91. package/dist/lib/hardware-frames-context.js.map +1 -1
  92. package/dist/lib/index.d.ts +2 -1
  93. package/dist/lib/index.js +2 -2
  94. package/dist/lib/index.js.map +1 -1
  95. package/dist/lib/input-format.d.ts +89 -117
  96. package/dist/lib/input-format.js +89 -117
  97. package/dist/lib/input-format.js.map +1 -1
  98. package/dist/lib/io-context.d.ts +209 -241
  99. package/dist/lib/io-context.js +220 -252
  100. package/dist/lib/io-context.js.map +1 -1
  101. package/dist/lib/log.d.ts +85 -119
  102. package/dist/lib/log.js +85 -122
  103. package/dist/lib/log.js.map +1 -1
  104. package/dist/lib/native-types.d.ts +117 -106
  105. package/dist/lib/native-types.js +0 -7
  106. package/dist/lib/native-types.js.map +1 -1
  107. package/dist/lib/option.d.ts +284 -241
  108. package/dist/lib/option.js +309 -249
  109. package/dist/lib/option.js.map +1 -1
  110. package/dist/lib/output-format.d.ts +77 -101
  111. package/dist/lib/output-format.js +77 -101
  112. package/dist/lib/output-format.js.map +1 -1
  113. package/dist/lib/packet.d.ts +172 -240
  114. package/dist/lib/packet.js +172 -241
  115. package/dist/lib/packet.js.map +1 -1
  116. package/dist/lib/rational.d.ts +0 -2
  117. package/dist/lib/rational.js +0 -2
  118. package/dist/lib/rational.js.map +1 -1
  119. package/dist/lib/software-resample-context.d.ts +241 -325
  120. package/dist/lib/software-resample-context.js +242 -326
  121. package/dist/lib/software-resample-context.js.map +1 -1
  122. package/dist/lib/software-scale-context.d.ts +129 -173
  123. package/dist/lib/software-scale-context.js +131 -175
  124. package/dist/lib/software-scale-context.js.map +1 -1
  125. package/dist/lib/stream.d.ts +87 -197
  126. package/dist/lib/stream.js +87 -197
  127. package/dist/lib/stream.js.map +1 -1
  128. package/dist/lib/utilities.d.ts +372 -181
  129. package/dist/lib/utilities.js +373 -182
  130. package/dist/lib/utilities.js.map +1 -1
  131. package/install/check.js +0 -1
  132. package/package.json +21 -12
  133. package/release_notes.md +43 -59
  134. package/CHANGELOG.md +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/lib/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,uCAAuC,EAAE,MAAM,2BAA2B,CAAC;AAC7H,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,OAAO,KAAK;IACR,MAAM,CAAc;IAE5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,YAAY,MAAmB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,MAA0B;QAC1C,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,WAAW,CAAC,EAAa;QAC9B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAoB;QAC3C,MAAM,M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AED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,WAAW,CAAC,KAAa;QAKvB,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,MAA0B;QAC1C,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;CACF"}
@@ -1,234 +1,186 @@
1
1
  import type { AVDictFlag } from '../constants/constants.js';
2
2
  import type { NativeDictionary, NativeWrapper } from './native-types.js';
3
3
  /**
4
- * Dictionary for options and metadata.
4
+ * Key-value dictionary for FFmpeg options and metadata.
5
5
  *
6
- * Key-value storage for codec options, format options, and metadata.
7
- * Used throughout FFmpeg for configuration and information storage.
8
- * Supports parsing from strings and conversion back to strings.
6
+ * Stores string key-value pairs used throughout FFmpeg for options, metadata,
7
+ * and configuration. Provides methods for setting, getting, and manipulating
8
+ * dictionary entries. Used extensively for codec options, format options,
9
+ * and metadata handling.
9
10
  *
10
11
  * Direct mapping to FFmpeg's AVDictionary.
11
12
  *
12
13
  * @example
13
14
  * ```typescript
14
- * import { Dictionary, CodecContext, FFmpegError } from 'node-av';
15
- *
16
- * // Using Dictionary for codec options
17
- * const options = new Dictionary();
18
- * const ret1 = options.set('preset', 'fast', 0);
19
- * FFmpegError.throwIfError(ret1, 'set preset');
20
- * const ret2 = options.set('crf', '23', 0);
21
- * FFmpegError.throwIfError(ret2, 'set crf');
22
- *
23
- * const codecContext = new CodecContext();
24
- * codecContext.allocContext3(codec);
25
- * const openRet = await codecContext.open2(codec, options);
26
- * FFmpegError.throwIfError(openRet, 'open2');
27
- *
28
- * // Using Dictionary for format options
29
- * const formatOptions = new Dictionary();
30
- * const ret3 = formatOptions.set('movflags', 'faststart', 0);
31
- * FFmpegError.throwIfError(ret3, 'set movflags');
32
- * const headerRet = await formatContext.writeHeader(formatOptions);
33
- * FFmpegError.throwIfError(headerRet, 'writeHeader');
34
- *
35
- * // Reading metadata
36
- * const metadata = stream.metadata;
37
- * if (metadata) {
38
- * const title = metadata.get('title', 0);
39
- * const artist = metadata.get('artist', 0);
40
- * console.log(`Title: ${title}, Artist: ${artist}`);
41
- * }
42
- *
43
- * // Cleanup
44
- * options.free();
45
- * formatOptions.free();
46
- * ```
47
- *
48
- * @example
49
- * ```typescript
50
15
  * import { Dictionary, FFmpegError } from 'node-av';
16
+ * import { AV_DICT_IGNORE_SUFFIX } from 'node-av/constants';
51
17
  *
52
- * // Parsing options from string
53
- * const dict = new Dictionary();
54
- * const ret = dict.parseString('bitrate=128k:preset=fast', '=', ':', 0);
55
- * FFmpegError.throwIfError(ret, 'parseString');
18
+ * // Create from object
19
+ * const dict = Dictionary.fromObject({
20
+ * 'title': 'My Video',
21
+ * 'artist': 'Me',
22
+ * 'year': '2024'
23
+ * });
56
24
  *
57
- * // Getting all options as object
58
- * const allOptions = dict.getAll();
59
- * console.log(allOptions); // { bitrate: '128k', preset: 'fast' }
25
+ * // Set individual values
26
+ * const dict2 = new Dictionary();
27
+ * dict2.alloc();
28
+ * let ret = dict2.set('preset', 'fast');
29
+ * FFmpegError.throwIfError(ret, 'set');
60
30
  *
61
- * // Converting back to string
62
- * const str = dict.getString('=', ':');
63
- * console.log(str); // "bitrate=128k:preset=fast"
31
+ * // Parse from string
32
+ * ret = dict2.parseString('key1=value1:key2=value2', '=', ':');
33
+ * FFmpegError.throwIfError(ret, 'parseString');
64
34
  *
65
- * dict.free();
35
+ * // Get all entries
36
+ * const entries = dict2.getAll();
37
+ * console.log(entries); // { key1: 'value1', key2: 'value2' }
66
38
  * ```
39
+ *
40
+ * @see [AVDictionary](https://ffmpeg.org/doxygen/trunk/group__lavu__dict.html) - FFmpeg Doxygen
41
+ * @see {@link CodecContext} For codec options
42
+ * @see {@link FormatContext} For format options
67
43
  */
68
44
  export declare class Dictionary implements Disposable, NativeWrapper<NativeDictionary> {
69
45
  private native;
46
+ constructor();
70
47
  /**
71
- * Create a new dictionary.
48
+ * Create dictionary from JavaScript object.
72
49
  *
73
- * The dictionary is uninitialized and will be auto-allocated on first set() call.
74
- * No FFmpeg resources are allocated until first use.
50
+ * Convenience method to create a dictionary from a plain object.
75
51
  *
76
- * Direct wrapper around AVDictionary.
52
+ * @param obj - Object with string key-value pairs
53
+ * @param flags - Flags for setting entries
54
+ * @returns New dictionary with entries from object
77
55
  *
78
56
  * @example
79
57
  * ```typescript
80
- * import { Dictionary, FFmpegError } from 'node-av';
81
- *
82
- * const dict = new Dictionary();
83
- * const ret = dict.set('key', 'value', 0); // Auto-allocates on first use
84
- * FFmpegError.throwIfError(ret, 'set');
58
+ * const metadata = Dictionary.fromObject({
59
+ * 'title': 'My Song',
60
+ * 'album': 'My Album',
61
+ * 'date': '2024',
62
+ * 'track': '1/10'
63
+ * });
64
+ *
65
+ * // Use for codec options
66
+ * const options = Dictionary.fromObject({
67
+ * 'preset': 'medium',
68
+ * 'crf': '23',
69
+ * 'profile': 'high'
70
+ * });
85
71
  * ```
86
72
  */
87
- constructor();
73
+ static fromObject(obj: Record<string, string>, flags?: AVDictFlag): Dictionary;
88
74
  /**
89
- * Create a Dictionary wrapper from an existing native dictionary.
90
- * Used internally when wrapping dictionaries from FFmpeg.
75
+ * Create dictionary from native instance.
76
+ *
77
+ * @param native - Native dictionary instance
78
+ * @returns Dictionary wrapper
79
+ *
91
80
  * @internal
92
81
  */
93
82
  static fromNative(native: NativeDictionary): Dictionary;
94
83
  /**
95
- * Create a Dictionary from a JavaScript object.
84
+ * Allocate a dictionary.
96
85
  *
97
- * Converts a plain JavaScript object to a Dictionary.
98
- * Useful for converting option objects to FFmpeg format.
86
+ * Allocates memory for the dictionary structure.
87
+ * Must be called before using the dictionary.
99
88
  *
100
- * @param obj - Object with string key-value pairs
101
- * @param flags - AV_DICT_* flags for set operations
89
+ * Direct mapping to av_dict_alloc().
102
90
  *
103
- * @returns New Dictionary containing all entries from the object
104
- *
105
- * @example
106
- * ```typescript
107
- * import { Dictionary } from 'node-av';
108
- *
109
- * const options = {
110
- * bitrate: '128k',
111
- * preset: 'fast',
112
- * crf: '23'
113
- * };
114
- *
115
- * const dict = Dictionary.fromObject(options);
116
- * // Use with codec or format context
117
- * await codecContext.open2(codec, dict);
118
- * dict.free();
119
- * ```
120
- */
121
- static fromObject(obj: Record<string, string>, flags?: AVDictFlag): Dictionary;
122
- /**
123
- * Allocate a new dictionary.
124
- *
125
- * Usually not needed as set() will auto-allocate.
126
- * This is mainly for compatibility - FFmpeg doesn't have explicit av_dict_alloc.
91
+ * @throws {Error} If allocation fails (ENOMEM)
127
92
  *
128
93
  * @example
129
94
  * ```typescript
130
95
  * const dict = new Dictionary();
131
- * dict.alloc(); // Explicit allocation (optional)
96
+ * dict.alloc();
97
+ * // Dictionary is now ready for use
132
98
  * ```
99
+ *
100
+ * @see {@link free} To deallocate
133
101
  */
134
102
  alloc(): void;
135
103
  /**
136
- * Free all the memory allocated for an AVDictionary struct and all keys and values.
104
+ * Free the dictionary.
137
105
  *
138
- * Direct mapping to av_dict_free()
139
- * After calling this, the dictionary is empty and can be reused.
106
+ * Releases all memory associated with the dictionary.
107
+ * The dictionary becomes invalid after calling this.
108
+ *
109
+ * Direct mapping to av_dict_free().
140
110
  *
141
111
  * @example
142
112
  * ```typescript
143
113
  * dict.free();
144
- * // Dictionary is now empty and can be reused
145
- * dict.set('new_key', 'new_value', 0);
114
+ * // Dictionary is now invalid
146
115
  * ```
116
+ *
117
+ * @see {@link alloc} To allocate
118
+ * @see {@link Symbol.dispose} For automatic cleanup
147
119
  */
148
120
  free(): void;
149
121
  /**
150
- * Copy entries from this dictionary to destination.
151
- *
152
- * Copies all entries to the destination dictionary.
153
- * Destination entries can be preserved or overwritten based on flags.
122
+ * Copy entries to another dictionary.
154
123
  *
155
- * Direct mapping to av_dict_copy()
124
+ * Copies all entries from this dictionary to the destination.
156
125
  *
157
- * @param dst - Target dictionary to copy to
158
- * @param flags - AV_DICT_* flags for the copy operation
126
+ * Direct mapping to av_dict_copy().
159
127
  *
128
+ * @param dst - Destination dictionary
129
+ * @param flags - Copy flags
160
130
  * @returns 0 on success, negative AVERROR on error:
161
- * - 0: Success
162
- * - AVERROR(ENOMEM): Memory allocation failure
131
+ * - AVERROR_ENOMEM: Memory allocation failure
163
132
  *
164
133
  * @example
165
134
  * ```typescript
166
- * import { Dictionary, FFmpegError } from 'node-av';
167
- *
168
- * const src = new Dictionary();
169
- * src.set('key1', 'value1');
170
- * src.set('key2', 'value2');
135
+ * import { FFmpegError } from 'node-av';
171
136
  *
172
137
  * const dst = new Dictionary();
138
+ * dst.alloc();
173
139
  * const ret = src.copy(dst);
174
140
  * FFmpegError.throwIfError(ret, 'copy');
175
141
  * ```
176
- *
177
- * @note Common flags:
178
- * - AVFLAG_NONE: Default behavior
179
- * - AV_DICT_DONT_OVERWRITE: Don't overwrite existing entries
180
- * - AV_DICT_MULTIKEY: Allow multiple entries with same key
181
142
  */
182
143
  copy(dst: Dictionary, flags?: AVDictFlag): number;
183
144
  /**
184
- * Set the given entry in the dictionary.
185
- *
186
- * Adds or modifies a key-value pair in the dictionary.
187
- * If key or value are empty, the entry is deleted.
188
- * The dictionary will be auto-allocated on first call if needed.
145
+ * Set a dictionary entry.
189
146
  *
190
- * Direct mapping to av_dict_set()
147
+ * Sets or updates a key-value pair in the dictionary.
191
148
  *
192
- * @param key - Entry key to add/modify
193
- * @param value - Entry value to add/modify
194
- * @param flags - AV_DICT_* flags
149
+ * Direct mapping to av_dict_set().
195
150
  *
151
+ * @param key - Entry key
152
+ * @param value - Entry value
153
+ * @param flags - Set flags (e.g., AV_DICT_DONT_OVERWRITE)
196
154
  * @returns 0 on success, negative AVERROR on error:
197
- * - 0: Success
198
- * - AVERROR(ENOMEM): Memory allocation failure
155
+ * - AVERROR_ENOMEM: Memory allocation failure
199
156
  *
200
157
  * @example
201
158
  * ```typescript
202
- * import { Dictionary, FFmpegError } from 'node-av';
159
+ * import { FFmpegError } from 'node-av';
203
160
  * import { AV_DICT_DONT_OVERWRITE } from 'node-av/constants';
204
161
  *
205
- * const ret1 = dict.set('bitrate', '128k');
206
- * FFmpegError.throwIfError(ret1, 'set bitrate');
207
- *
208
- * const ret2 = dict.set('preset', 'fast', AV_DICT_DONT_OVERWRITE);
209
- * FFmpegError.throwIfError(ret2, 'set preset');
162
+ * // Set or update entry
163
+ * let ret = dict.set('bitrate', '128k');
164
+ * FFmpegError.throwIfError(ret, 'set');
210
165
  *
211
- * // Delete an entry
212
- * dict.set('bitrate', '');
166
+ * // Set only if not exists
167
+ * ret = dict.set('preset', 'fast', AV_DICT_DONT_OVERWRITE);
168
+ * FFmpegError.throwIfError(ret, 'set');
213
169
  * ```
214
170
  *
215
- * @note Common flags:
216
- * - AVFLAG_NONE: Default behavior (replace existing, copy strings)
217
- * - AV_DICT_DONT_OVERWRITE: Don't overwrite existing entries
218
- * - AV_DICT_APPEND: Append to existing value (with comma separator)
219
- * - AV_DICT_MULTIKEY: Allow multiple entries with same key
220
- * - AV_DICT_MATCH_CASE: Case sensitive key matching
171
+ * @see {@link get} To retrieve values
221
172
  */
222
173
  set(key: string, value: string, flags?: AVDictFlag): number;
223
174
  /**
224
- * Get a dictionary entry with matching key.
175
+ * Get a dictionary entry.
225
176
  *
226
- * Direct mapping to av_dict_get()
177
+ * Retrieves the value for a given key.
227
178
  *
228
- * @param key - Key to search for
229
- * @param flags - AV_DICT_* flags for matching
179
+ * Direct mapping to av_dict_get().
230
180
  *
231
- * @returns Entry value or null if not found
181
+ * @param key - Entry key to look up
182
+ * @param flags - Search flags (e.g., AV_DICT_IGNORE_SUFFIX)
183
+ * @returns Entry value, or null if not found
232
184
  *
233
185
  * @example
234
186
  * ```typescript
@@ -237,20 +189,21 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
237
189
  * console.log(`Bitrate: ${value}`);
238
190
  * }
239
191
  *
240
- * // Case sensitive search
192
+ * // Case-insensitive search
193
+ * import { AV_DICT_MATCH_CASE } from 'node-av/constants';
241
194
  * const title = dict.get('Title', AV_DICT_MATCH_CASE);
242
195
  * ```
243
196
  *
244
- * Common flags:
245
- * - AVFLAG_NONE: Default (case insensitive)
246
- * - AV_DICT_MATCH_CASE: Case sensitive matching
247
- * - AV_DICT_IGNORE_SUFFIX: Match entries starting with key
197
+ * @see {@link set} To set values
198
+ * @see {@link getAll} To get all entries
248
199
  */
249
200
  get(key: string, flags?: AVDictFlag): string | null;
250
201
  /**
251
- * Get number of entries in dictionary.
202
+ * Count dictionary entries.
203
+ *
204
+ * Returns the number of key-value pairs in the dictionary.
252
205
  *
253
- * Direct mapping to av_dict_count()
206
+ * Direct mapping to av_dict_count().
254
207
  *
255
208
  * @returns Number of entries
256
209
  *
@@ -262,89 +215,86 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
262
215
  */
263
216
  count(): number;
264
217
  /**
265
- * Get all entries as a JavaScript object.
218
+ * Get all dictionary entries.
266
219
  *
267
- * Helper method for easier access from JavaScript.
268
- * Internally iterates through all entries using av_dict_get().
220
+ * Returns all key-value pairs as a JavaScript object.
269
221
  *
270
- * @returns Object with all key-value pairs
222
+ * @returns Object with all entries
271
223
  *
272
224
  * @example
273
225
  * ```typescript
274
- * const allOptions = dict.getAll();
275
- * for (const [key, value] of Object.entries(allOptions)) {
226
+ * const entries = dict.getAll();
227
+ * for (const [key, value] of Object.entries(entries)) {
276
228
  * console.log(`${key}: ${value}`);
277
229
  * }
278
- *
279
- * // Check if dictionary is empty
280
- * if (Object.keys(dict.getAll()).length === 0) {
281
- * console.log('Dictionary is empty');
282
- * }
283
230
  * ```
231
+ *
232
+ * @see {@link get} To get individual entries
284
233
  */
285
234
  getAll(): Record<string, string>;
286
235
  /**
287
- * Parse the key/value pairs from a string.
236
+ * Parse entries from a string.
288
237
  *
289
- * Parses a formatted string into key-value pairs.
290
- * Supports both single and multi-character separators.
238
+ * Parses key-value pairs from a formatted string and adds them
239
+ * to the dictionary.
291
240
  *
292
- * Direct mapping to av_dict_parse_string()
293
- *
294
- * @param str - String to parse (e.g., "key1=value1:key2=value2")
295
- * @param keyValSep - String separator between key and value (e.g., '=' or ':=')
296
- * @param pairsSep - String separator between pairs (e.g., ':' or ',' or ';')
297
- * @param flags - AV_DICT_* flags (default: AVFLAG_NONE)
241
+ * Direct mapping to av_dict_parse_string().
298
242
  *
243
+ * @param str - String to parse
244
+ * @param keyValSep - Separator between key and value
245
+ * @param pairsSep - Separator between pairs
246
+ * @param flags - Parse flags
299
247
  * @returns 0 on success, negative AVERROR on error:
300
- * - 0: Success
301
- * - AVERROR(EINVAL): Invalid parameters
302
- * - AVERROR(ENOMEM): Memory allocation failure
248
+ * - AVERROR_EINVAL: Invalid format
249
+ * - AVERROR_ENOMEM: Memory allocation failure
303
250
  *
304
251
  * @example
305
252
  * ```typescript
306
- * import { Dictionary, FFmpegError } from 'node-av';
253
+ * import { FFmpegError } from 'node-av';
307
254
  *
308
- * // Parse codec options with single-char separators
309
- * const ret = dict.parseString('bitrate=128k:preset=fast', '=', ':');
255
+ * // Parse colon-separated pairs
256
+ * let ret = dict.parseString('key1=val1:key2=val2', '=', ':');
310
257
  * FFmpegError.throwIfError(ret, 'parseString');
311
258
  *
312
- * // Parse with multi-char separators
313
- * const ret2 = dict.parseString('title:=My Video;;artist:=Me', ':=', ';;');
314
- * FFmpegError.throwIfError(ret2, 'parseString');
259
+ * // Parse comma-separated pairs
260
+ * ret = dict.parseString('width=1920,height=1080', '=', ',');
261
+ * FFmpegError.throwIfError(ret, 'parseString');
315
262
  * ```
316
263
  *
317
- * @see {@link getString} To convert back to string
264
+ * @see {@link getString} To serialize to string
318
265
  */
319
266
  parseString(str: string, keyValSep: string, pairsSep: string, flags?: AVDictFlag): number;
320
267
  /**
321
- * Get dictionary as a string.
268
+ * Convert dictionary to string.
322
269
  *
323
- * Direct mapping to av_dict_get_string()
270
+ * Serializes all entries to a formatted string.
324
271
  *
325
- * @param keyValSep - Character to separate key from value
326
- * @param pairsSep - Character to separate pairs
272
+ * Direct mapping to av_dict_get_string().
327
273
  *
328
- * @returns String representation or null on error
274
+ * @param keyValSep - Separator between key and value
275
+ * @param pairsSep - Separator between pairs
276
+ * @returns Formatted string, or null on error
329
277
  *
330
278
  * @example
331
279
  * ```typescript
280
+ * // Serialize to colon-separated format
332
281
  * const str = dict.getString('=', ':');
333
- * console.log(str); // "key1=value1:key2=value2"
282
+ * console.log(str); // "key1=val1:key2=val2"
334
283
  *
335
- * // Export as comma-separated
284
+ * // Serialize to comma-separated format
336
285
  * const csv = dict.getString('=', ',');
337
- * console.log(csv); // "key1=value1,key2=value2"
286
+ * console.log(csv); // "key1=val1,key2=val2"
338
287
  * ```
339
288
  *
340
- * @see parseString() - To parse a string back to dictionary
289
+ * @see {@link parseString} To parse from string
341
290
  */
342
291
  getString(keyValSep: string, pairsSep: string): string | null;
343
292
  /**
344
- * Get the native FFmpeg AVDictionary pointer.
293
+ * Get the underlying native Dictionary object.
294
+ *
295
+ * @returns The native Dictionary binding object
345
296
  *
346
- * @internal For use by other wrapper classes
347
- * @returns The underlying native dictionary object
297
+ * @internal
348
298
  */
349
299
  getNative(): NativeDictionary;
350
300
  /**
@@ -355,17 +305,13 @@ export declare class Dictionary implements Disposable, NativeWrapper<NativeDicti
355
305
  *
356
306
  * @example
357
307
  * ```typescript
358
- * import { Dictionary, FFmpegError } from 'node-av';
359
- *
360
308
  * {
361
309
  * using dict = new Dictionary();
362
- * const ret = dict.set('key', 'value', 0);
363
- * FFmpegError.throwIfError(ret, 'set');
364
- * // ... use dictionary
310
+ * dict.alloc();
311
+ * dict.set('key', 'value');
312
+ * // Use dict...
365
313
  * } // Automatically freed when leaving scope
366
314
  * ```
367
- *
368
- * @see {@link free} For manual cleanup
369
315
  */
370
316
  [Symbol.dispose](): void;
371
317
  }