mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-03-08 14:31:05 +00:00
onvifaggregator: Update for minor PadTemplate
API changes
`PadTemplate::caps()` returns a reference to the caps now instead of a new strong reference, so keeping the template in scope as long as the caps reference is required.
This commit is contained in:
parent
a4a5caec53
commit
92c66be943
1 changed files with 10 additions and 7 deletions
|
@ -436,9 +436,10 @@ impl AggregatorImpl for OnvifAggregator {
|
|||
QueryViewMut::AcceptCaps(q) => {
|
||||
let caps = q.caps_owned();
|
||||
let class = aggregator.class();
|
||||
let templ_caps = class.pad_template("media").unwrap().caps();
|
||||
let templ = class.pad_template("media").unwrap();
|
||||
let templ_caps = templ.caps();
|
||||
|
||||
q.set_result(caps.is_subset(&templ_caps));
|
||||
q.set_result(caps.is_subset(templ_caps));
|
||||
|
||||
true
|
||||
}
|
||||
|
@ -500,14 +501,15 @@ impl AggregatorImpl for OnvifAggregator {
|
|||
} else {
|
||||
let filter = q.filter_owned();
|
||||
let class = aggregator.class();
|
||||
let templ_caps = class.pad_template("meta").unwrap().caps();
|
||||
let templ = class.pad_template("meta").unwrap();
|
||||
let templ_caps = templ.caps();
|
||||
|
||||
if let Some(filter) = filter {
|
||||
q.set_result(
|
||||
&filter.intersect_with_mode(&templ_caps, gst::CapsIntersectMode::First),
|
||||
&filter.intersect_with_mode(templ_caps, gst::CapsIntersectMode::First),
|
||||
);
|
||||
} else {
|
||||
q.set_result(&templ_caps);
|
||||
q.set_result(templ_caps);
|
||||
}
|
||||
|
||||
true
|
||||
|
@ -520,9 +522,10 @@ impl AggregatorImpl for OnvifAggregator {
|
|||
} else {
|
||||
let caps = q.caps_owned();
|
||||
let class = aggregator.class();
|
||||
let templ_caps = class.pad_template("meta").unwrap().caps();
|
||||
let templ = class.pad_template("meta").unwrap();
|
||||
let templ_caps = templ.caps();
|
||||
|
||||
q.set_result(caps.is_subset(&templ_caps));
|
||||
q.set_result(caps.is_subset(templ_caps));
|
||||
}
|
||||
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue