FreezyLemon
979e287286
Don't pass AsRef<T>
params by reference ( #84 )
2024-11-04 21:07:01 -05:00
FreezyLemon
f1c6b442b5
Refactor crate::codec ( #78 )
...
* Refactor AVCodec wrapper
* Implement new config interface
* Move ProfileIter to codec::profile
* Add CodecDescriptor
2024-11-02 20:31:30 -04:00
FreezyLemon
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
FreezyLemon
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
FreezyLemon
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
Nebojsa Sabovic
05bad6e9e0
Propagate errors in Input::packets().
2023-04-28 09:05:12 -04:00
Josh Holmer
cff28ba207
Fix things from renaming and clippy
2023-01-23 10:22:10 -05:00
Polochon-street
22ad8b9598
Bump version to use ffmpeg 5
2022-02-11 17:58:42 +01:00
Zhiming Wang
e1cabad5c9
examples/transcode-audio: reimplement with modern API
...
Avoid encoder.encode and decoder.decode.
2020-08-08 00:55:24 +08:00
Zhiming Wang
73b66ea438
Fix clippy::redundant_field_names
2020-07-26 01:01:13 +08:00
Zhiming Wang
307f52c002
Reformat code with latest cargo fmt
2020-06-02 17:54:31 +08:00
Zhiming Wang
fdea9d77e7
Fix examples
2020-06-02 17:54:01 +08:00
Tadas Barzdžius
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
Tae-il Lim
edb6d91f59
codec/context: more Into
2016-12-03 01:44:56 +01:00
Tae-il Lim
2ca2ff4a2c
examples: fix errors
2016-12-03 01:43:34 +01:00
Tae-il Lim
4df56b516f
codec/parameters: impl AsRef
for all codec::Context
wrappers
2016-12-03 01:43:23 +01:00
Tae-il Lim
36ac2513c1
codec/parameters: make api more flexible and consistent
2016-12-03 01:43:21 +01:00
Tae-il Lim
606847cc50
codec: introduce Parameters
...
As of ffmpeg 3.1, a new `AVCodecParameters` type and related API introduced.
This commit contains minimal changes to support new API.
2016-12-03 01:41:29 +01:00
lummax
e9a9ad5720
examples/transcode-audio: use timebase rescaling
2015-10-25 23:29:47 +01:00
lummax
c471ab9df8
examples/transcode-audio: extend example with seek ability
2015-10-14 18:25:37 +02:00
meh
132c514e3f
*: returning &mut Self from setters was an awful idea
...
Deref breaks things.
2015-10-04 03:21:52 +02:00
meh
a2a75628f4
examples/transcode-audio: take advantage of setters returning self
2015-09-26 18:01:34 +02:00
meh
8512c3a265
examples/transcode-audio: update to latest APIs
2015-09-25 21:33:31 +02:00
lummax
20ea25cee5
examples/transcode-audio: add filter/encoder flushing
...
While this introduces some code duplicates, it seems to be the easy way
without rewriting the whole example.
2015-09-19 12:38:14 +02:00
lummax
fc6c0755ef
examples/transcode-audio: set {max_}bit_rate
2015-09-18 21:45:26 +02:00
lummax
882bef5507
examples/transcode-audio: correct time_base handling
2015-09-18 21:42:02 +02:00
meh
8f52dab1e4
examples/transcode-audio: update import paths
2015-09-17 17:34:00 +02:00
lummax
7f0291bf78
examples/transcode-audio: set global headers if needed
2015-09-14 13:57:20 +02:00
lummax
738030bb92
examples/transcode-audio: set encoder time base
2015-09-13 20:21:34 +02:00
meh
b50a3673a1
examples/transcode-audio: do not panic in case of decoding error
2015-09-12 20:42:24 +02:00
meh
a7fcbd81fa
examples/transcode-audio: avoid packet reallocation
2015-09-12 20:39:06 +02:00
lummax
71d23d0f92
examples/transcode-audio: fix on input with multiple streams
...
On input files with muliple streams the best audio streams gets transcoded. If
this stream happens to have an `index > 0` the transcoding crashes as no
associated output stream is available.
This commit fixes this by using the first (and only) output stream.
2015-09-12 14:18:09 +02:00
lummax
b06ebec3b6
examples/transcode-audio: use ChannelLayoutIter.best()
2015-09-11 18:27:50 +02:00
lummax
402657cbfb
examples/transcode-audio: dump filter graph as text
2015-09-09 20:25:34 +02:00
lummax
d920fcce7d
examples/transcode-audio: fix compilation error
2015-09-09 19:38:45 +02:00
meh
7f130a7448
examples/transcode-audio: update pts setting API usage
2015-09-09 16:48:10 +02:00
meh
bc5ef9cdcf
examples/transcode-audio: add audio transcoding example
2015-09-09 14:31:26 +02:00