mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-17 05:15:14 +00:00
reqwesthttpsrc: Answer the SCHEDULING query correctly
We don't really want to operate in pull mode and also hint that we're bandwidth limited.
This commit is contained in:
parent
cecc0804d5
commit
2a6ee4b959
1 changed files with 18 additions and 0 deletions
|
@ -662,6 +662,24 @@ impl BaseSrcImpl for ReqwestHttpSrc {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn query(&self, element: &gst_base::BaseSrc, query: &mut gst::QueryRef) -> bool {
|
||||
use gst::QueryView;
|
||||
|
||||
match query.view_mut() {
|
||||
QueryView::Scheduling(ref mut q) => {
|
||||
q.set(
|
||||
gst::SchedulingFlags::SEQUENTIAL | gst::SchedulingFlags::BANDWIDTH_LIMITED,
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
);
|
||||
q.add_scheduling_modes(&[gst::PadMode::Push]);
|
||||
true
|
||||
}
|
||||
_ => BaseSrcImplExt::parent_query(self, element, query),
|
||||
}
|
||||
}
|
||||
|
||||
fn do_seek(&self, src: &gst_base::BaseSrc, segment: &mut gst::Segment) -> bool {
|
||||
let segment = segment.downcast_mut::<gst::format::Bytes>().unwrap();
|
||||
|
||||
|
|
Loading…
Reference in a new issue