Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
This allows users to call the corresponding functions without the
need to embed the argument in Some(_)
.
I applied this approach to manual code and I moved Bin::new
and Pipeline::new
to manual code to implement it too there.
Many auto
functions could take advantage of this but that would
require a gir
evolution. We could probably apply this to
App{Sink,Src}::set_caps
manually though.
See the result in the examples
and in this (WIP) gst-plugins-rs
branch: https://gitlab.freedesktop.org/fengalin/gst-plugins-rs/-/tree/nullability-into-option-args
When the user wants to pass None
, most of the time, the compiler
is able to infer the type:
let buf = pool.acquire_buffer(None).unwrap();
However, when the function uses a trait
bound for the optional
argument type, user must disambiguate the type. Ex.:
alloc_query.add_allocation_pool::<gst::BufferPool>(None, 1024, 1, 4);
For most types, the NONE
constant is also available:
alloc_query.add_allocation_pool(gst::BufferPool::NONE, 1024, 1, 4);