Skip to content

Bin, Pipeline, Pad, GhostPad: use the builder to define the optional name

This MR:

  • Homogenises the Builder pattern usage with regards to name for Bin, Pipeline, Pad and GhostPad. Default constructors auto-generate the object's name (same as previous behaviour when passing None). Use the Builder and the name method to assign a specific name.

  • Applies consistent naming for Pad and GhostPad builder/non-builder constructors. All PadTemplate based constructors use from_template, all Pad target based constructors use with_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 the PadBuilder.
    • 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 the Builder.

    See discussions in !1255 (comment 1891181) & !1255 (comment 1903247)

gst-plugins-rs update: gst-plugins-rs!1197 (merged)

Fixes: #448 (closed) Fixes: #449 (closed)

Edited by François Laignel

Merge request reports

Loading