| 1 |
/* gstreamermm - a C++ wrapper for gstreamer |
| 2 |
* |
| 3 |
* Copyright 2008 The gstreamermm Development Team |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, write to the Free |
| 17 |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
_DEFS(gstreamermm,gst) |
| 21 |
|
| 22 |
namespace Gst |
| 23 |
{ |
| 24 |
|
| 25 |
/** The GStreamer core GError type. |
| 26 |
* GStreamer elements can throw non-fatal warnings and fatal errors. |
| 27 |
* Higher-level elements and applications can programatically filter the ones |
| 28 |
* they are interested in or can recover from, and have a default handler |
| 29 |
* handle the rest of them. Both warnings and fatal errors are treated |
| 30 |
* similarly. |
| 31 |
* |
| 32 |
* Core errors are errors inside the core GStreamer library: |
| 33 |
* |
| 34 |
* - FAILED - a general error which doesn't fit in any other category. Make |
| 35 |
* sure you add a custom message to the error call. |
| 36 |
* - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 37 |
* go while developing code. |
| 38 |
* - NOT_IMPLEMENTED - use this when you do not want to implement this |
| 39 |
* functionality yet. |
| 40 |
* - STATE_CHANGE - used for state change errors. |
| 41 |
* - PAD - used for pad-related errors. |
| 42 |
* - THREAD - used for thread-related errors. |
| 43 |
* - NEGOTIATION - used for negotiation-related errors. |
| 44 |
* - EVENT - used for event-related errors. |
| 45 |
* - SEEK - used for seek-related errors. |
| 46 |
* - CAPS - used for caps-related errors. |
| 47 |
* - TAG - used for negotiation-related errors. |
| 48 |
* - MISSING_PLUGIN - used if a plugin is missing. |
| 49 |
* - CLOCK - used for clock related errors. |
| 50 |
* - DISABLED - used if functionality has been disabled at compile time (Since: |
| 51 |
* 0.10.13). |
| 52 |
* - NUM_ERRORS - the number of core error types. |
| 53 |
* |
| 54 |
* Elements do not have the context required to decide what to do with |
| 55 |
* errors. As such, they should only inform about errors, and stop their |
| 56 |
* processing. In short, an element doesn't know what it is being used for. |
| 57 |
* |
| 58 |
* It is the application or compound element using the given element that has |
| 59 |
* more context about the use of the element. Errors can be received by |
| 60 |
* listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 61 |
* with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 62 |
* errors should be inspected, and filtered if appropriate. |
| 63 |
* |
| 64 |
* An application is expected to, by default, present the user with a dialog |
| 65 |
* box (or an equivalent) showing the error message. The dialog should also |
| 66 |
* allow a way to get at the additional debug information, so the user can |
| 67 |
* provide bug reporting information. |
| 68 |
* |
| 69 |
* A compound element is expected to forward errors by default higher up the |
| 70 |
* hierarchy; this is done by default in the same way as for other types of |
| 71 |
* Gst::Message. |
| 72 |
* |
| 73 |
* When applications or compound elements trigger errors that they can |
| 74 |
* recover from, they can filter out these errors and take appropriate |
| 75 |
* action. For example, an application that gets an error from xvimagesink |
| 76 |
* that indicates all XVideo ports are taken, the application can attempt to |
| 77 |
* use another sink instead. |
| 78 |
*/ |
| 79 |
_WRAP_GERROR(CoreError, GstCoreError, GST_CORE_ERROR, NO_GTYPE) |
| 80 |
|
| 81 |
/** Gets the error domain for core system. Errors in this domain will be from |
| 82 |
* the Gst::CoreError enumeration. |
| 83 |
* |
| 84 |
* @return The quark associated with the core error domain. |
| 85 |
*/ |
| 86 |
Glib::QueryQuark get_core_error_quark(); |
| 87 |
|
| 88 |
/** The GStreamer library GError type. |
| 89 |
* GStreamer elements can throw non-fatal warnings and fatal errors. |
| 90 |
* Higher-level elements and applications can programatically filter the ones |
| 91 |
* they are interested in or can recover from, and have a default handler |
| 92 |
* handle the rest of them. Both warnings and fatal errors are treated |
| 93 |
* similarly. |
| 94 |
* |
| 95 |
* Library errors are for errors from the library being used by elements |
| 96 |
* (initializing, finalizing, settings, ...) |
| 97 |
* |
| 98 |
* - FAILED - a general error which doesn't fit in any other category. Make |
| 99 |
* sure you add a custom message to the error call. |
| 100 |
* - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 101 |
* go while developing code. |
| 102 |
* - INIT - used when the library could not be opened. |
| 103 |
* - SHUTDOWN - used when the library could not be closed. |
| 104 |
* - SETTINGS - used when the library doesn't accept settings. |
| 105 |
* - ENCODE - used when the library generated an encoding error. |
| 106 |
* - NUM_ERRORS - the number of library error types. |
| 107 |
* |
| 108 |
* Elements do not have the context required to decide what to do with |
| 109 |
* errors. As such, they should only inform about errors, and stop their |
| 110 |
* processing. In short, an element doesn't know what it is being used for. |
| 111 |
* |
| 112 |
* It is the application or compound element using the given element that has |
| 113 |
* more context about the use of the element. Errors can be received by |
| 114 |
* listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 115 |
* with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 116 |
* errors should be inspected, and filtered if appropriate. |
| 117 |
* |
| 118 |
* An application is expected to, by default, present the user with a dialog |
| 119 |
* box (or an equivalent) showing the error message. The dialog should also |
| 120 |
* allow a way to get at the additional debug information, so the user can |
| 121 |
* provide bug reporting information. |
| 122 |
* |
| 123 |
* A compound element is expected to forward errors by default higher up the |
| 124 |
* hierarchy; this is done by default in the same way as for other types of |
| 125 |
* Gst::Message. |
| 126 |
* |
| 127 |
* When applications or compound elements trigger errors that they can |
| 128 |
* recover from, they can filter out these errors and take appropriate |
| 129 |
* action. For example, an application that gets an error from xvimagesink |
| 130 |
* that indicates all XVideo ports are taken, the application can attempt to |
| 131 |
* use another sink instead. |
| 132 |
*/ |
| 133 |
_WRAP_GERROR(LibraryError, GstLibraryError, GST_LIBRARY_ERROR, NO_GTYPE) |
| 134 |
|
| 135 |
/** Gets the error domain for library loading. Errors in this domain will be |
| 136 |
* from the gst::libraryerror enumeration. |
| 137 |
* |
| 138 |
* @return The quark associated with the library error domain. |
| 139 |
*/ |
| 140 |
Glib::QueryQuark get_library_error_quark(); |
| 141 |
|
| 142 |
/** The GStreamer resource GError type. |
| 143 |
* GStreamer elements can throw non-fatal warnings and fatal errors. |
| 144 |
* Higher-level elements and applications can programatically filter the ones |
| 145 |
* they are interested in or can recover from, and have a default handler |
| 146 |
* handle the rest of them. Both warnings and fatal errors are treated |
| 147 |
* similarly. |
| 148 |
* |
| 149 |
* Resource errors are for any resource used by an element: memory, files, |
| 150 |
* network connections, process space, ... They're typically used by source and |
| 151 |
* sink elements. |
| 152 |
* |
| 153 |
* - FAILED - a general error which doesn't fit in any other category. Make |
| 154 |
* sure you add a custom message to the error call. |
| 155 |
* - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 156 |
* go while developing code. |
| 157 |
* - NOT_FOUND - used when the resource could not be found. |
| 158 |
* - BUSY - used when resource is busy. |
| 159 |
* - OPEN_READ - used when resource fails to open for reading. |
| 160 |
* - OPEN_WRITE - used when resource fails to open for writing. |
| 161 |
* - OPEN_READ_WRITE - used when resource cannot be opened for both reading and |
| 162 |
* writing, or either (but unspecified which). |
| 163 |
* - CLOSE - used when the resource can't be closed. |
| 164 |
* - READ - used when the resource can't be read from. |
| 165 |
* - WRITE - used when the resource can't be written to. |
| 166 |
* - SEEK - used when a seek on the resource fails. |
| 167 |
* - SYNC - used when a synchronize on the resource fails. |
| 168 |
* - SETTINGS - used when settings can't be manipulated on. |
| 169 |
* - NO_SPACE_LEFT - used when the resource has no space left. |
| 170 |
* - NUM_ERRORS - the number of resource error types. |
| 171 |
* |
| 172 |
* Elements do not have the context required to decide what to do with |
| 173 |
* errors. As such, they should only inform about errors, and stop their |
| 174 |
* processing. In short, an element doesn't know what it is being used for. |
| 175 |
* |
| 176 |
* It is the application or compound element using the given element that has |
| 177 |
* more context about the use of the element. Errors can be received by |
| 178 |
* listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 179 |
* with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 180 |
* errors should be inspected, and filtered if appropriate. |
| 181 |
* |
| 182 |
* An application is expected to, by default, present the user with a dialog |
| 183 |
* box (or an equivalent) showing the error message. The dialog should also |
| 184 |
* allow a way to get at the additional debug information, so the user can |
| 185 |
* provide bug reporting information. |
| 186 |
* |
| 187 |
* A compound element is expected to forward errors by default higher up the |
| 188 |
* hierarchy; this is done by default in the same way as for other types of |
| 189 |
* Gst::Message. |
| 190 |
* |
| 191 |
* When applications or compound elements trigger errors that they can |
| 192 |
* recover from, they can filter out these errors and take appropriate |
| 193 |
* action. For example, an application that gets an error from xvimagesink |
| 194 |
* that indicates all XVideo ports are taken, the application can attempt to |
| 195 |
* use another sink instead. |
| 196 |
*/ |
| 197 |
_WRAP_GERROR(ResourceError, GstResourceError, GST_RESOURCE_ERROR, NO_GTYPE) |
| 198 |
|
| 199 |
/** Gets error domain for resource handling. Errors in this domain will be |
| 200 |
* from the Gst::ResourceError enumeration. |
| 201 |
* |
| 202 |
* @return The quark associated with the resource error domain. |
| 203 |
*/ |
| 204 |
Glib::QueryQuark get_resource_error_quark(); |
| 205 |
|
| 206 |
/** The GStreamer stream GError type. |
| 207 |
* GStreamer elements can throw non-fatal warnings and fatal errors. |
| 208 |
* Higher-level elements and applications can programatically filter the ones |
| 209 |
* they are interested in or can recover from, and have a default handler |
| 210 |
* handle the rest of them. Both warnings and fatal errors are treated |
| 211 |
* similarly. |
| 212 |
* |
| 213 |
* Stream errors are for anything related to the stream being processed: format |
| 214 |
* errors, media type errors, ... They're typically used by decoders, demuxers, |
| 215 |
* converters, ... |
| 216 |
* |
| 217 |
* - FAILED - a general error which doesn't fit in any other category. Make |
| 218 |
* sure you add a custom message to the error call. |
| 219 |
* - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 220 |
* go while developing code. |
| 221 |
* - NOT_IMPLEMENTED - use this when you do not want to implement this |
| 222 |
* functionality yet. |
| 223 |
* - TYPE_NOT_FOUND - used when the element doesn't know the stream's type. |
| 224 |
* - WRONG_TYPE - used when the element doesn't handle this type of stream. |
| 225 |
* - CODEC_NOT_FOUND - used when there's no codec to handle the stream's type. |
| 226 |
* - DECODE - used when decoding fails. |
| 227 |
* - ENCODE - used when encoding fails. |
| 228 |
* - DEMUX - used when demuxing fails. |
| 229 |
* - MUX - used when muxing fails. |
| 230 |
* - FORMAT - used when the stream is of the wrong format (for example, wrong |
| 231 |
* caps). |
| 232 |
* - DECRYPT - used when the stream is encrypted and can't be decrypted because |
| 233 |
* this is not supported by the element. (Since: 0.10.20) |
| 234 |
* - DECRYPT_NOKEY - used when the stream is encrypted and can't be decrypted |
| 235 |
* because no suitable key is available. (Since: 0.10.20) |
| 236 |
* - NUM_ERRORS - the number of stream error types. |
| 237 |
* |
| 238 |
* Elements do not have the context required to decide what to do with |
| 239 |
* errors. As such, they should only inform about errors, and stop their |
| 240 |
* processing. In short, an element doesn't know what it is being used for. |
| 241 |
* |
| 242 |
* It is the application or compound element using the given element that has |
| 243 |
* more context about the use of the element. Errors can be received by |
| 244 |
* listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 245 |
* with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 246 |
* errors should be inspected, and filtered if appropriate. |
| 247 |
* |
| 248 |
* An application is expected to, by default, present the user with a dialog |
| 249 |
* box (or an equivalent) showing the error message. The dialog should also |
| 250 |
* allow a way to get at the additional debug information, so the user can |
| 251 |
* provide bug reporting information. |
| 252 |
* |
| 253 |
* A compound element is expected to forward errors by default higher up the |
| 254 |
* hierarchy; this is done by default in the same way as for other types of |
| 255 |
* Gst::Message. |
| 256 |
* |
| 257 |
* When applications or compound elements trigger errors that they can |
| 258 |
* recover from, they can filter out these errors and take appropriate |
| 259 |
* action. For example, an application that gets an error from xvimagesink |
| 260 |
* that indicates all XVideo ports are taken, the application can attempt to |
| 261 |
* use another sink instead. |
| 262 |
*/ |
| 263 |
_WRAP_GERROR(StreamError, GstStreamError, GST_STREAM_ERROR, NO_GTYPE) |
| 264 |
|
| 265 |
/** Gets error domain for media stream processing. Errors in this domain will |
| 266 |
* be from the Gst::StreamError enumeration. |
| 267 |
* |
| 268 |
* @return The quark associated with the media stream error domain. |
| 269 |
*/ |
| 270 |
Glib::QueryQuark get_stream_error_quark(); |
| 271 |
|
| 272 |
} // namespace Gst |