455 Commits
Author SHA1 Message Date
Luke Street f6ff7f8309 Merge branch 'graphInputAppend' into merged 2023-10-30 11:44:22 -04:00
Luke Street ba84a458bd Merge branch 'skip_avio_open' into merged 2023-10-30 11:41:07 -04:00
Luke Street bc64ea1081 Add + ?Sized to AsRef<Path> generic parameters
Without `+ ?Sized`, `&Path` can't be used as the input parameter, since `Path` is unsized.
2023-10-30 11:30:06 -04:00
Luke Street da93bfbbd4 Add ChannelLayout::describe
Calls `av_channel_layout_describe` and returns a string description.
2023-10-30 11:30:06 -04:00
Luke Street 49b41b2840 Context time_base / frame_rate adjustments
- Moves `time_base` from `Decoder` and `set_time_base` from `Encoder` to the base `Context` to unify the API for both types.
- Adds `packet_time_base` and `set_packet_time_base` to `Decoder`.
- Moves `set_frame_rate` from `Encoder` to `Context` and adds a `frame_rate` getter.
2023-10-30 11:30:06 -04:00
Luke Street 1c55c41203 Add Sink::time_base
Calls `av_buffersink_get_time_base`.
2023-10-30 11:30:06 -04:00
Luke Street f55b4b8846 Add Packet::time_base/set_time_base
Allows inspecting and adjusting the packet's time_base.
2023-10-30 11:30:06 -04:00
Luke Street 00d5c72290 Add Output::add_stream_with(&Context)
Calls `avcodec_parameters_from_context` to set the stream attributes from an AVCodecContext.
2023-10-30 11:30:06 -04:00
Luke Street a8c9dbea84 Add Context::new_with_codec
Allows calling `avcodec_alloc_context3` with an AVCodec, setting the default values.
2023-10-30 11:30:06 -04:00
Luke Street 04e6df4f9d Make Codec const (AVCodec is not mutable) 2023-10-30 10:53:32 -04:00
Joseph Price 0e93d82cfc fix graph input/output linked list insertion
This fixes a bug where adding multiple inputs or outputs to a graph
causes at most two of them two be inserted. The result is errors such as

Input pad "default" with type audio of the filter instance "out2" of abuffersink not connected to any source

when calling validate. The fix walks the linked list and appends the new
node to the end. This operation is linear, with the assumption that
inputs and outputs are small and building the graph happens
infrequently.

I added a test which reproduces the issue for both inputs and outputs.
2023-07-12 23:02:02 -04:00
AdrianEddy 8cfbf82e08 Fix building previous versions 2023-03-13 19:22:28 +01:00
AdrianEddyandGitHub 64ae502f34 Merge branch 'zmwangx:master' into master 2023-03-13 16:07:38 +01:00
Polochon-street 1e58806354 Fix clippy (again) 2023-03-12 13:58:15 +01:00
AdrianEddy 10733b732f Add ffmpeg 6.0 support 2023-02-27 12:06:58 +01:00
AdrianEddy baf16ed864 Don't crash, just warn 2022-12-14 05:57:54 +01:00
AdrianEddy 792db4cc98 Make it compile with ffmpeg-master 2022-12-01 18:10:30 +01:00
Polochon-street 022eaa28cf Fix clippy 2022-09-07 23:49:28 +02:00
Polochon-street b6b2311fcf Bump to 5.1.1 2022-08-08 18:37:14 +02: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
jiayuxin 855e7227db skip avio_open when flags of output is AVFMT_NOFILE 2021-11-24 17:45:43 +08:00
Polochon-streetandGitHub 1955c3ddeb Merge pull request #76 from zmwangx/fix-linting
Fix linting errors
2021-10-02 23:30:31 +02:00
Polochon-street f559e13afc Fix linting errors 2021-10-02 22:51:32 +02:00
lifningandlifning d5e9f34b6a fix build on platforms where std::os::raw::c_char is not i8
c_char may be i8 or u8, depending on target platform: https://doc.rust-lang.org/std/os/raw/type.c_char.html
2021-07-28 13:18:27 -07:00