* sys: Run cargo fmt
* sys: Add new channel layout consts
* sys: Update build script for 7.0
- Add new FF_API flags
- Update version_check_info range
- Add ffmpeg_7_0 feature entry
* sys: Update non-exhaustive match statement
* Update enums
* Mark old APIs as removed with 7.0
* Make Audio frame work with 7.0
The .unwrap() in clone() is a bit wonky
* Add API for swr_alloc_set_opts2
* Use AVFrame::duration field in 7.0+
* Include 7.0 in CI runs
* Add fn ChanneLayoutIter::best
* Update examples for new API
* Add/update Context setter for ch layout
Bug caught by clippy:
error: offset calculation on zero-sized value
--> src/filter/filter.rs:98:33
|
98 | let pad = Pad::wrap(self.ptr.offset(self.cur));
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[deny(clippy::zst_offset)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zst_offset
The problem is that `AVFilterPad` is zero-sized:
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AVFilterPad {
_unused: [u8; 0],
}
which is in turn due to `AVFilterPad` being an opaque type in
`libavfilter/avfilter.h`:
typedef struct AVFilterContext AVFilterContext;
typedef struct AVFilterLink AVFilterLink;
typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
Doing pointer arithmetic on an opaque (incomplete) type doesn't work. We have
to use the proper FFI calls to obtain info on individual pads. The API has to
be tweaked a bit; hopefully it doesn't break user programs (if it does it
should only break bugged ones...).
Fixes#20.
* Update bindings to newest ffmpeg version for new ffmpeg-sys, which is mostly generated by bindgen
* Bring back removed feature flags
* Fix whitespace formating
* Remove prepended enum names to enum variants
* Remove unneeded allows