3.3 bin%
On this page:
bin%-new
bin%-compose
add
remove
get-by-name
add-many
find-unlinked-pad
sync-children-states
bin->dot
3.3.1 pipeline%
pipeline%
get-bus
get-pipeline-clock
get-latency
pipeline%-new
pipeline%-compose
Inherited methods:
from element%
add-pad
get-compatible-pad
get-compatible-pad-template
get-context
get-contexts
get-factory
get-request-pad
get-state
get-static-pad
link
link-filtered
link-many
link-pads
link-pads-filtered
pause!
play!
post-message
send-event
set-context
set-state
stop!
unlink
from gst-object%
get-name
get-parent
get-path-string
has-as-parent?
7.7

class

bin% : class?

  superclass: element%

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.

procedure

(bin%-new [name])  (is-a?/c bin%)

  name : (or/c string? #f) = #f
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.

method

(send a-bin add element)  boolean?

  element : (is-a?/c element%)
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.

method

(send a-bin remove element)  boolean?

  element : (is-a?/c 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.

method

(send a-bin get-by-name name)  (or/c (is-a?/c element%) #f)

  name : string?
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.

method

(send a-bin add-many element ...+)  boolean?

  element : (is-a?/c element%)
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->dot bin [#:details details])  string?

  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.

class

pipeline% : class?

  superclass: bin%

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-bus)  (is-a?/c bus%)

Returns the bus of a-pipeline. The bus allows the application to receive messages.

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.