Skip to content

Enable HW acceleration for macOS - #50

Open
brodo wants to merge 13 commits into
allyourcodebase:videotoolboxfrom
brodo:videotoolbox
Open

brodo wants to merge 13 commits into
allyourcodebase:videotoolboxfrom
brodo:videotoolbox

Conversation

@brodo

@brodo brodo commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

The problem was that the *_list.c files generated by the upstream configure script depend on which libraries are available on the host they are created on. And the host that created the ones that were committed did not have videotoolbox.

The function I added creates these list files based on the config in the build script. That also saves us from keeping them up to date manually.

I also rebased master on top of this.

Tropid and others added 13 commits August 13, 2026 17:59
Removes some fields not existing anymore and adds the alpha mode field.
- The config came from a Linux configure run with the POSIX feature
  flags hardcoded. Take the ones that differ on mingw32 from the target.
- Use w32threads, and link ws2_32 and bcrypt.
- NASM was always called with -f elf64. Pick the object format from the
  target.
- Comment out the d3d11va, d3d12va, Media Foundation, ddagrab and
  macos_kperf files. Their CONFIG_* are false, so the types they use are
  never declared and they do not compile. The dxva2 files next to them
  were already commented out for the same reason.
- Gate unix.c and ff_unix_protocol on a new /U/ prefix, meaning every
  target but Windows. They need sys/un.h.
- Restore compat/w32pthreads.h, which missed the n8.1.1 update that made
  thread.h call win32_thread_setname.
still not fully working, when using this dependency with awebo
it will still fail to find `hevc_videotoolbox` and `h264_videotoolbox`

# Conflicts:
#	build.zig
Skip them in categorizeSources.
The upstream configure script autodetects available libraries.
This is not helpful for cross compilation. The new function
in build.zig generates the list files from the config in
build.zig.
@brodo
brodo marked this pull request as ready for review September 27, 2026 10:59
@brodo brodo changed the title WIP: Enable HW acceleration for macOS Enable HW acceleration for macOS Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants