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

# GStreamer::Message(3pm)

Lightweight objects to signal the application of pipeline events

## NAME

GStreamer::Message -  Lightweight objects to signal the application of pipeline events

## DESCRIPTION

The various nmessage types are represented as subclasses:

- GStreamer::Message::EOS

  - GStreamer::Message::Error

  - GStreamer::Message::Warning

  - GStreamer::Message::Info

  - GStreamer::Message::Tag

  - GStreamer::Message::Buffering

  - GStreamer::Message::StateChanged

  - GStreamer::Message::StateDirty

  - GStreamer::Message::StepDone

  - GStreamer::Message::ClockProvide

  - GStreamer::Message::ClockLost

  - GStreamer::Message::NewClock

  - GStreamer::Message::StructureChange

  - GStreamer::Message::StreamStatus

  - GStreamer::Message::Application

  - GStreamer::Message::Element

  - GStreamer::Message::SegmentStart

  - GStreamer::Message::SegmentDone

  - GStreamer::Message::Duration

  - GStreamer::Message::Latency \[0.10.12\]

  - GStreamer::Message::AsyncStart \[0.10.13\]

  - GStreamer::Message::AsyncDone \[0.10.13\]

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

To check if a message is of a certain type, use the *&* operator on the *type* method:

```
  if ($message -> type & "error") {
    # ...
  }
  elsif ($message -> type & "eos") {
    # ...
  }
```

To get to the content of a message, call the corresponding accessor:

```
  if ($message -> type & "state-changed") {
    my $old_state = $message -> old_state;
    my $new_state = $message -> new_state;
    my $pending = $message -> pending;
    # ...
  }
  elsif ($message -> type & "segment-done") {
    my $format = $message -> format;
    my $position = $message -> position;
    # ...
  }
```

## METHODS

### object = $message-\>src

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

### 64 bit unsigned = $message-\>timestamp

### messagetype = $message-\>type

## ENUMS AND FLAGS

### flags GStreamer::MessageType

- •

  'unknown' / 'GST\_MESSAGE\_UNKNOWN'

- •

  'eos' / 'GST\_MESSAGE\_EOS'

- •

  'error' / 'GST\_MESSAGE\_ERROR'

- •

  'warning' / 'GST\_MESSAGE\_WARNING'

- •

  'info' / 'GST\_MESSAGE\_INFO'

- •

  'tag' / 'GST\_MESSAGE\_TAG'

- •

  'buffering' / 'GST\_MESSAGE\_BUFFERING'

- •

  'state-changed' / 'GST\_MESSAGE\_STATE\_CHANGED'

- •

  'state-dirty' / 'GST\_MESSAGE\_STATE\_DIRTY'

- •

  'step-done' / 'GST\_MESSAGE\_STEP\_DONE'

- •

  'clock-provide' / 'GST\_MESSAGE\_CLOCK\_PROVIDE'

- •

  'clock-lost' / 'GST\_MESSAGE\_CLOCK\_LOST'

- •

  'new-clock' / 'GST\_MESSAGE\_NEW\_CLOCK'

- •

  'structure-change' / 'GST\_MESSAGE\_STRUCTURE\_CHANGE'

- •

  'stream-status' / 'GST\_MESSAGE\_STREAM\_STATUS'

- •

  'application' / 'GST\_MESSAGE\_APPLICATION'

- •

  'element' / 'GST\_MESSAGE\_ELEMENT'

- •

  'segment-start' / 'GST\_MESSAGE\_SEGMENT\_START'

- •

  'segment-done' / 'GST\_MESSAGE\_SEGMENT\_DONE'

- •

  'duration' / 'GST\_MESSAGE\_DURATION'

- •

  'latency' / 'GST\_MESSAGE\_LATENCY'

- •

  'async-start' / 'GST\_MESSAGE\_ASYNC\_START'

- •

  'async-done' / 'GST\_MESSAGE\_ASYNC\_DONE'

- •

  'request-state' / 'GST\_MESSAGE\_REQUEST\_STATE'

- •

  'step-start' / 'GST\_MESSAGE\_STEP\_START'

- •

  'qos' / 'GST\_MESSAGE\_QOS'

- •

  'progress' / 'GST\_MESSAGE\_PROGRESS'

- •

  'any' / 'GST\_MESSAGE\_ANY'

## 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.
