Next: GStreamer::Message::Application | Previous: GStreamer::Iterator::Tie | [Gtk2-Perl - Table of Contents] | [Gtk2-Perl - Index] |
GStreamer::Message
The various nmessage types are represented as subclasses:
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; # ... }
'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'
'any' / 'GST_MESSAGE_ANY'
Copyright (C) 2005-2008 by the gtk2-perl team.
This software is licensed under the LGPL. See GStreamer for a full notice.