# Gst::CoreError Class Reference

The GStreamer core GError type. More...

Inherits Glib::Error.

Collaboration diagram for Gst::CoreError:
[legend]

List of all members.

## Public Types

enum | Code { FAILED = 1, TOO_LAZY, NOT_IMPLEMENTED, STATE_CHANGE, PAD, THREAD, NEGOTIATION, EVENT, SEEK, CAPS, TAG, MISSING_PLUGIN, CLOCK, DISABLED, NUM_ERRORS }

## Public Member Functions

| CoreError (Code error_code, const Glib::ustring& error_message)
| CoreError (GError* gobject)
Code | code () const

## Detailed Description

The GStreamer core GError type.

GStreamer elements can throw non-fatal warnings and fatal errors. Higher-level elements and applications can programatically filter the ones they are interested in or can recover from, and have a default handler handle the rest of them. Both warnings and fatal errors are treated similarly.

Core errors are errors inside the core GStreamer library:

- FAILED - a general error which doesn't fit in any other category. Make sure you add a custom message to the error call.
- TOO_LAZY - do not use this except as a placeholder for deciding where to go while developing code.
- NOT_IMPLEMENTED - use this when you do not want to implement this functionality yet.
- STATE_CHANGE - used for state change errors.
- PAD - used for pad-related errors.
- THREAD - used for thread-related errors.
- NEGOTIATION - used for negotiation-related errors.
- EVENT - used for event-related errors.
- SEEK - used for seek-related errors.
- CAPS - used for caps-related errors.
- TAG - used for negotiation-related errors.
- MISSING_PLUGIN - used if a plugin is missing.
- CLOCK - used for clock related errors.
- DISABLED - used if functionality has been disabled at compile time (Since: 0.10.13).
- NUM_ERRORS - the number of core error types.

Elements do not have the context required to decide what to do with errors. As such, they should only inform about errors, and stop their processing. In short, an element doesn't know what it is being used for.

It is the application or compound element using the given element that has more context about the use of the element. Errors can be received by listening to the Gst::Bus of the element/pipeline for Gst::Message objects with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown errors should be inspected, and filtered if appropriate.

An application is expected to, by default, present the user with a dialog box (or an equivalent) showing the error message. The dialog should also allow a way to get at the additional debug information, so the user can provide bug reporting information.

A compound element is expected to forward errors by default higher up the hierarchy; this is done by default in the same way as for other types of Gst::Message.

When applications or compound elements trigger errors that they can recover from, they can filter out these errors and take appropriate action. For example, an application that gets an error from xvimagesink that indicates all XVideo ports are taken, the application can attempt to use another sink instead.

## Member Enumeration Documentation

enum Gst::CoreError::Code

Enumerator:

  FAILED |
  TOO_LAZY |
  NOT_IMPLEMENTED |
  STATE_CHANGE |
  PAD |
  THREAD |
  NEGOTIATION |
  EVENT |
  SEEK |
  CAPS |
  TAG |
  MISSING_PLUGIN |
  CLOCK |
  DISABLED |
  NUM_ERRORS |

## Constructor & Destructor Documentation

Gst::CoreError::CoreError | ( | Code | error_code,
|  | const Glib::ustring & | error_message |
| ) |  |  |

Gst::CoreError::CoreError | ( | GError * | gobject | ) | `[explicit]`

## Member Function Documentation

Code Gst::CoreError::code | ( |  | ) | const

Reimplemented from Glib::Error.

The documentation for this class was generated from the following file:

- gstreamermm/error.h