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
FreezyLemon
30aabf9033
Add FFmpeg 6.1 support ( #14 )
...
Co-authored-by: Rafie <simulping@protonmail.com>
2024-04-02 08:47:59 -04:00
Nebojsa Sabovic
05bad6e9e0
Propagate errors in Input::packets().
2023-04-28 09:05:12 -04:00
Josh Holmer
ed9703b739
Fix an issue where compilation may fail on some non-x64 platforms
2023-02-02 13:29:08 -05:00
Josh Holmer
fe89e158c0
Add serialize support for enums
2023-01-24 02:38:11 -05:00
Josh Holmer
cff28ba207
Fix things from renaming and clippy
2023-01-23 10:22:10 -05:00
Josh Holmer
a0d7fdb30f
Fix get best stream
2022-02-20 18:15:08 -05:00
Polochon-street
22ad8b9598
Bump version to use ffmpeg 5
2022-02-11 17:58:42 +01:00
Zhiming Wang
b0722df007
Fix clippy::match_like_matches_macro
2020-10-11 10:10:08 +08:00
Zhiming Wang
545180cad0
format: context::{input,output}::dump: fix url/path printing
...
Previously the unwrapped CString did not have long enough lifetime to be
printed; not sure why there's no compiler warning.
2020-08-11 00:30:58 +08:00
Zhiming Wang
d07530267e
format: mark Context::nb_streams as public
2020-08-09 13:58:48 +08:00
Kornel Lesiński
50e1ccaca4
Don't panic on OOM
2020-08-07 22:43:53 +08:00
Kornel Lesiński
f0903fb69b
Allow null codec
2020-08-07 22:43:52 +08:00
Kornel Lesiński
f73dca70b4
Debug for Context
2020-08-07 22:43:52 +08:00
Kornel Lesiński
aa8df7d0d2
DRY nb_streams
2020-08-07 22:42:17 +08:00
Zhiming Wang
b28e852eb0
Implement automatic FFmpeg version detection
...
Based on ffmpeg-sys-next 4.3.2.
2020-08-02 11:44:13 +08:00
Zhiming Wang
c9c6031a53
Fix clippy::ptr_offset_with_cast
2020-07-26 01:01:21 +08:00
Zhiming Wang
73b66ea438
Fix clippy::redundant_field_names
2020-07-26 01:01:13 +08:00
Zhiming Wang
a7eee9142f
Revert 8199541 and guard with not(ffmpeg4)
2018-09-19 17:08:42 -04:00
Zhiming Wang
4109fa5686
format::context::Context: add .bit_rate() method
2018-09-17 01:18:48 -04:00
Zhiming Wang
8199541f09
Drop obselete macros (obselete wrt FFmpeg 4.0)
2018-09-10 14:39:28 -04:00
Tadas Barzdžius
67b7f13305
format/stream: add set_metadata function to StreamMut
2018-04-10 16:24:21 +02: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
Tadas Barzdžius
20c7ef399a
format/stream: add id accessor
2017-12-06 16:13:46 +01:00
fengalin
28b7a82ac1
format: add support for Chapters
...
Read chapters from an input context and add chapters to an output context.
Note: unlike avformat_new_stream, the equivalent function for chapter is private:
avpriv_new_chapter (part of libavformat/internal.h). I couldn't find any other
solution but re-implementing it in format::context::output::add_chapter.
2017-09-23 20:42:51 +02:00
Tadas Barzdžius
052d342baf
format: fix segmentation fault
...
Double free error.
On failure avformat_open_input frees AVFormatContext. I had it wrapped with context::Input::wrap. On avformat_open_input failure it would free AVFormatContext and Drop implementation for context::Input would try to call avformat_close_input on same AVFormatContext resulting in segmentation fault.
2017-08-21 19:38:36 +02:00
Tadas Barzdžius
5afe774f40
crate: update bitflags
2017-07-10 11:35:49 +02:00
Victor Nivet
206ccd4e5a
format/stream: add stream metadata
2017-07-08 17:07:46 +02:00
Tadas Barzdzius
991bbc24e8
format: add interrupt callback support
2017-07-08 17:05:44 +02:00
Tadas Barzdžius
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
Ivan Molodetskikh
471b48ddd4
format/stream: add avg_frame_rate accessors
2017-06-14 13:02:19 +02:00
Tadas Barzdžius
b67e4eb6d9
format/context: close AVIOContext before freeing AVFormatContext
2017-04-27 17:58:37 +02:00
meh
ef11b2bec4
format/context/output: return the Dictionary on write_header_with
2017-02-25 19:30:08 +01:00
meh
8562de8e44
format/context/ouptut: revert pass muxer options to avformat_write_header"
...
This reverts commit e04e9da29806271ed4cd956e3084f3b9145c748a.
There's already a function for that, `write_header_with`.
2017-02-25 19:28:02 +01:00
meh
b48521108e
*: update dependencies
2017-02-19 01:45:05 +01:00
main()
e04e9da298
format/context/output: pass muxer options to avformat_write_header
2017-02-01 17:18:19 +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
Tae-il Lim
981eb2a801
format/format: make description()
to return long_name
2016-11-28 23:50:33 +01:00
Eric Kidd
0328dc111a
format: fix avformat_find_stream_info return handling
...
According to:
https://ffmpeg.org/doxygen/2.8/group__lavf__decoding.html#gad42172e27cddafb81096939783b157bb
...avformat_find_stream_info returns ">=0 if OK, AVERROR_xxx on error".
This occurs with several common formats, including MP4 and MKV.
2015-11-22 00:15:35 +01:00
lummax
a736c8b438
format/context/input: add seek()
method
2015-10-14 18:24:11 +02:00
lummax
110c5a533c
format/context: add duration()
method
2015-10-14 17:50:46 +02:00
meh
132c514e3f
*: returning &mut Self from setters was an awful idea
...
Deref breaks things.
2015-10-04 03:21:52 +02:00
lummax
5a07671b92
format/context/input: implement pause()
and play()
2015-10-03 00:16:25 +02:00
meh
7161b02eba
format/stream: rename frame_rate to rate
2015-10-01 20:43:04 +02:00
meh
510e8604b6
*: refactor setters to return self
2015-09-26 18:01:23 +02:00
meh
66284eb045
codec: add magic traits to get codecs by name and id
2015-09-25 21:33:08 +02:00
lummax
bde17a8bae
format: add _with()
variants to open()
2015-09-25 16:43:17 +02:00
meh
9736980b02
codec/context: make destructors safe
2015-09-17 17:33:31 +02:00
lummax
855f3fd618
format/output: add flags()
method
2015-09-14 13:54:17 +02:00