Allow any Into<Fraction> for VideoInfo::fps() and VideoInfo::par()

This commit is contained in:
Sebastian Dröge 2017-08-14 09:54:32 +03:00
parent 77cb4da32a
commit e66bcf8a5d

View file

@ -317,16 +317,16 @@ impl<'a> VideoInfoBuilder<'a> {
}
}
pub fn par(self, par: gst::Fraction) -> Self {
pub fn par<T: Into<gst::Fraction>>(self, par: T) -> Self {
Self {
par: Some(par),
par: Some(par.into()),
..self
}
}
pub fn fps(self, fps: gst::Fraction) -> Self {
pub fn fps<T: Into<gst::Fraction>>(self, fps: T) -> Self {
Self {
fps: Some(fps),
fps: Some(fps.into()),
..self
}
}