You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,14 @@
1
+
# About
1
2
Direct, unobscured and self contained FFmpeg (sys) bindings.
2
3
4
+
By self contained I mean:
5
+
* Does not require or link against any FFmpeg system dependencies.
6
+
* Does not require a network connection for building.
7
+
8
+
**The FFmpeg bindings now include doc comments, including struct fields!** See [here](https://docs.rs/ffmpeg-dev/0.2.2/ffmpeg_dev/sys/avcodec/struct.AVCodec.html).
9
+
10
+
## Example
11
+
3
12
```rust
4
13
letinput_path_cstr=std::ffi::CString::new("path/to/source.mp4").unwrap("to c str");
5
14
@@ -21,7 +30,7 @@ av_dump_format(
21
30
);
22
31
```
23
32
24
-
33
+
For the uninitiated, the std includes lots of convenient ffi related utilities. E.g. using `std::slice::from_raw_parts`:
25
34
```rust
26
35
letifmt_ctx:AVFormatContext=*ifmt_ctx;
27
36
@@ -37,16 +46,10 @@ for stream in std::slice::from_raw_parts(*ifmt_ctx.streams, ifmt_ctx.nb_streams
37
46
}
38
47
```
39
48
40
-
By self contained I mean:
41
-
* Does not require or link against any FFmpeg system dependencies.
42
-
* Does not require a network connection for building.
43
-
44
-
**The FFmpeg bindings now include doc comments, including struct fields!** See [here](https://docs.rs/ffmpeg-dev/0.2.2/ffmpeg_dev/sys/avcodec/struct.AVCodec.html).
45
-
46
-
# Stability
49
+
## Stability
47
50
API bindings should be **practically** stable now.
48
51
49
-
# Internal Behavior
52
+
##Internal Behavior
50
53
51
54
By default the debug or dev builds compile FFmpeg without optimizations, this is for the purpose of speeding up compilation. Compiling on release mode or setting `opt-level` > 1 will disable this behavior.
0 commit comments