Commit Graph

53 Commits

Author SHA1 Message Date
fd2d71c92b Support FFmpeg 7.0 (#48)
* 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
2024-04-29 21:38:37 -04:00
7a8643f2cc Migrate crates to Rust edition 2021 (#24)
* Migrate ffmpeg-sys to Edition 2021

* Migrate ffmpeg to Edition 2021

* Remove now-redundant imports

* Reorder imports after edition migration
2024-04-06 21:31:36 -04:00
f269020af8 Add missing enum variants for FFmpeg 6.1 (#16) 2024-04-03 12:27:13 -04:00
30aabf9033 Add FFmpeg 6.1 support (#14)
Co-authored-by: Rafie <simulping@protonmail.com>
2024-04-02 08:47:59 -04:00
c6dd54003e Support ffmpeg 6.0
Closes #6
2023-03-07 13:21:43 -05:00
fe89e158c0 Add serialize support for enums 2023-01-24 02:38:11 -05:00
92a8c6a9d8 add feature non-exhaustive-enums 2023-01-23 09:53:56 -05:00
28c356dd98 add wildcard branches for matches on enums 2023-01-23 09:53:52 -05:00
b6b2311fcf Bump to 5.1.1 2022-08-08 18:37:14 +02:00
22ad8b9598 Bump version to use ffmpeg 5 2022-02-11 17:58:42 +01:00
19ab5f67ad Fix linting errors 2021-07-07 16:52:30 +02:00
9c7ecb9b53 Initial ffmpeg 4.4 support 2021-05-06 17:08:45 -04:00
b28e852eb0 Implement automatic FFmpeg version detection
Based on ffmpeg-sys-next 4.3.2.
2020-08-02 11:44:13 +08:00
e947bc5606 Fix clippy::transmute_ptr_to_ptr 2020-07-26 12:26:20 +08:00
c9c6031a53 Fix clippy::ptr_offset_with_cast 2020-07-26 01:01:21 +08:00
73b66ea438 Fix clippy::redundant_field_names 2020-07-26 01:01:13 +08:00
65be233a12 Add Raspberry Pi compatibility
Signed-off-by: Zhiming Wang <i@zhimingwang.org>
2020-07-24 22:18:58 +08:00
15c87a7837 Add FFmpeg 4.3 specific code 2020-06-17 01:51:38 +08:00
036c0e5b42 Fix duplicate enum variant issues for FFmpeg 3.4 2020-06-11 23:18:47 +08:00
fcca68ae5e Add FFmpeg 4.2 specific code 2020-06-01 14:42:39 +08:00
a69a457e3a Add FFmpeg 4.1 specific code 2020-06-01 14:15:33 +08:00
6220b88ef2 util/format/pixel: drop deprecated error::Error::description 2020-06-01 13:39:59 +08:00
506f66ac51 Fix issues related to duplicate enum variants
C enums allow duplicate variants, but Rust enums don't. At some point bindgen
switched to generating duplicate variants as associated constants instead of
module-level constants, so use SomeEnum::* broke. Here we switch to associated
constants in the native API as well.
2020-06-01 13:36:50 +08:00
13a2354a2c Fix bare_trait_objects deprecation 2020-05-31 14:16:23 +08:00
d3c10e4068 Fix libc::uint8_t deprecation 2020-05-31 14:16:23 +08:00
cd6c9d972b Fix std::error::Error::description deprecation 2020-05-31 14:16:23 +08:00
a7eee9142f Revert 8199541 and guard with not(ffmpeg4) 2018-09-19 17:08:42 -04:00
0e05c0bb29 Mark new macros introduced in 2c5abbf as ffmpeg4 2018-09-19 16:54:16 -04:00
2c5abbfe33 Add missing macros (FFmpeg 4.0.2) 2018-09-10 16:22:16 -04:00
37d47c0d6e Fix AV_PIX_FMT_XVMC situation 2018-09-10 15:08:52 -04:00
8199541f09 Drop obselete macros (obselete wrt FFmpeg 4.0) 2018-09-10 14:39:28 -04:00
0bcd4550b8 *: format code with rustfmt and fix clippy suggestions
* Add avformat_close_input call to clean up AVFormantContext
* Format code with rustfmt
* Fix clippy lint double_parens
* Fix clippy lint deref_addrof
* Fix clippy lint identity_conversion
* Fix clippy lint match_ref_pats
* Fix clippy lint cast_lossless
* Fix clippy lint cmp_null
* Fix clippy lint clone_on_ref_ptr
* Fix clippy lint map_clone
* Fix clippy lint needless_borrow
* Fix clippy lint needless_pass_by_value
* Fix clippy lints for examples
* Fix clippy lint unused_io_amount
* Fix clippy lint new_without_default
* Ignore inline_always clippy lint
* Add vim temp files to .gitignore
2018-04-10 16:06:42 +02:00
94ebdf143c *: add the newest enum values from ffmpeg-sys 2017-11-29 20:49:54 +01:00
5ac0527bdc *: use latest ffmpeg-sys using bindgen
* 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
2017-07-08 17:00:27 +02:00
8cf47c7ec6 format/pixel: implement FromStr for Pixel 2017-06-28 10:53:24 +02:00
403407bf2c format/pixel: add Descriptor::{name, log2_chroma_w}() 2017-06-22 22:16:46 +02:00
1095c8842e format/pixel: add Descriptor::nb_components() 2017-06-22 22:16:46 +02:00
1dd672546d util: fix code style 2017-06-22 22:16:46 +02:00
62739b803d util: fix formatting 2017-06-22 22:16:46 +02:00
c0327cebdc format/pixel: add format::pixel::Descriptor 2017-06-22 22:16:46 +02:00
2aebc761dd util/format: add CUDA pixel format 2017-01-05 16:21:28 +01:00
75ef14c45c format/pixel: fix missing feature flags (xvmc/vaapi) 2016-05-20 14:08:22 +02:00
fafcf1d433 *: check unsafe slice creation 2016-05-01 02:01:00 +02:00
meh
b6c92b2805 crate: check headers for ifdefs 2015-12-03 18:23:06 +01:00
meh
2d8485732a util/format/sample: add inline attributes 2015-10-29 18:06:47 +01:00
meh
79945c2c5e util/format/pixel: add inline attributes 2015-10-29 18:05:54 +01:00
meh
2ca44d08d4 *: fix UB with CString usage 2015-09-22 02:44:13 +02:00
meh
19548810dd *: update to 2.8 2015-09-15 20:53:49 +02:00
meh
1e5d77816a *: update to 2.7 2015-06-19 01:04:49 +02:00
meh
b2c9dc3747 util/format/sample: improve ergonomics 2015-06-01 20:32:53 +02:00