Skip to content

Commit 46621f6

Browse files
committed
Update dependencies, FFmpeg binding doc, README
1 parent 23febaa commit 46621f6

File tree

3 files changed

+686
-1245
lines changed

3 files changed

+686
-1245
lines changed

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ build = "build.rs"
2626
doctest = false
2727

2828
[dependencies]
29-
once_cell = "1.4.1"
30-
libc = "0.2.79"
29+
once_cell = "1.5"
30+
libc = "0.2"
3131

3232
[build-dependencies]
33-
bindgen = "0.55.1"
34-
once_cell = "1.4.1"
33+
bindgen = "0.57"
34+
once_cell = "1.5"
3535

3636
[target.'cfg(not(windows))'.build-dependencies]
37-
pkg-config = "0.3.19"
38-
num_cpus = "1.13.0"
37+
pkg-config = "0.3"
38+
num_cpus = "1.13"
3939

4040
[target.'cfg(windows)'.build-dependencies]
41-
vcpkg = "0.2.10"
41+
vcpkg = "0.2"
4242

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,26 @@ Cross platform FFI bindings for FFmpeg inner libraries. This is a crate that:
1313

1414
To use this crate, you need to set several environment variables.
1515

16-
### To link:
16+
### Simplest:
17+
18+
Build ffmpeg staticly and set `FFMPEG_PKG_CONFIG_PATH` to the path of the generated FFmpeg package-config files. And you don't need to set other environment variables for static linking.
19+
20+
### More complex
21+
22+
You need to set environment variable for both linking and generating bindings.
23+
24+
#### To link:
1725

1826
1. Dynamic linking with prebuilt dylib: Set `FFMPEG_DLL_PATH` to the path of `dll` or `so`. (Windows: Put corresponding `.lib` file next to the `.dll` file.)
1927

20-
2. Static linking with prebuilt staticlib: Set `FFMPEG_PKG_CONFIG_PATH` to the path of the FFmpeg package-config files or set `FFMPEG_LIB_DIR` to the path of the FFmpeg prebuilt libs directory.
28+
2. Static linking with prebuilt staticlib: or set `FFMPEG_LIB_DIR` to the path of the FFmpeg prebuilt libs directory.
2129

22-
### To generate bindings:
30+
#### To generate bindings:
2331

2432
1. Compile-time binding generation(requires clang dylib): Set `FFMPEG_INCLUDE_DIR` to the path to the header files for binding generation.
2533

2634
2. Use pre-built binding: Set `FFMPEG_BINDING_PATH` to the prebuilt binding file.
2735

28-
### Attention
36+
## Attention
2937

3038
FFI is not that easy, especially when you are dealing with a big old C project. Don't feel depressed when there are some problems. The CI check already have some typical use cases, you can check it. File an issue if you still have some problem.

0 commit comments

Comments
 (0)