On this page:
caps?
string->caps
caps->string
caps-append!
caps-any?
caps-empty?
caps-fixed?
caps=?
7.7

3.8 Capabilities

Capabilities, or caps, are a mechanism to describe the data that can flow or currently flows through a pad. They are a structure describing media types.

procedure

(caps? v)  boolean?

  v : any/c
Returns #t if v is a cap describing media types, #f otherwise.

procedure

(string->caps str)  (or/c caps? #f)

  str : string?
Convert caps from a string representation. Returns #f if caps could not be converted from str.

procedure

(caps->string caps)  string?

  caps : caps?
Convert caps to a string representation.

procedure

(caps-append! caps1 caps2)  void?

  caps1 : caps?
  caps2 : caps?
Appends the structure contained in caps2 to caps1. The structures in caps2 are not copied — they are transferred and caps1 is mutated.

procedure

(caps-any? caps)  boolean?

  caps : caps?
Returns #t if caps represents any media format, #f otherwise.

procedure

(caps-empty? caps)  boolean?

  caps : caps?
Returns #t if caps represents no media formats, #f otherwise.

procedure

(caps-fixed? caps)  boolean?

  caps : caps?
Returns #t if caps is fixed, #f otherwise. Fixed caps describe exactly one format.

procedure

(caps=? caps1 caps2)  boolean?

  caps1 : caps?
  caps2 : caps?
Returns #t if caps1 and caps2 represent the same set of caps, #f otherwise.