Skip to content

Query: concrete type instantiation

François Laignel requested to merge fengalin:concrete_queries into master

Allow instantiating and dereferencing concrete queries. The motivation for this proposal is to allow the following usability enhancements:

Concrete queries mutability guaranteed by the borrow checker, including for generic functions:

    let mut p = Query::new_position(::Format::Time);
    p.get_mut_structure().set("check_mut", &true);

Concrete queries functions available in place:

    let mut q = gst::Query::new_duration(gst::Format::Time);
    let duration = if pipeline.query(&mut q) {
        Some(q.get_result())
    } else {
        None
    };

Merge request reports