|
superclass: gst-object% |
method
(send an-element get-compatible-pad pad [ caps]) → (or/c (is-a?/c pad%) #f) pad : (is-a?/c pad%) caps : (or/c caps? #f) = #f
method
(send an-element get-compatible-pad-template compattempl)
→ (or/c pad-template? #f) compattempl : pad-template?
method
(send an-element link-pads srcpadname dest destpadname) → boolean? srcpadname : (or/c string? #f) dest : (is-a?/c element%) destpadname : (or/c string? #f)
method
(send an-element link-pads-filtered srcpadname dest destpadname filter) → boolean? srcpadname : (or/c string? #f) dest : (is-a?/c element%) destpadname : (or/c string? #f) filter : (or/c caps? #f)
method
(send an-element link-filtered dest filter) → boolean?
dest : (is-a?/c element%) filter : (or/c caps? #f)
method
(send an-element set-context context) → void?
context : context?
method
(send an-element get-context type) → (or/c context? #f)
type : string?
method
(send an-element get-contexts) → (listof context?)
method
(send an-element get-factory) → (is-a?/c element-factory%)
method
→ (one-of/c 'failure 'success 'async 'no-preroll) state : (one-of/c 'void-pending 'null 'ready 'paused 'playing)
method
→
(one-of/c 'failure 'success 'async 'no-preroll) (one-of/c 'void-pending 'null 'ready 'paused 'playing) (one-of/c 'void-pending 'null 'ready 'paused 'playing) timeout : clock-time? = clock-time-none
This method returns three values.
The first returned value is the result of most recent state change, i.e. 'success if the element has no more pending state and the last state change succeeded, 'async if the element is still performing a state change, 'no-preroll if the element successfully changed its state but is not able to provide data yet, or 'failure if the last state change failed.
The second return value is the current state of the element.
The third return value is the pending state of the element, i.e. what the next state will be when the result of the state change is 'async.
method
(send an-element post-message message) → boolean?
message : message?
method
(send an-element send-event event) → boolean?
event : event?
procedure
(element/c factoryname) → flat-contract?
factoryname : string?
procedure
(parse/launch description) → (or/c (is-a?/c element%) #f)
description : string?
|
superclass: gst-object% |
Creates a new instance of element% of the type defined by an-element-factory. It will be given the name supplied, or if name is #f, a unique name will be created for it.
method
(send an-element-factory get-metadata)
→ (hash/c symbol? any/c) Returns a hash of an-element-factory metadata e.g. author, description, etc.
procedure
(element-factory%-find name)
→ (or/c (is-a?/c element-factory%) #f) name : string?
procedure
(element-factory%-make factoryname [ name #:class factory%]) → (or/c (is-a?/c element%) #f) factoryname : string? name : (or/c string? #f) = #f factory% : (subclass?/c element%) = element%
Returns #f if an element was unable to be created.
3.2.2 Events
An event in GStreamer is a small structure to describe notification signals that can be passed up and down a pipeline. Events can move both upstream and downstream, notifying elements of stream states. Send an event through a pipeline with send-event.
procedure
(event-type ev)
→
(one-of/c 'unknown 'flush-start 'flush-stop 'stream-start 'caps 'segment 'stream-collection 'tag 'buffersize 'sink-message 'stream-group-done 'eos 'toc 'protection 'segment-done 'gap 'qos 'seek 'navigation 'latency 'step 'reconfigure 'toc-select 'select-streams 'custom-upstream 'custom-downstream 'custom-downstream-oob 'custom-downstream-sticky 'custom-both 'custom-both-oob) ev : event?
procedure
(event-seqnum ev) → exact-integer?
ev : event?
Events have ever-incrementing sequence numbers. Sequence numbers are typically used to indicate that an event corresponds to some other set of messages or events.
Events and messages share the same sequence number incrementor; two events or messages will never have the same sequence number unless that correspondence was made explicitly.
procedure
(make-eos-event) → event?
The EOS event will travel down to the sink elements in the pipeline which will then post an eos-message? on the bus after they have finished playing any buffered data.
The EOS event itself will not cause any state transitions of the pipeline.
3.2.3 Contexts
A GStreamer context is a container used to store contexts that can be shared between multiple elements. Applications will set a context on an element (or a pipeline) with set-context.
procedure
(context-type context) → string?
context : context?
procedure
(context-has-type? context type) → boolean?
context : context? type : string?
procedure
(context-persistent? context) → boolean?
context : context?
procedure
(make-context type key value [persistent?]) → context?
type : string? key : string? value : any/c persistent? : boolean? = #f
procedure
(context-ref context key) → (or/c any/c #f)
context : context? key : string?