552 Commits

Author SHA1 Message Date
Zhiming Wang
e6c028ac42
README: clarify support situation for FFmpeg <4
Pretty sure only 3.4.x works, and I have no intention of fixing things further
back.
2020-06-11 23:20:21 +08:00
Zhiming Wang
036c0e5b42
Fix duplicate enum variant issues for FFmpeg 3.4 2020-06-11 23:18:47 +08:00
abhijeetbhagat
3df1a1c209 Add example to convert AVI frame to RGB24 frame 2020-06-10 00:01:33 +05:30
Zhiming Wang
5a63bbff5b
Bump to v4.2.1 2020-06-02 19:04:02 +08:00
Zhiming Wang
97a43cf34a
Drop resampling from default features
lavr has been deprecated since FFmpeg 4.0.

Closes #3.
2020-06-02 19:03:13 +08:00
Zhiming Wang
83150c968c
Bump to v4.2.0 2020-06-02 18:50:01 +08:00
Zhiming Wang
e7f778b471
Update README with more info on versioning 2020-06-02 18:49:37 +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
Zhiming Wang
fcca68ae5e
Add FFmpeg 4.2 specific code 2020-06-01 14:42:39 +08:00
Zhiming Wang
a69a457e3a
Add FFmpeg 4.1 specific code 2020-06-01 14:15:33 +08:00
Zhiming Wang
6220b88ef2
util/format/pixel: drop deprecated error::Error::description 2020-06-01 13:39:59 +08:00
Zhiming Wang
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
Zhiming Wang
1cd6d0499b
Switch to my fork of ffmpeg-sys 2020-06-01 13:17:08 +08:00
Zhiming Wang
6644a91da4
Update bitflags to 1.2 and fix namespacing 2020-06-01 13:06:34 +08:00
Zhiming Wang
3a8f366f60
software/scaling/context: fix mutability 2020-06-01 13:02:53 +08:00
Zhiming Wang
6c2d33fc07
Drop outdated lints 2020-05-31 14:16:23 +08:00
Zhiming Wang
13a2354a2c
Fix bare_trait_objects deprecation 2020-05-31 14:16:23 +08:00
Zhiming Wang
d3c10e4068
Fix libc::uint8_t deprecation 2020-05-31 14:16:23 +08:00
Zhiming Wang
cd6c9d972b
Fix std::error::Error::description deprecation 2020-05-31 14:16:23 +08:00
Zhiming Wang
587ec66592
Fix libc::int64_t deprecation 2020-05-31 13:34:24 +08:00
Zhiming Wang
3056975836
Fix libc::uint32_t deprecation 2020-05-31 13:28:14 +08:00
Erin Moon
a7ea073619
scaling and resampling contexts: fix null checks
dc6ace91ec

Fixes #1.
2019-02-16 21:20:56 +08:00
Zhiming Wang
e13b01f30b
README: add crates.io badge 2018-09-19 21:35:58 -04:00
Zhiming Wang
7bcb223734
Cargo.toml: fix spacing 2018-09-19 19:57:23 -04:00
Zhiming Wang
e49d240068
Add README.md 2018-09-19 19:56:46 -04:00
Zhiming Wang
292a58ad0d
Cargo.toml: update to ffmpeg-next for crates.io packaging 2018-09-19 19:46:32 -04:00
Zhiming Wang
e6c7dc4bf5
Cargo.toml: add feature ffmpeg4 and mark as default 2018-09-19 17:09:59 -04:00
Zhiming Wang
a7eee9142f
Revert 8199541 and guard with not(ffmpeg4) 2018-09-19 17:08:42 -04:00
Zhiming Wang
0e05c0bb29
Mark new macros introduced in 2c5abbf as ffmpeg4 2018-09-19 16:54:16 -04:00
Zhiming Wang
4109fa5686
format::context::Context: add .bit_rate() method 2018-09-17 01:18:48 -04:00
Zhiming Wang
c5525851d4
util::color:*: use pointer .as_ref() 2018-09-14 21:49:26 -04:00
Zhiming Wang
2d3a34f74d
uril::color::*: .name() returns None if unspecified
pixdesc "helpfully" returns "unknown", which renders our Option pointless.
2018-09-14 21:30:50 -04:00
Zhiming Wang
10d3b75342
util::color::space::Space: fix possible segfault with .name()
av_get_colorspace_name could return NULL.

Also, switch from av_get_colorspace_name (frame.c) to
av_color_space_name (pixdesc.c), which is more comprehensive.
2018-09-14 21:25:50 -04:00
Zhiming Wang
bd35f013f8
util::color: implement .name() for {Primaries, Range, TransferCharacteristic} 2018-09-14 21:22:47 -04:00
Zhiming Wang
b387e1de48
Add README to explain what this fork is about 2018-09-13 17:41:49 -04:00
Zhiming Wang
e9870589b6
filter/mod: fix mutability 2018-09-10 16:22:28 -04:00
Zhiming Wang
2c5abbfe33
Add missing macros (FFmpeg 4.0.2) 2018-09-10 16:22:16 -04:00
Zhiming Wang
37d47c0d6e
Fix AV_PIX_FMT_XVMC situation 2018-09-10 15:08:52 -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
Adam Sypniewski
94ebdf143c *: add the newest enum values from ffmpeg-sys 2017-11-29 20:49:54 +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
meh
d29deedad9 crate: bump ffmpeg-sys version 2017-09-23 20:42:23 +02:00
Tadas Barzdžius
7d980a693e *: fix warnings
- Don't use deprecated function for packet dropping
- Fix compiler warning about values, which do not need to be mutable
2017-09-19 14:36:35 +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