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
d07530267e
format: mark Context::nb_streams as public
2020-08-09 13:58:48 +08:00
50e1ccaca4
Don't panic on OOM
2020-08-07 22:43:53 +08:00
f0903fb69b
Allow null codec
2020-08-07 22:43:52 +08:00
f73dca70b4
Debug for Context
2020-08-07 22:43:52 +08:00
aa8df7d0d2
DRY nb_streams
2020-08-07 22:42:17 +08:00
b28e852eb0
Implement automatic FFmpeg version detection
...
Based on ffmpeg-sys-next 4.3.2.
2020-08-02 11:44:13 +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
a7eee9142f
Revert 8199541
and guard with not(ffmpeg4)
2018-09-19 17:08:42 -04:00
4109fa5686
format::context::Context: add .bit_rate() method
2018-09-17 01:18:48 -04:00
8199541f09
Drop obselete macros (obselete wrt FFmpeg 4.0)
2018-09-10 14:39:28 -04:00
67b7f13305
format/stream: add set_metadata function to StreamMut
2018-04-10 16:24:21 +02: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
20c7ef399a
format/stream: add id accessor
2017-12-06 16:13:46 +01:00
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
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
5afe774f40
crate: update bitflags
2017-07-10 11:35:49 +02:00
206ccd4e5a
format/stream: add stream metadata
2017-07-08 17:07:46 +02:00
991bbc24e8
format: add interrupt callback support
2017-07-08 17:05:44 +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
471b48ddd4
format/stream: add avg_frame_rate accessors
2017-06-14 13:02:19 +02:00
b67e4eb6d9
format/context: close AVIOContext before freeing AVFormatContext
2017-04-27 17:58:37 +02:00
ef11b2bec4
format/context/output: return the Dictionary on write_header_with
2017-02-25 19:30:08 +01:00
8562de8e44
format/context/ouptut: revert pass muxer options to avformat_write_header"
...
This reverts commit e04e9da298
.
There's already a function for that, `write_header_with`.
2017-02-25 19:28:02 +01:00
b48521108e
*: update dependencies
2017-02-19 01:45:05 +01:00
e04e9da298
format/context/output: pass muxer options to avformat_write_header
2017-02-01 17:18:19 +01:00
36ac2513c1
codec/parameters: make api more flexible and consistent
2016-12-03 01:43:21 +01:00
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
981eb2a801
format/format: make description()
to return long_name
2016-11-28 23:50:33 +01:00
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
a736c8b438
format/context/input: add seek()
method
2015-10-14 18:24:11 +02:00
110c5a533c
format/context: add duration()
method
2015-10-14 17:50:46 +02:00
132c514e3f
*: returning &mut Self from setters was an awful idea
...
Deref breaks things.
2015-10-04 03:21:52 +02:00
5a07671b92
format/context/input: implement pause()
and play()
2015-10-03 00:16:25 +02:00
7161b02eba
format/stream: rename frame_rate to rate
2015-10-01 20:43:04 +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
bde17a8bae
format: add _with()
variants to open()
2015-09-25 16:43:17 +02:00
9736980b02
codec/context: make destructors safe
2015-09-17 17:33:31 +02:00
855f3fd618
format/output: add flags()
method
2015-09-14 13:54:17 +02:00
a76cdd7086
format: add Flags
(AVFMV_*
)
2015-09-14 13:53:48 +02:00
87ea1bd196
format: refactor format handling
2015-09-09 13:48:10 +02:00
ced43fe83b
format/context: implement set_metadata()
2015-09-08 18:46:40 +02:00
f2fb08e491
util/dictionary: refactor and make more sound
2015-09-08 18:26:29 +02:00
1f80007e5e
format: split input and output formats
2015-09-04 16:30:19 +02:00
34cbb9b1e6
format/context: add write_trailer()
method
2015-09-02 16:14:53 +02:00
a082998e48
format/context: add write_header{_with}()
methods
2015-09-02 16:14:38 +02:00
a48233cbfe
format/context: add new_stream()
method
2015-09-02 16:13:31 +02:00
471a768b8e
format/context: implement Context opening as output
2015-09-02 14:52:02 +02:00