Giter Site home page Giter Site logo

dav1d-rs's Introduction

Rust-AV

Actions Status CodeCov dependency status IRC LICENSE

Pure-rust implementation of multimedia primitives and eventually some examples of demuxers, muxers and codecs.

Compiling

cargo build --workspace

Running tests

cargo test --workspace

Examples

Examples can be found in the examples repository.

Notes

The code is still in flux and the API is getting slowly fleshed out, please refer to the sub-crates. Until we reach version 1.0 assume that the API could change a lot.

License

Released under the MIT License.

Developing

I suggest to use the cargo paths override to have a local rust-av:

# Clone the trees
$ git clone https://github.com/rust-av/rust-av
$ git clone https://github.com/rust-av/${other package}
# Setup the override
$ cd ${other package}
$ mkdir .cargo
$ echo 'paths=["../rust-av"]' > .cargo/config
# Check it is doing the right thing
$ cargo build

Getting in Touch

Come chat with us on our IRC channel clicking the badge above! You can also use a web client to join with a web browser.

Otherwise, you can open a new discussion explaining your idea or problem as best as possible.

dav1d-rs's People

Contributors

aeikum avatar cuviper avatar dependabot-preview[bot] avatar dependabot[bot] avatar derzade avatar eclipseo avatar ewouth avatar linkmauve avatar lu-zero avatar luni-4 avatar philn avatar ppergame avatar sdroege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dav1d-rs's Issues

Dependabot can't resolve your Rust dependency files

Dependabot can't resolve your Rust dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

    Updating crates.io index
error: failed to select a version for the requirement `dav1d = "^0.4.0"`
  candidate versions found which didn't match: 0.5.0
  location searched: /home/dependabot/dependabot-updater/dependabot_tmp_dir/home/dependabot/dependabot-updater/dependabot_tmp_dir/tools)`

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Fails to build w/ dav1d 1.0.0

error[E0609]: no field `n_frame_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:111:29
    |
111 |         self.dav1d_settings.n_frame_threads = n_frame_threads as i32;
    |                             ^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

error[E0609]: no field `n_frame_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:115:29
    |
115 |         self.dav1d_settings.n_frame_threads as u32
    |                             ^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

error[E0609]: no field `n_tile_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:119:29
    |
119 |         self.dav1d_settings.n_tile_threads = n_tile_threads as i32;
    |                             ^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

error[E0609]: no field `n_tile_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:123:29
    |
123 |         self.dav1d_settings.n_tile_threads as u32
    |                             ^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

error[E0609]: no field `n_postfilter_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:159:29
    |
159 |         self.dav1d_settings.n_postfilter_threads = n_postfilter_threads as i32;
    |                             ^^^^^^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

error[E0609]: no field `n_postfilter_threads` on type `dav1d_sys::Dav1dSettings`
   --> /buildstream/carbonOS/pkgs/gstreamer/plugins/dav1d.bst/crates/dav1d-0.7.0/src/lib.rs:163:29
    |
163 |         self.dav1d_settings.n_postfilter_threads as u32
    |                             ^^^^^^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `n_threads`, `max_frame_delay`, `apply_grain`, `operating_point`, `all_layers` ... and 7 others

Broken by libavif 1.0.0

Without modifications to

pub fn get_picture(&mut self) -> Result<Picture, Error> {
		unsafe {
			let mut pic: Dav1dPicture = mem::zeroed();
			let mut ret = -11;

			while ret == -11 {
				ret = dav1d_get_picture(self.dec, &mut pic);
			}

			if ret < 0 {
				Err(Error(ret))
			} else {
				let inner = InnerPicture { pic };
				Ok(Picture {
					inner: Arc::new(inner),
				})
			}
		}
	}

Fails to decode with 1.0.0, after returning -11. With modification works fine. Apparently -11 is dav1d's way of spelling EAGAIN, and it expects you to keep requesting the picture. Here's how libheif dealt with this https://github.com/strukturag/libheif/blob/0f8496f22d284e1a69df12fe0b72f375aed31315/libheif/heif_decoder_dav1d.cc#L178-L183

See this for investigation image-rs/image#1647

Build failure with SYSTEM_DEPS_DAV1D_BUILD_INTERNAL=always

I haven't had a chance to investigate much, but since the release of 0.9.5, I've been seeing CI failures for image crate builds that use dav1d. I believe the relevant output is...

  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dav1d-sys-0.7.2/build.rs:83:10:
  called `Result::unwrap()` on an `Err` value: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" PKG_CONFIG_PATH="" "pkg-config" "--libs" "--cflags" "dav1d" "dav1d >= 1.0.0" "dav1d <= 1.2.1"` did not exit successfully: exit status: 1
  error: could not find system library 'dav1d' required by the 'dav1d-sys' crate

  --- stderr
  Package dav1d was not found in the pkg-config search path.
  Perhaps you should add the directory containing `dav1d.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'dav1d' found
  Package dav1d was not found in the pkg-config search path.
  Perhaps you should add the directory containing `dav1d.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'dav1d' found
  Package dav1d was not found in the pkg-config search path.
  Perhaps you should add the directory containing `dav1d.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'dav1d' found

Clippy warns about `Arc<InnerPicture>`

error: usage of an `Arc` that is not `Send` and `Sync`                                                                                                                                                             
   --> src/lib.rs:416:28                                                                                                                                                                                           
    |                                                                                                                                                                                                              
416 |                     inner: Arc::new(inner),                                                                                                                                                                  
    |                            ^^^^^^^^^^^^^^^                                                                                                                                                                   
    |                                                                                                                                                                                                              
    = note: `Arc<InnerPicture>` is not `Send` and `Sync` as:                                                                                                                                                       
    = note: - the trait `Send` is not implemented for `InnerPicture`                                                                                                                                               
    = note: - the trait `Sync` is not implemented for `InnerPicture`                                                                                                                                               
    = help: consider using an `Rc` instead. `Arc` does not provide benefits for non `Send` and `Sync` types                                                                                                        
    = note: if you intend to use `Arc` with `Send` and `Sync` traits                                                                                                                                               
    = note: wrap the inner type with a `Mutex` or implement `Send` and `Sync` for `InnerPicture`                                                                                                                   
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync                                                                                         
    = note: `-D clippy::arc-with-non-send-sync` implied by `-D warnings`                                                                                                                                           
    = help: to override `-D warnings` add `#[allow(clippy::arc_with_non_send_sync)]`

We could either implement Send+Sync for InnerPicture, or wrap it in a Rc<>. afaik the picture data is immutable.

Doesn't support build or static linking

I'm trying to run rav1e's arm64 dav1d tests using static build of libdav1d, but either the system-deps crate isn't working properly, or there's something wrong with its integration.

I'm setting SYSTEM_DEPS_DAV1D_LINK=static and SYSTEM_DEPS_DAV1D_BUILD_INTERNAL=auto (also tried always, same result), and system-deps builds it, but then unnecessarily falls back to pkg-config, misconfigures it, and ends up incorrectly linking dynamically.

https://github.com/kornelski/rav1e/blob/9f257e6870c36efb683ec19d1974db3746113296/.github/workflows/rav1e.yml#L197-L198

2023-10-07T17:40:04.1810201Z ##[group]Run cargo test -vv --lib --verbose --release --target=aarch64-unknown-linux-gnu \
2023-10-07T17:40:04.1810705Z �[36;1mcargo test -vv --lib --verbose --release --target=aarch64-unknown-linux-gnu \�[0m
2023-10-07T17:40:04.1811311Z �[36;1m           --no-default-features --features=asm,decode_test_dav1d -- \�[0m
2023-10-07T17:40:04.1811633Z �[36;1m           --include-ignored�[0m
2023-10-07T17:40:04.1866898Z shell: /usr/bin/bash -e {0}
2023-10-07T17:40:04.1867137Z env:
2023-10-07T17:40:04.1867359Z   RUST_BACKTRACE: full
2023-10-07T17:40:04.1867612Z   RUSTC_WRAPPER: sccache
2023-10-07T17:40:04.1867845Z   SCCACHE_CACHE_SIZE: 300M
2023-10-07T17:40:04.1868117Z   SCCACHE_DIR: /home/runner/.cache/sccache
2023-10-07T17:40:04.1868390Z   SCCACHE_IDLE_TIMEOUT: 0
2023-10-07T17:40:04.1868622Z   CARGO_INCREMENTAL: 0
2023-10-07T17:40:04.1868866Z   CARGO_TERM_COLOR: always
2023-10-07T17:40:04.1869168Z   CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER: qemu-aarch64
2023-10-07T17:40:04.1869547Z   CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS: -Clinker=aarch64-linux-gnu-gcc
2023-10-07T17:40:04.1869996Z   PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
2023-10-07T17:40:04.1870295Z   PKG_CONFIG_SYSROOT_DIR: /
2023-10-07T17:40:04.1870568Z   SYSTEM_DEPS_DAV1D_BUILD_INTERNAL: auto
2023-10-07T17:40:04.1870843Z   SYSTEM_DEPS_DAV1D_LINK: static
2023-10-07T17:40:04.1871071Z ##[endgroup]
…
2023-10-07T17:42:22.4874510Z [dav1d-sys 0.7.1] [68/148] Generating 'src/libdav1d.a.p/loopfilter16_sse.obj'.
2023-10-07T17:42:24.1448553Z [dav1d-sys 0.7.1] [69/148] Generating 'src/libdav1d.a.p/itx16_avx2.obj'.
2023-10-07T17:42:25.0537801Z [dav1d-sys 0.7.1] [70/148] Generating 'src/libdav1d.a.p/itx16_sse.obj'.
2023-10-07T17:42:25.1853053Z [dav1d-sys 0.7.1] [71/148] Generating 'src/libdav1d.a.p/looprestoration16_sse.obj'.
2023-10-07T17:42:25.3430088Z [dav1d-sys 0.7.1] [72/148] Compiling C object src/libdav1d.a.p/cpu.c.o
…
2023-10-07T17:42:37.1729541Z [dav1d-sys 0.7.1] [144/148] Compiling C object tests/libfuzzer/dav1d_fuzzer_mt.p/dav1d_fuzzer.c.o
2023-10-07T17:42:37.1767906Z [dav1d-sys 0.7.1] [145/148] Linking target tests/libfuzzer/dav1d_fuzzer
2023-10-07T17:42:37.2335633Z [dav1d-sys 0.7.1] [146/148] Linking target tests/libfuzzer/dav1d_fuzzer_mt
2023-10-07T17:42:37.3429104Z [dav1d-sys 0.7.1] [147/148] Compiling C object tests/seek_stress.p/seek_stress.c.o
2023-10-07T17:42:37.4069424Z [dav1d-sys 0.7.1] [148/148] Linking target tests/seek_stress
2023-10-07T17:42:37.6326896Z [dav1d-sys 0.7.1] ninja: Entering directory `/home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/build'
2023-10-07T17:42:37.6921998Z [dav1d-sys 0.7.1] [1/10] Generating include/vcs_version.h with a custom command
2023-10-07T17:42:37.7017954Z [dav1d-sys 0.7.1] Installing src/libdav1d.a to /home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/release/lib/x86_64-linux-gnu
…
2023-10-07T17:42:37.7029154Z [dav1d-sys 0.7.1] Installing /home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/build/meson-private/dav1d.pc to /home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/release/lib/x86_64-linux-gnu/pkgconfig
2023-10-07T17:42:37.7373781Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=DAV1D_NO_PKG_CONFIG
2023-10-07T17:42:37.7374751Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7375619Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7376393Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
2023-10-07T17:42:37.7377183Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
2023-10-07T17:42:37.7378400Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7379352Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7379910Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
2023-10-07T17:42:37.7380386Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG
2023-10-07T17:42:37.7380988Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7381648Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7382221Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7383162Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7383912Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7384510Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7385029Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
2023-10-07T17:42:37.7385515Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG
2023-10-07T17:42:37.7386085Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7386685Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7387243Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
2023-10-07T17:42:37.7387748Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
2023-10-07T17:42:37.7388325Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7388946Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7389521Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
2023-10-07T17:42:37.7390037Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
2023-10-07T17:42:37.7390615Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7391262Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7391845Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7392384Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7400316Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7401216Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7402024Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7402778Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
2023-10-07T17:42:37.7403467Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG
2023-10-07T17:42:37.7404113Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7404798Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7405542Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_PATH
2023-10-07T17:42:37.7406906Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
2023-10-07T17:42:37.7407563Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7408267Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7409010Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_LIBDIR
2023-10-07T17:42:37.7409893Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
2023-10-07T17:42:37.7410490Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
2023-10-07T17:42:37.7411065Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
2023-10-07T17:42:37.7411579Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7412038Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
2023-10-07T17:42:37.7424476Z [dav1d-sys 0.7.1] cargo:rustc-link-search=native=//home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/release/lib/x86_64-linux-gnu
2023-10-07T17:42:37.7425316Z [dav1d-sys 0.7.1] cargo:rustc-link-lib=dav1d
2023-10-07T17:42:37.7425811Z [dav1d-sys 0.7.1] cargo:rustc-link-lib=dl
2023-10-07T17:42:37.7426588Z [dav1d-sys 0.7.1] cargo:include=//home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/release/include
2023-10-07T17:42:37.7427557Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_BUILD_INTERNAL
2023-10-07T17:42:37.7428396Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_LINK
2023-10-07T17:42:37.7431125Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LIB
2023-10-07T17:42:37.7436576Z �[0m�[0m�[1m�[32m     Running�[0m `CARGO=/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo CARGO_CRATE_NAME=dav1d_sys CARGO_MANIFEST_DIR=/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dav1d-sys-0.7.1 CARGO_PKG_AUTHORS='Luca Barbato <[email protected]>' CARGO_PKG_DESCRIPTION='FFI bindings to dav1d' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=dav1d-sys CARGO_PKG_README='' CARGO_PKG_REPOSITORY='https://github.com/rust-av/dav1d-rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.7.1 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=7 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/home/runner/work/rav1e/rav1e/target/release/deps:/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib' OUT_DIR=/home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out sccache /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name dav1d_sys --edition=2021 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dav1d-sys-0.7.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C debuginfo=2 -C metadata=30816a30f6c0dc33 -C extra-filename=-30816a30f6c0dc33 --out-dir /home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -L dependency=/home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/home/runner/work/rav1e/rav1e/target/release/deps --extern libc=/home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/deps/liblibc-7740b950ce1d20d0.rmeta --cap-lints warn -Clinker=aarch64-linux-gnu-gcc -L native=//home/runner/work/rav1e/rav1e/target/aarch64-unknown-linux-gnu/release/build/dav1d-sys-2f9630ea28931b6d/out/dav1d/release/lib/x86_64-linux-gnu -l dav1d -l dl --cfg system_deps_have_dav1d`
2023-10-07T17:42:37.7440218Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LIB_FRAMEWORK
2023-10-07T17:42:37.7440932Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_SEARCH_NATIVE
2023-10-07T17:42:37.7443604Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_SEARCH_FRAMEWORK
2023-10-07T17:42:37.7444530Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_INCLUDE
2023-10-07T17:42:37.7445226Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_NO_PKG_CONFIG
2023-10-07T17:42:37.7445944Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_BUILD_INTERNAL
2023-10-07T17:42:37.7446553Z [dav1d-sys 0.7.1] cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LINK
2023-10-07T17:42:37.7447038Z [dav1d-sys 0.7.1] 
2023-10-07T17:42:37.7447636Z [dav1d-sys 0.7.1] cargo:rustc-cfg=system_deps_have_dav1d

Document the ideal flow and warn against calling get_picture multiple times

See the example code in the get_picture C documentation

   Dav1dData data = { 0 };
   Dav1dPicture p = { 0 };
   int res;
 
   read_data(&data);
   do {
       res = dav1d_send_data(c, &data);
       // Keep going even if the function can't consume the current data
          packet. It eventually will after one or more frames have been
          returned in this loop.
       if (res < 0 && res != DAV1D_ERR(EAGAIN))
           free_and_abort();
       res = dav1d_get_picture(c, &p);
       if (res < 0) {
           if (res != DAV1D_ERR(EAGAIN))
               free_and_abort();
       } else
           output_and_unref_picture(&p);
   // Stay in the loop as long as there's data to consume.
   } while (data.sz || read_data(&data) == SUCCESS);
 
   // Handle EOS by draining all buffered frames.
   do {
       res = dav1d_get_picture(c, &p);
       if (res < 0) {
           if (res != DAV1D_ERR(EAGAIN))
               free_and_abort();
       } else
           output_and_unref_picture(&p);
   } while (res == 0);
  • update the example code
  • update the documentation to match the C code above

Need a release

Hi there,

Could we please have a release including 87fe798 ? That would save us from shipping different versions of nom in our project.

Build script fails through image crate

Building image with the avif feature fails with this output

Building inside an isolated container works however:

FROM archlinux
RUN pacman -Syu --noconfirm rustup base-devel nasm
RUN pacman --noconfirm -Scc
RUN rustup install stable --profile minimal
RUN cargo new broken_avif
WORKDIR broken_avif
RUN cargo add image --features avif --no-default-features
RUN cargo build

Dav1d is installed on the system with version 1.3.0-1.
This could be related to #80, but i am not quite sure.

Add a build option

Make it possible to build dav1d internally so the crate does not depend on an external build.

  • Add a minimum of abstraction to call meson and ninja
  • Make sure you build a static library
  • Leverage pkg-config

exit code: 0xc0000135, STATUS_DLL_NOT_FOUND

I'm using Windows 11, Rust 1.76.0 latest stable and MSVC.

I followed the instructions in the README and the program compiles fine, but crashes when running with exit code: 0xc0000135, STATUS_DLL_NOT_FOUND.

Reproduction:

fn main() {
    dav1d::Decoder::new().unwrap();
}

get_picture() fails with Error::Again with non 1 threads in settings

Doesn't matter if I build 1.0.0 dav1d or the latest commit.
With default settings, send_data same image several times helps to finally get some result in get_picture.
If I set threads to 1, sending several times fails, and get_picture works after 1st send_data.
Looks like a serious issue with multithreaded balancer.
Code is quite trivial.

use avif_parse::read_avif;

pub fn load_avif(fname: &str) -> (Vec<u8>, u32, u32) {
    let context = read_avif(&mut File::open(fname).unwrap()).unwrap();
    let mut dsettings = dav1d::Settings::new();
    dsettings.set_n_threads(1);  // any value except 1 breaks the program
    let mut decoder = dav1d::Decoder::with_settings(&dsettings).unwrap();
    decoder.send_data(
        context.primary_item,
        None, None, None,
    ).unwrap();
    let picture = decoder.get_picture().unwrap();
    println!("Width {}", picture.width());
    println!("Height {}", picture.height());
    // TODO
    (Vec::new(), 0, 0)
}

Dav1dWarpedMotionParams_union_ ... include/dav1d/headers_h_100_5)" is not a valid Ident

Build error:

Caused by:
  process didn't exit successfully: `/Users/ak/Developer/Projects/comic-opt/target/debug/build/dav1d-sys-aca7d2f4fb623e90/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=DAV1D_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-apple-darwin
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_apple_darwin
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rustc-link-search=native=/opt/homebrew/Cellar/dav1d/1.2.1/lib
  cargo:rustc-link-lib=dav1d
  cargo:include=/opt/homebrew/Cellar/dav1d/1.2.1/include
  cargo:rerun-if-env-changed=SYSTEM_DEPS_BUILD_INTERNAL
  cargo:rerun-if-env-changed=SYSTEM_DEPS_LINK
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LIB
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LIB_FRAMEWORK
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_SEARCH_NATIVE
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_SEARCH_FRAMEWORK
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_INCLUDE
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_BUILD_INTERNAL
  cargo:rerun-if-env-changed=SYSTEM_DEPS_DAV1D_LINK

  cargo:rustc-cfg=system_deps_have_dav1d

  --- stderr
  thread 'main' panicked at /Users/ak/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.69/src/fallback.rs:817:9:
  "Dav1dWarpedMotionParams_union_(unnamed_at_/opt/homebrew/Cellar/dav1d/1_2_1/include/dav1d/headers_h_100_5)" is not a valid Ident
  stack backtrace:
     0:        0x10541bbfc - std::backtrace_rs::backtrace::libunwind::trace::h71068c4b5b031286
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
     1:        0x10541bbfc - std::backtrace_rs::backtrace::trace_unsynchronized::h56b9813f75d4d961
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:        0x10541bbfc - std::sys_common::backtrace::_print_fmt::hb10f64f159882954
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/sys_common/backtrace.rs:67:5
     3:        0x10541bbfc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h052d4a6449303d0c
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/sys_common/backtrace.rs:44:22
     4:        0x10543a4a0 - core::fmt::rt::Argument::fmt::h670e0fc9dd75299f
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/core/src/fmt/rt.rs:142:9
     5:        0x10543a4a0 - core::fmt::write::hd7376fa11f842969
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/core/src/fmt/mod.rs:1117:17
     6:        0x1054193e0 - std::io::Write::write_fmt::h8962cd07816e935b
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/io/mod.rs:1762:15
     7:        0x10541ba38 - std::sys_common::backtrace::_print::h40815699fd9e306f
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/sys_common/backtrace.rs:47:5
     8:        0x10541ba38 - std::sys_common::backtrace::print::h97fb0a8a4077c481
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/sys_common/backtrace.rs:34:9
     9:        0x10541d15c - std::panicking::default_hook::{{closure}}::h3b4672ac61ca5355
    10:        0x10541cea4 - std::panicking::default_hook::h609e6a125a90b4e7
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:292:9
    11:        0x10541d584 - std::panicking::rust_panic_with_hook::h9625542414b348eb
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:779:13
    12:        0x10541d484 - std::panicking::begin_panic_handler::{{closure}}::hb4fa343c314105dc
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:657:13
    13:        0x10541c064 - std::sys_common::backtrace::__rust_end_short_backtrace::he263cec7b035e782
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/sys_common/backtrace.rs:170:18
    14:        0x10541d220 - rust_begin_unwind
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:645:5
    15:        0x105451db8 - core::panicking::panic_fmt::h624e311b541e9a0d
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/core/src/panicking.rs:72:14
    16:        0x1052ceb8c - proc_macro2::fallback::validate_ident::h4c1166d32a8af3ee
    17:        0x1052ce980 - proc_macro2::fallback::Ident::_new::h4e3824fcf317ea6c
    18:        0x1052ce9d4 - proc_macro2::fallback::Ident::new::h87977e32a16da4ac
    19:        0x1052d0b5c - proc_macro2::imp::Ident::new::h8af81837a8d2ca81
    20:        0x1052dbf44 - proc_macro2::Ident::new::h3aacf2d7a0886b32
    21:        0x104fea4f4 - bindgen::ir::context::BindgenContext::rust_ident_raw::h8e2d49afd883be3c
    22:        0x104fea480 - bindgen::ir::context::BindgenContext::rust_ident::hfa28c652e0112912
    23:        0x104fc0668 - <bindgen::ir::comp::CompInfo as bindgen::codegen::CodeGenerator>::codegen::h567d49f30da88ac3
    24:        0x104ffdea8 - <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen::hd4d2ed70c80c9bae
    25:        0x104f3965c - <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen::h2f17d85f3ef84ebe
    26:        0x104fc5ce4 - <bindgen::ir::comp::CompInfo as bindgen::codegen::CodeGenerator>::codegen::h567d49f30da88ac3
    27:        0x104ffdea8 - <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen::hd4d2ed70c80c9bae
    28:        0x104f3965c - <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen::h2f17d85f3ef84ebe
    29:        0x104fa93d8 - <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}::h4e6da4cc9fa13593
    30:        0x104f166c0 - <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::hda7427ff9d7e40fe
    31:        0x104f39644 - <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen::h2f17d85f3ef84ebe
    32:        0x104fb0200 - bindgen::codegen::codegen::{{closure}}::h7751c636f51e91ec
    33:        0x104fec210 - bindgen::ir::context::BindgenContext::gen::ha5e7209342cc78fe
    34:        0x104faf958 - bindgen::codegen::codegen::h5830481c624c1763
    35:        0x104fb413c - bindgen::Bindings::generate::hb6d8a3e8b68939e0
    36:        0x104fb2068 - bindgen::Builder::generate::hf5eebb5c4d84a3a1
    37:        0x104ed6b88 - build_script_build::main::h0bed91e13a0f84a2
    38:        0x104ed37f4 - core::ops::function::FnOnce::call_once::he4072fabf6d94ac4
    39:        0x104ed2ef4 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2fab1ceea94ef536
    40:        0x104ed3030 - std::rt::lang_start::{{closure}}::h6e9ad04a80859b8f
    41:        0x105415210 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h07136ef239371295
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/core/src/ops/function.rs:284:13
    42:        0x105415210 - std::panicking::try::do_call::hc67f66b8c648ad32
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:552:40
    43:        0x105415210 - std::panicking::try::hf97491b0e67985d1
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:516:19
    44:        0x105415210 - std::panic::catch_unwind::h29050b1d23639a61
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panic.rs:142:14
    45:        0x105415210 - std::rt::lang_start_internal::{{closure}}::hcead3afc42fd36ce
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/rt.rs:148:48
    46:        0x105415210 - std::panicking::try::do_call::hc86b0a533f7b067b
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:552:40
    47:        0x105415210 - std::panicking::try::hb1cdabe993a5546d
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panicking.rs:516:19
    48:        0x105415210 - std::panic::catch_unwind::h21666380498b6e46
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/panic.rs:142:14
    49:        0x105415210 - std::rt::lang_start_internal::h7be4efcec2e53815
                                 at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/library/std/src/rt.rs:148:20
    50:        0x104ed3008 - std::rt::lang_start::h34cef9998fbdbe32
    51:        0x104ed7024 - _main

Releases

@lu-zero I've noticed the 0.3.0 tag wasn't published here but it appears on crates.io. Was it an oversight?
A 0.4.0 release would be great to have as well, please 🙏

Deadlocks in `get_picture()` on specific files with multi-threaded decoding while ffmpeg/dav1dplay don't

File available from https://www.dropbox.com/s/s8o8paaeghcz3cy/dav1d-rs-get-picture-deadlock.ivf?dl=0. This is an AV1 version of https://www.youtube.com/watch?v=mkggXE5e2yk

I was quite certain that this is a bug in dav1d but... I can't reproduce it with dav1dplay (from the dav1d examples, using the placebo-gl renderer because the SDL one doesn't support this configuration) and also not with ffmpeg. But I can reproduce it with the dav1d GStreamer plugin, which uses dav1d-rs.

(gdb) thread apply all bt

Thread 33 (Thread 0x7f9a95a6a780 (LWP 1166877) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 32 (Thread 0x7f9a95b6e780 (LWP 1166876) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 31 (Thread 0x7f9a95c72780 (LWP 1166875) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 30 (Thread 0x7f9a95d76780 (LWP 1166874) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 29 (Thread 0x7f9a95e7a780 (LWP 1166873) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 28 (Thread 0x7f9a95f7e780 (LWP 1166872) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

--Type <RET> for more, q to quit, c to continue without paging--
Thread 27 (Thread 0x7f9a96082780 (LWP 1166871) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 26 (Thread 0x7f9a96186780 (LWP 1166870) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 25 (Thread 0x7f9a9628a780 (LWP 1166869) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 24 (Thread 0x7f9a9638e780 (LWP 1166868) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 23 (Thread 0x7f9a96492780 (LWP 1166867) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 22 (Thread 0x7f9a96596780 (LWP 1166866) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 21 (Thread 0x7f9a9669a780 (LWP 1166865) "dav1d-worker"):
--Type <RET> for more, q to quit, c to continue without paging--
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 20 (Thread 0x7f9a9679e780 (LWP 1166864) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 19 (Thread 0x7f9a968a2780 (LWP 1166863) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 18 (Thread 0x7f9a969a6780 (LWP 1166862) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 17 (Thread 0x7f9a96aaa780 (LWP 1166861) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 16 (Thread 0x7f9a96bae780 (LWP 1166860) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 15 (Thread 0x7f9a96cb2780 (LWP 1166859) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 14 (Thread 0x7f9a96db6780 (LWP 1166858) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 13 (Thread 0x7f9a96eba780 (LWP 1166857) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 12 (Thread 0x7f9a96fbe780 (LWP 1166856) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 11 (Thread 0x7f9a970c2780 (LWP 1166855) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 10 (Thread 0x7f9a971c6780 (LWP 1166854) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 9 (Thread 0x7f9a972ca780 (LWP 1166853) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 8 (Thread 0x7f9a973ce780 (LWP 1166852) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 7 (Thread 0x7f9a974d2780 (LWP 1166851) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 6 (Thread 0x7f9a975d6780 (LWP 1166850) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 5 (Thread 0x7f9a976da780 (LWP 1166849) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 4 (Thread 0x7f9a977de780 (LWP 1166848) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 3 (Thread 0x7f9a978e2780 (LWP 1166847) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
--Type <RET> for more, q to quit, c to continue without paging--
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 2 (Thread 0x7f9a979e6780 (LWP 1166846) "dav1d-worker"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98533d76 in dav1d_worker_task () from /lib64/libdav1d.so.6
#3  0x00007f9a9826312d in start_thread () from /lib64/libc.so.6
#4  0x00007f9a982e4bc0 in clone3 () from /lib64/libc.so.6

Thread 1 (Thread 0x7f9a981d6bc0 (LWP 1166844) "dav1d-tools"):
#0  0x00007f9a9825fd16 in __futex_abstimed_wait_common () from /lib64/libc.so.6
#1  0x00007f9a98262510 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libc.so.6
#2  0x00007f9a98531f5f in dav1d_get_picture () from /lib64/libdav1d.so.6
#3  0x00005612d32d2106 in dav1d::Decoder::get_picture (self=0x7ffeb6728538) at src/lib.rs:326
#4  0x00005612d32cad34 in dav1d_tools::handle_pending_pictures (dec=0x7ffeb6728538) at tools/src/main.rs:79
#5  0x00005612d32cb3fe in dav1d_tools::main () at tools/src/main.rs:128

Improved safe wrapper?

Hi,

I've started working on https://github.com/philn/dav1d-rs which builds upon your -sys bindings to provide an API for the decoder. It's still the early stages but I wonder if you would like to collaborate on this? I'd be OK with deprecating or merging my crate here of course :)

Colorimetry information

I'd like to add colorimetry information in the GStreamer decoder based on these bindings. I started a patch, philn@19ada13 ... early feedback is welcome :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.