cbindgen-based API for C/C++ users.
The API is far from stable
- Basic encoding usage
- OBU Sequence Header for mkv/mp4 support
- Documentation
- TimeInfo/generic data pinning
- pkg-conf
.pc
generation - Examples
- Install target
You may generate the library and the header file using.
Currently it requires nightly to expand the macros.
A quite simple makefile is provided:
# Build librav1e.a, rav1e.h and rav1e.pc
$ make
# Install librav1e.a, rav1e.h and rav1e.pc
$ make DESTDIR=${D} prefix=${prefix} libdir=${libdir} install
# Remove librav1e.a, rav1e.h and rav1e.pc
$ make DESTDIR=${D} prefix=${prefix} libdir=${libdir} uninstall
Currently cargo install
does not work for libraries.
$ cargo build
or
$ cargo build --release
The header will be available as include/rav1e.h
, the library will be in target/<debug or release>/librav1e.<so or dylib>
Look in c-examples
for working examples.
I suggest to use the cargo paths override to have a local rav1e
:
# Clone the trees
$ git clone https://github.com/xiph/rav1e
$ git clone https://github.com/lu_zero/crav1e
# Setup the override
$ cd crav1e
$ mkdir .cargo
$ echo 'paths=["../rav1e"]' > .cargo/config
# Check it is doing the right thing
$ cargo build