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

# GStreamer::Event(3pm)

Structure describing events that are passed up and down a pipeline

## NAME

GStreamer::Event -  Structure describing events that are passed up and down a pipeline

## DESCRIPTION

The various event types are represented as subclasses:

- GStreamer::Event::FlushStart

  - GStreamer::Event::FlushStop

  - GStreamer::Event::EOS

  - GStreamer::Event::NewSegment

  - GStreamer::Event::Tag

  - GStreamer::Event::BufferSize

  - GStreamer::Event::QOS

  - GStreamer::Event::Seek

  - GStreamer::Event::Navigation

  - GStreamer::Event::Custom::UP

  - GStreamer::Event::Custom::DS

  - GStreamer::Event::Custom::DS::OOB

  - GStreamer::Event::Custom::Both

  - GStreamer::Event::Custom::Both::OOB

  To create a new event, you call the constructor of the corresponding class.

To check if an event is of a certain type, use the *type* method:

```
  if ($event -> type eq "newsegment") {
    # ...
  }
  elsif ($event -> type eq "eos") {
    # ...
  }
```

To get to the content of an event, call the corresponding accessor:

```
  if ($event -> type eq "newsegment") {
    my $update = $event -> update;
    my $rate = $event -> rate;
    my $format = $event -> format;
    my $start_value = $event -> start_value;
    my $stop_value = $event -> stop_value;
    my $stream_time = $event -> stream_time;
    # ...
  }
  elsif ($event -> type eq "tag") {
    my $tag = $event -> tag;
    # ...
  }
```

## METHODS

### structure = $event-\>get\_structure

### eventtype = $event-\>type

## ENUMS AND FLAGS

### enum GStreamer::EventType

- •

  'unknown' / 'GST\_EVENT\_UNKNOWN'

- •

  'flush-start' / 'GST\_EVENT\_FLUSH\_START'

- •

  'flush-stop' / 'GST\_EVENT\_FLUSH\_STOP'

- •

  'eos' / 'GST\_EVENT\_EOS'

- •

  'newsegment' / 'GST\_EVENT\_NEWSEGMENT'

- •

  'tag' / 'GST\_EVENT\_TAG'

- •

  'buffersize' / 'GST\_EVENT\_BUFFERSIZE'

- •

  'sink-message' / 'GST\_EVENT\_SINK\_MESSAGE'

- •

  'qos' / 'GST\_EVENT\_QOS'

- •

  'seek' / 'GST\_EVENT\_SEEK'

- •

  'navigation' / 'GST\_EVENT\_NAVIGATION'

- •

  'latency' / 'GST\_EVENT\_LATENCY'

- •

  'step' / 'GST\_EVENT\_STEP'

- •

  'custom-upstream' / 'GST\_EVENT\_CUSTOM\_UPSTREAM'

- •

  'custom-downstream' / 'GST\_EVENT\_CUSTOM\_DOWNSTREAM'

- •

  'custom-downstream-oob' / 'GST\_EVENT\_CUSTOM\_DOWNSTREAM\_OOB'

- •

  'custom-both' / 'GST\_EVENT\_CUSTOM\_BOTH'

- •

  'custom-both-oob' / 'GST\_EVENT\_CUSTOM\_BOTH\_OOB'

## SEE ALSO

GStreamer

## COPYRIGHT

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

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