bare-ffmpeg 1.0.0-31 → 1.0.0-33

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 (45) hide show
  1. package/CMakeLists.txt +31 -9
  2. package/README.md +65 -1771
  3. package/binding.cc +735 -1
  4. package/cmake/ports/ffmpeg/port.cmake +8 -9
  5. package/cmake/ports/libdrm/port.cmake +32 -0
  6. package/cmake/ports/libva/port.cmake +53 -0
  7. package/cmake/ports/x264/port.cmake +7 -2
  8. package/index.js +7 -4
  9. package/lib/codec-context.js +16 -33
  10. package/lib/codec-parameters.js +38 -23
  11. package/lib/codec.js +1 -0
  12. package/lib/constants.js +122 -8
  13. package/lib/errors.js +3 -15
  14. package/lib/filter-graph.js +1 -6
  15. package/lib/filter-inout.js +1 -4
  16. package/lib/format-context.js +4 -15
  17. package/lib/frame.js +20 -4
  18. package/lib/hw-device-context.js +31 -0
  19. package/lib/hw-frames-constraints.js +54 -0
  20. package/lib/hw-frames-context.js +92 -0
  21. package/lib/image.js +1 -3
  22. package/lib/packet.js +1 -6
  23. package/lib/rational.js +1 -4
  24. package/lib/resampler.js +1 -5
  25. package/lib/samples.js +2 -13
  26. package/lib/scaler.js +1 -7
  27. package/lib/stream.js +2 -8
  28. package/package.json +2 -2
  29. package/prebuilds/android-arm/bare-ffmpeg.bare +0 -0
  30. package/prebuilds/android-arm64/bare-ffmpeg.bare +0 -0
  31. package/prebuilds/android-ia32/bare-ffmpeg.bare +0 -0
  32. package/prebuilds/android-x64/bare-ffmpeg.bare +0 -0
  33. package/prebuilds/darwin-arm64/bare-ffmpeg.bare +0 -0
  34. package/prebuilds/darwin-x64/bare-ffmpeg.bare +0 -0
  35. package/prebuilds/ios-arm64/bare-ffmpeg.bare +0 -0
  36. package/prebuilds/ios-arm64-simulator/bare-ffmpeg.bare +0 -0
  37. package/prebuilds/ios-x64-simulator/bare-ffmpeg.bare +0 -0
  38. package/prebuilds/linux-arm64/bare-ffmpeg/libva-drm.so.2 +0 -0
  39. package/prebuilds/linux-arm64/bare-ffmpeg/libva.so.2 +0 -0
  40. package/prebuilds/linux-arm64/bare-ffmpeg.bare +0 -0
  41. package/prebuilds/linux-x64/bare-ffmpeg/libva-drm.so.2 +0 -0
  42. package/prebuilds/linux-x64/bare-ffmpeg/libva.so.2 +0 -0
  43. package/prebuilds/linux-x64/bare-ffmpeg.bare +0 -0
  44. package/prebuilds/win32-arm64/bare-ffmpeg.bare +0 -0
  45. package/prebuilds/win32-x64/bare-ffmpeg.bare +0 -0
package/CMakeLists.txt CHANGED
@@ -6,11 +6,25 @@ find_package(cmake-ports REQUIRED PATHS node_modules/cmake-ports)
6
6
 
7
7
  project(bare_ffmpeg C CXX)
8
8
 
9
+ option(BARE_FFMPEG_ENABLE_GPL "Enable GPL-licensed features (e.g., x264)" OFF)
10
+
9
11
  fetch_package("github:holepunchto/libjstl#098664c")
10
12
 
11
- find_port(ffmpeg FEATURES dav1d svt-av1 opus)
13
+ set(ffmpeg_features dav1d svt-av1 opus)
14
+
15
+ if(BARE_FFMPEG_ENABLE_GPL)
16
+ list(APPEND ffmpeg_features gpl x264)
17
+ endif()
18
+
19
+ find_port(ffmpeg FEATURES ${ffmpeg_features})
20
+
21
+ set(install_targets)
12
22
 
13
- add_bare_module(bare_ffmpeg)
23
+ if(LINUX)
24
+ list(APPEND install_targets TARGET va TARGET va-drm)
25
+ endif()
26
+
27
+ add_bare_module(bare_ffmpeg INSTALL ${install_targets})
14
28
 
15
29
  harden(${bare_ffmpeg})
16
30
 
@@ -20,14 +34,22 @@ target_sources(
20
34
  binding.cc
21
35
  )
22
36
 
37
+ set(link_libraries
38
+ avcodec
39
+ avdevice
40
+ avformat
41
+ avutil
42
+ swresample
43
+ swscale
44
+ jstl
45
+ )
46
+
47
+ if(LINUX)
48
+ list(APPEND link_libraries va va-drm)
49
+ endif()
50
+
23
51
  target_link_libraries(
24
52
  ${bare_ffmpeg}
25
53
  PRIVATE
26
- avcodec
27
- avdevice
28
- avformat
29
- avutil
30
- swresample
31
- swscale
32
- jstl
54
+ ${link_libraries}
33
55
  )