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
3206eedcf0
Add ChannelLayout API ( #38 )
...
* Create channel_layout directory
* Rename ChannelLayout -> ChannelLayoutMask
* Add enum Channel (<-> AVChannel)
* Add struct ChannelCustom (<-> AVChannelCustom)
* Add enum ChannelOrder (<-> AVChannelOrder)
* Add struct ChannelLayout
- Smart copy-on-write pointer to AVChannelLayout
- idiomatic Rust API wrapping around FFmpeg APIs
- no Ambisonic support (yet)
- consts will need to be manually updated
* Add ChannelLayoutIter (iterator over all standard layouts)
* Add codec/Audio::ch_layouts
* Add ch_layout API to Audio-related structs
2024-04-23 08:59:15 -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
22ad8b9598
Bump version to use ffmpeg 5
2022-02-11 17:58:42 +01:00
6f44fb79fd
codec: deprecate encoder's encode/flush and decoder's decode
2020-08-08 01:16:44 +08:00
363001febe
codec: expose modern send/receive packet/frame APIs
...
avcodec_encode_video2()/avcodec_decode_video2/avcodec_encode_audio2()/avcodec_decode_audio4()
have been deprecated since FFmpeg 3.1, with modern
avcodec_send_packet()/avcodec_receive_frame()/avcodec_send_frame()/avcodec_receive_packet()
as replacements.
This commit adds send_packet(), send_eof() and receive_frame() to
decoder::Opened; send_frame(), send_eof() and receive_packet() to
encoder::Encoder to expose these modern APIs.
2020-08-08 00:37:54 +08: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
5afe774f40
crate: update bitflags
2017-07-10 11:35:49 +02: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
b48521108e
*: update dependencies
2017-02-19 01:45:05 +01:00
8609619a5d
codec: impl AsMut
for all Context
wrappers
2016-12-03 01:43:30 +01:00
4df56b516f
codec/parameters: impl AsRef
for all codec::Context
wrappers
2016-12-03 01:43:23 +01:00
ac0ef697cf
codec/decoder/opened: add flush
method
2015-10-14 18:24:42 +02:00
306b9c6698
codec/packet: refactoring to allow zero-copy packet creation
2015-10-09 14:09:35 +02:00
132c514e3f
*: returning &mut Self from setters was an awful idea
...
Deref breaks things.
2015-10-04 03:21:52 +02:00
510e8604b6
*: refactor setters to return self
2015-09-26 18:01:23 +02:00
66284eb045
codec: add magic traits to get codecs by name and id
2015-09-25 21:33:08 +02:00
2ca44d08d4
*: fix UB with CString usage
2015-09-22 02:44:13 +02:00
cc054229cf
decoder/{audio,video}: add max_bit_rate()
2015-09-18 21:44:58 +02:00
34ff7bafbf
codec/decoder: add time_base()
method
2015-09-18 21:41:45 +02:00
29450c4260
{en,de}coder/audio: add frame_size()
method
2015-09-08 19:11:18 +02:00
f2fb08e491
util/dictionary: refactor and make more sound
2015-09-08 18:26:29 +02:00
fbf5cd94eb
codec: make lifetimes saner
2015-09-04 16:28:56 +02:00
c867dd6259
codec: improve encoder state transitions
...
This commit improves the state transitions for the `codec::*` structs as
discussed in #7 .
2015-08-29 21:19:14 +02:00
891b87f25d
codec/decoder: adapt accessors to new state transitions
2015-08-29 21:09:39 +02:00
ee6004d05e
codec: improve decoder state transitions
...
This commit improves the state transitions for the `codec::*` structs as
discussed in #7 .
2015-08-29 21:08:31 +02:00
59b1eead16
codec: add several getters
2015-08-28 20:36:55 +02:00
bb4263b7be
util/rational: some more refactoring
2015-06-25 22:23:33 +02:00
1e5d77816a
*: update to 2.7
2015-06-19 01:04:49 +02:00
d56ac34413
*: use is_null instead of == ptr::null()
2015-06-08 15:48:28 +02:00
ff1b880be6
*: make internal pointer handling safer
2015-06-04 03:03:19 +02:00
7ac2d29718
codec/decoder/audio: use ChannelLayout
2015-06-01 18:34:22 +02:00
21141b502a
codec/decoder/audio: change rate type to u32
2015-06-01 16:57:16 +02:00
a5df1a3a60
codec/decoder: add frame_rate accessor
2015-05-31 19:01:23 +02:00
22e98c30a9
codec/decoder/audio: change channels type to u16
2015-05-31 18:59:14 +02:00
373ea95b2b
codec/decoder/video: implement DerefMut
2015-05-28 20:14:59 +02:00
cad2e451c6
codec/decoder/subtitle: implement DerefMut
2015-05-28 20:14:45 +02:00
5803c023ec
codec/decoder: implement DerefMut
2015-05-28 20:13:50 +02:00
3b3f633c39
codec/decoder/audio: implement DerefMut
2015-05-28 20:13:32 +02:00
a0882e0422
codec/decoder/slice: change flags API style
2015-05-28 18:13:35 +02:00
27264e575a
codec/decoder/conceal: change flags API style
2015-05-28 18:12:56 +02:00
f1590620af
codec/decoder/check: change flags API style
2015-05-28 18:12:23 +02:00
dc7837b0a9
codec/decoder: add time_base getter
2015-05-26 20:37:44 +02:00
5b80b10949
util/error: refactor error handling
2015-05-24 18:51:34 +02:00
22faf2f99c
codec/decoder/video: change width and height to u32
2015-05-18 22:58:28 +02:00
e2039ac550
codec/decoder: add some accessors
2015-05-16 18:40:32 +02:00
507a1b9e95
codec/decoder: add error checking
2015-05-16 17:34:31 +02:00
757088f46c
codec: refactor decoder and encoder
2015-05-16 17:28:25 +02:00