commit | 974286c721ba988588b94ee3aec12ed5f525ca61 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Thu Jul 11 13:43:27 2024 +0900 |
committer | Hirokazu Honda (a.k.a hiroh) <rosetta.jpn@gmail.com> | Thu Oct 17 15:55:33 2024 +0900 |
tree | 1b009cc4e32d4fc6e74f169c997bfe41f360f7fe | |
parent | df18fc850b1f870d396fbefb32df04271890c240 [diff] |
decoder/stateless: add utility method to wait for the next event The proper way to wait for the next event is the poll the decoder's event file descriptor instead of calling decode() over and over again until an event is delivered, like our simple_decode_loop() helper currently does. Provide a decoder helper that does that and make it available as the public interface. While probably not useful for real-life scenarios, it is handy to have. This also allows us to timeout instead of looping infinitely if the decoder is starved for output buffers, as currently happens with Fluster's RPS_E_qualcomm_5 H.265 test vector.
A lightweight, simple, low-dependency, and hopefully safe crate for hardware-accelerated video decoding and encoding on Linux.
It is developed for use in ChromeOS (particularly crosvm), but has no dependency to ChromeOS and should be usable anywhere.
The ccdec
example program can decode an encoded stream and write the decoded frames to a file. As such it can be used for testing purposes.
$ cargo build --examples $ ./target/debug/examples/ccdec --help Usage: ccdec <input> [--output <output>] --input-format <input-format> [--output-format <output-format>] [--synchronous] [--compute-md5 <compute-md5>] Simple player using cros-codecs Positional Arguments: input input file Options: --output output file to write the decoded frames to --input-format input format to decode from. --output-format pixel format to decode into. Default: i420 --synchronous whether to decode frames synchronously --compute-md5 whether to display the MD5 of the decoded stream, and at which granularity (stream or frame) --help display usage information
Fluster can be used for testing, using the ccdec
example program described above. Just make sure the ccdec
binary is in your PATH
, and run Fluster using one of the ccdec
decoders, e.g.
python fluster.py run -d ccdec-H.264 -ts JVT-AVC_V1
The majority of the code in the initial commit has been written by Daniel Almeida as a VAAPI backend for crosvm, before being split into this crate.