7.7
A bin is a container element. Elements can be added to a bin. Since a bin is also itself an element, a bin can be handled in the same way as any other element. Bins combine a group of linked elements into one logical element, allowing them to be managed as a group.
Creates a new bin with the given name, or generates a name if name is #f.
procedure
(bin%-compose name element ...+) → (or/c (is-a?/c bin%) #f)
name : (or/c string? #f) element : (is-a?/c element%)
Compose a new bin with the given name (or a generated name if name is #f) by adding the given elements, linking them in order, and creating ghost sink and src ghost pads. Returns #f if the elements could not be added or linked. A convenient mechanism for creating a bin, adding elements to it, and linking them together in one procedure.
Adds element to a-bin. Sets the element’s parent. An element can only be added to one bin.
If element’s pads are linked to other pads, the pads will be unlinked before the element is added to the bin.
Returns #t if element could be added, #f if a-bin does not want to accept element.
Removes element from a-bin, unparenting it in the process. Returns #t if element could be removed, #f if a-bin does not want it removed.
Gets the element with the given name from a-bin, recursing into child bins. Returns #f if no element with the given name is found in the bin.
Adds a series of elements to a-bin, equivalent to calling add for each element. Returns #t if every element could be added to a-bin, #f otherwise.
method
(send a-bin find-unlinked-pad direction)
→ (or/c (is-a?/c pad%) #f) direction : (one-of/c 'unknown 'src 'sink)
Recursively looks for elements with an unlinked pad of the given direction within a-bin and returns an unlinked pad if one is found, or #f otherwise.
method
(send a-bin sync-children-states) → boolean?
Synchronizes the state of every child of a-bin with the state of a-bin. Returns #t if syncing the state was successful for all children, #f otherwise.
procedure
bin : (is-a?/c bin%)
details : (one-of/c 'media-type 'caps-details 'non-default-params 'states 'full-params 'all 'verbose) = 'all
Return a string of DOT grammar for use with graphviz to visualize the bin. Useful for debugging purposes. details refines the level of detail to show in the graph.
A pipeline is a special bin used as a top-level container. It provides clocking and message bus functionality to the application.
method
(send a-pipeline get-pipeline-clock) → (is-a?/c clock%)
Gets the current clock used by a-pipeline.
method
(send a-pipeline get-latency) → clock-time?
Gets the latency configured on a-pipeline. The latency is the time it takes for a sample to reach the sink.
procedure
(pipeline%-new [name]) → (is-a?/c pipeline%)
name : (or/c string? #f) = #f
Creates a new pipeline with the given name, or generates a name if name is #f.
procedure
(pipeline%-compose name element ...+)
→ (or/c (is-a?/c pipeline%) #f) name : (or/c string? #f) element : (is-a?/c element%)
Creates a pipeline by first creating a bin with bin%-compose and then adding that bin as a child of the pipeline. Returns the pipeline or #f if the bin%-compose call fails or the bin cannot be added to the pipeline.