bare-ffmpeg 1.0.0-30 → 1.0.0-31

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/README.md CHANGED
@@ -839,6 +839,12 @@ Gets the MIME type for this input format.
839
839
 
840
840
  **Returns**: `string` - The MIME type (e.g., `'audio/webm,audio/x-matroska,video/webm,video/x-matroska'`)
841
841
 
842
+ ##### `InputFormat.name`
843
+
844
+ Returns format name
845
+
846
+ **Returns**: `string` - The short-name (e.g., `webm`)
847
+
842
848
  #### Example
843
849
 
844
850
  ```js
@@ -883,6 +889,12 @@ Gets the MIME type for this output format.
883
889
 
884
890
  **Returns**: `string` - The MIME type (e.g., `'video/webm'`, `'video/mp4'`)
885
891
 
892
+ ##### `OutputFormat.name`
893
+
894
+ Returns format name
895
+
896
+ **Returns**: `string` - The short-name (e.g., `webm`)
897
+
886
898
  #### Example
887
899
 
888
900
  ```js
package/binding.cc CHANGED
@@ -397,6 +397,15 @@ bare_ffmpeg_input_format_get_mime_type(
397
397
  return context->handle->mime_type;
398
398
  }
399
399
 
400
+ static std::string
401
+ bare_ffmpeg_input_format_get_name(
402
+ js_env_t *env,
403
+ js_receiver_t,
404
+ js_arraybuffer_span_of_t<bare_ffmpeg_input_format_t, 1> context
405
+ ) {
406
+ return context->handle->name;
407
+ }
408
+
400
409
  static js_arraybuffer_t
401
410
  bare_ffmpeg_format_context_open_input_with_io(
402
411
  js_env_t *env,
@@ -542,6 +551,15 @@ bare_ffmpeg_output_format_get_mime_type(
542
551
  return context->handle->mime_type;
543
552
  }
544
553
 
554
+ static std::string
555
+ bare_ffmpeg_output_format_get_name(
556
+ js_env_t *env,
557
+ js_receiver_t,
558
+ js_arraybuffer_span_of_t<bare_ffmpeg_output_format_t, 1> context
559
+ ) {
560
+ return context->handle->name;
561
+ }
562
+
545
563
  static void
546
564
  bare_ffmpeg_format_context_close_output(
547
565
  js_env_t *env,
@@ -4052,11 +4070,13 @@ bare_ffmpeg_exports(js_env_t *env, js_value_t *exports) {
4052
4070
  V("getInputFormatFlags", bare_ffmpeg_input_format_get_flags)
4053
4071
  V("getInputFormatExtensions", bare_ffmpeg_input_format_get_extensions)
4054
4072
  V("getInputFormatMimeType", bare_ffmpeg_input_format_get_mime_type)
4073
+ V("getInputFormatName", bare_ffmpeg_input_format_get_name)
4055
4074
 
4056
4075
  V("initOutputFormat", bare_ffmpeg_output_format_init)
4057
4076
  V("getOutputFormatFlags", bare_ffmpeg_output_format_get_flags)
4058
4077
  V("getOutputFormatExtensions", bare_ffmpeg_output_format_get_extensions)
4059
4078
  V("getOutputFormatMimeType", bare_ffmpeg_output_format_get_mime_type)
4079
+ V("getOutputFormatName", bare_ffmpeg_output_format_get_name)
4060
4080
 
4061
4081
  V("openInputFormatContextWithIO", bare_ffmpeg_format_context_open_input_with_io)
4062
4082
  V("openInputFormatContextWithFormat", bare_ffmpeg_format_context_open_input_with_format)
@@ -40,9 +40,14 @@ module.exports = class FFmpegInputFormat {
40
40
  return binding.getInputFormatMimeType(this._handle)
41
41
  }
42
42
 
43
+ get name() {
44
+ return binding.getInputFormatName(this._handle)
45
+ }
46
+
43
47
  [Symbol.for('bare.inspect')]() {
44
48
  return {
45
49
  __proto__: { constructor: FFmpegInputFormat },
50
+ name: this.name,
46
51
  flags: this.flags,
47
52
  extensions: this.extensions,
48
53
  mimeType: this.mimeType
@@ -22,9 +22,14 @@ module.exports = class FFmpegOutputFormat {
22
22
  return binding.getOutputFormatMimeType(this._handle)
23
23
  }
24
24
 
25
+ get name() {
26
+ return binding.getOutputFormatName(this._handle)
27
+ }
28
+
25
29
  [Symbol.for('bare.inspect')]() {
26
30
  return {
27
31
  __proto__: { constructor: FFmpegOutputFormat },
32
+ name: this.name,
28
33
  flags: this.flags,
29
34
  extensions: this.extensions,
30
35
  mimeType: this.mimeType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-ffmpeg",
3
- "version": "1.0.0-30",
3
+ "version": "1.0.0-31",
4
4
  "description": "Low-level FFmpeg bindings for Bare",
5
5
  "exports": {
6
6
  ".": "./index.js",