gstreamermm 1.8.0

Public Types | Public Member Functions | List of all members
Gst::StreamError Class Reference

The GStreamer stream GError type. More...

`#include <gstreamermm/error.h>`

Inheritance diagram for Gst::StreamError:
[legend]

## Public Types
enum | Code { FAILED = 1, TOO_LAZY, NOT_IMPLEMENTED, TYPE_NOT_FOUND, WRONG_TYPE, CODEC_NOT_FOUND, DECODE, ENCODE, DEMUX, MUX, FORMAT, DECRYPT, DECRYPT_NOKEY, NUM_ERRORS }
| Stream errors are for anything related to the stream being processed: format errors, media type errors, ... More...

## Public Member Functions
| StreamError (Code error_code, const Glib::ustring& error_message)
| StreamError (GError* gobject)
Code | code () const
Public Member Functions inherited from Glib::Error
| Error ()
| Error (GQuark error_domain, int error_code, const Glib::ustring &message)
| Error (GError *gobject, bool take_copy=false)
| Error (const Error &other)
Error & | operator= (const Error &other)
| ~Error () noexceptoverride
GQuark | domain () const
int | code () const
Glib::ustring | what () const override
bool | matches (GQuark error_domain, int error_code) const
GError * | gobj ()
const GError * | gobj () const
Public Member Functions inherited from Glib::Exception
virtual | ~Exception () noexcept=0

## Additional Inherited Members
Protected Attributes inherited from Glib::Error
GError * | gobject_

## Detailed Description

The GStreamer stream 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.

Stream errors are for anything related to the stream being processed: format errors, media type errors, ... They're typically used by decoders, demuxers, converters, ...

- 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.
- TYPE_NOT_FOUND - used when the element doesn't know the stream's type.
- WRONG_TYPE - used when the element doesn't handle this type of stream.
- CODEC_NOT_FOUND - used when there's no codec to handle the stream's type.
- DECODE - used when decoding fails.
- ENCODE - used when encoding fails.
- DEMUX - used when demuxing fails.
- MUX - used when muxing fails.
- FORMAT - used when the stream is of the wrong format (for example, wrong caps).
- DECRYPT - used when the stream is encrypted and can't be decrypted because this is not supported by the element. (Since: 0.10.20)
- DECRYPT_NOKEY - used when the stream is encrypted and can't be decrypted because no suitable key is available. (Since: 0.10.20)
- NUM_ERRORS - the number of stream 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

## § Code

enum Gst::StreamError::Code

Stream errors are for anything related to the stream being processed: format errors, media type errors, ...

They're typically used by decoders, demuxers, converters, ...

Enumerator
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.
TYPE_NOT_FOUND | Used when the element doesn't know the stream's type.
WRONG_TYPE | Used when the element doesn't handle this type of stream.
CODEC_NOT_FOUND | Used when there's no codec to handle the stream's type.
DECODE | Used when decoding fails.
ENCODE | Used when encoding fails.
DEMUX | Used when demuxing fails.
MUX | Used when muxing fails.
FORMAT | Used when the stream is of the wrong format (for example, wrong caps).
DECRYPT | Used when the stream is encrypted and can't be decrypted because this is not supported by the element.
DECRYPT_NOKEY | Used when the stream is encrypted and can't be decrypted because no suitable key is available.
NUM_ERRORS | The number of stream error types.

## Constructor & Destructor Documentation

## § StreamError() [1/2]

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

## § StreamError() [2/2]

Gst::StreamError::StreamError | ( | GError * | gobject | ) |
| explicit

## Member Function Documentation

## § code()

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