Skip to content

Commit fd137e9

Browse files
vibhoothilu-zero
authored andcommitted
Document EncoderConfig
Add documentation of the encoderConfig for both impl and public fields Ref #1078
1 parent 5eb7b87 commit fd137e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api.rs

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ pub struct EncoderConfig {
8585
pub train_rdo: bool,
8686
}
8787

88+
/// Default preset for EncoderConfig,it is a balance between quality and speed.
89+
/// User can use with_speed_preset to have a default structure with a specific speed level.
8890
impl Default for EncoderConfig {
8991
fn default() -> Self {
9092
const DEFAULT_SPEED: usize = 5;
@@ -93,6 +95,9 @@ impl Default for EncoderConfig {
9395
}
9496

9597
impl EncoderConfig {
98+
99+
/// This is a preset which provides default settings according to a speed value in the specific range 0-10,
100+
/// If the input value is greater than 10 will result in the same setting like 10.
96101
pub fn with_speed_preset(speed: usize) -> Self {
97102
EncoderConfig {
98103
width: 640,

0 commit comments

Comments
 (0)