mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-27 05:51:01 +00:00
filesrc: Set format as gst::Format::Bytes in basesrc
This commit is contained in:
parent
bab4efb234
commit
7e68f84a43
1 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,7 @@ use gst;
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
use gst::subclass::prelude::*;
|
use gst::subclass::prelude::*;
|
||||||
use gst_base;
|
use gst_base;
|
||||||
|
use gst_base::prelude::*;
|
||||||
use gst_base::subclass::prelude::*;
|
use gst_base::subclass::prelude::*;
|
||||||
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
@ -207,6 +208,13 @@ impl ObjectImpl for FileSrc {
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn constructed(&self, obj: &glib::Object) {
|
||||||
|
self.parent_constructed(obj);
|
||||||
|
|
||||||
|
let element = obj.downcast_ref::<gst_base::BaseSrc>().unwrap();
|
||||||
|
element.set_format(gst::Format::Bytes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ElementImpl for FileSrc {}
|
impl ElementImpl for FileSrc {}
|
||||||
|
|
Loading…
Reference in a new issue