*: refactor setters to return self
This commit is contained in:
@ -49,12 +49,6 @@ impl Input {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_video_codec(&mut self, mut value: Codec) {
|
||||
unsafe {
|
||||
av_format_set_video_codec(self.as_mut_ptr(), value.as_mut_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn audio_codec(&self) -> Option<Codec> {
|
||||
unsafe {
|
||||
let ptr = av_format_get_audio_codec(self.as_ptr());
|
||||
@ -68,12 +62,6 @@ impl Input {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_audio_codec(&mut self, mut value: Codec) {
|
||||
unsafe {
|
||||
av_format_set_audio_codec(self.as_mut_ptr(), value.as_mut_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn subtitle_codec(&self) -> Option<Codec> {
|
||||
unsafe {
|
||||
let ptr = av_format_get_subtitle_codec(self.as_ptr());
|
||||
@ -87,12 +75,6 @@ impl Input {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_subtitle_codec(&mut self, mut value: Codec) {
|
||||
unsafe {
|
||||
av_format_set_subtitle_codec(self.as_mut_ptr(), value.as_mut_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn data_codec(&self) -> Option<Codec> {
|
||||
unsafe {
|
||||
let ptr = av_format_get_data_codec(self.as_ptr());
|
||||
@ -106,12 +88,6 @@ impl Input {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_data_codec(&mut self, mut value: Codec) {
|
||||
unsafe {
|
||||
av_format_set_data_codec(self.as_mut_ptr(), value.as_mut_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn probe_score(&self) -> i32 {
|
||||
unsafe {
|
||||
av_format_get_probe_score(self.as_ptr())
|
||||
|
Reference in New Issue
Block a user