---
name: "GStreamer::Caps"
section: "3pm"
platform: "linux"
package: "libgstreamer-perl"
version: "0.19-1+b1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/GStreamer::Caps"
---

# GStreamer::Caps(3pm)

Structure describing sets of media formats

## NAME

GStreamer::Caps -  Structure describing sets of media formats

## SYNOPSIS

```
  my $empty = GStreamer::Caps::Empty -> new();
  my $any = GStreamer::Caps::Any -> new();
  my $structure = {
    name => "urgs",
    fields => [
      [field_one => "Glib::String" => "urgs"],
      [field_two => "Glib::Int" => 23]
    ]
  };
  my $full = GStreamer::Caps::Full -> new($structure);
  my $simple = GStreamer::Caps::Simple -> new(
                 "audio/mpeg",
                 field_one => "Glib::String" => "urgs",
                 field_two => "Glib::Int" => 23);
```

## DESCRIPTION

To create a *GStreamer::Caps* object, you call one of the following constructors:

- GStreamer::Caps::Any-\>new

  - GStreamer::Caps::Empty-\>new

  - GStreamer::Caps::Full-\>new

  - GStreamer::Caps::Simple-\>new

  ## HIERARCHY

```
  Glib::Boxed
  +----GStreamer::Caps
```

## METHODS

### $caps1-\>append ($caps2)

- •

  `$caps2` (GStreamer::Caps)

### $caps-\>append\_structure ($structure)

- •

  `$structure` (GStreamer::Structure)

### boolean = $caps-\>do\_simplify

### caps = GStreamer::Caps-\>from\_string ($string)

- •

  `$string` (string)

### caps = $caps1-\>intersect ($caps2)

- •

  `$caps2` (GStreamer::Caps)

### boolean = $caps1-\>is\_always\_compatible ($caps2)

- •

  `$caps2` (GStreamer::Caps)

### boolean = $caps-\>is\_any

### boolean = $caps-\>is\_empty

### boolean = $caps1-\>is\_equal ($caps2)

- •

  `$caps2` (GStreamer::Caps)

### boolean = $caps1-\>is\_equal\_fixed ($caps2)

- •

  `$caps2` (GStreamer::Caps)

### boolean = $caps-\>is\_fixed

### boolean = $subset-\>is\_subset ($superset)

- •

  `$superset` (GStreamer::Caps)

### caps = $caps-\>make\_writable

### caps = $caps-\>normalize

### $caps-\>set\_simple ($field, $type, $value, ...)

- •

  `$field` (string)

- •

  `$type` (string)

- •

  `$value` (scalar)

- •

  ... (list)

### integer = $caps-\>get\_size

### structure = $caps-\>get\_structure ($index)

- •

  `$index` (integer)

### caps = $minuend-\>subtract ($subtrahend)

- •

  `$subtrahend` (GStreamer::Caps)

### string = $caps-\>to\_string

### $caps-\>truncate

### caps = $caps1-\>union ($caps2)

- •

  `$caps2` (GStreamer::Caps)

## SEE ALSO

GStreamer, Glib::Boxed

## COPYRIGHT

Copyright (C) 2005-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See GStreamer for a full notice.
