Bin, Pipeline, Pad, GhostPad: use the builder to define the optional name
Updates further to gstreamer-rs!1255 (merged):
-
Homogenises the
Builder
pattern usage with regards toname
forBin
,Pipeline
,Pad
andGhostPad
. Default constructors auto-generate the object's name (same as previous behaviour when passingNone
). Use theBuilder
and thename
method to assign a specific name. -
Applies consistent naming for
Pad
andGhostPad
builder/non-builder constructors. AllPadTemplate
based constructors usefrom_template
, allPad
target based constructors usewith_target
. Ex.GhostPad::builder_from_template_with_target
. See discussion in: #448 (closed) (comment 1799092) -
Adds convenience auto naming in the following cases:
- When building from a non wildcard-named template, the name of the template is
automatically assigned to the Pad. User can override with a specific name by
calling
name()
on thePadBuilder
. - When building with a target and no name was provided via the above, the
GhostPad
is named after the target, if the target names is compatible with the name template, otherwise a specific name must be assigned using theBuilder
.
See discussions in gstreamer-rs!1255 (comment 1891181) & gstreamer-rs!1255 (comment 1903247)
- When building from a non wildcard-named template, the name of the template is
automatically assigned to the Pad. User can override with a specific name by
calling