| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_ERROR_H |
| 3 | #define _GSTREAMERMM_ERROR_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2008 The gstreamermm Development Team |
| 12 | * |
| 13 | * This library is free software; you can redistribute it and/or |
| 14 | * modify it under the terms of the GNU Lesser General Public |
| 15 | * License as published by the Free Software Foundation; either |
| 16 | * version 2.1 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * This library is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | * Lesser General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU Lesser General Public |
| 24 | * License along with this library; if not, write to the Free |
| 25 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 26 | */ |
| 27 | |
| 28 | |
| 29 | namespace Gst |
| 30 | { |
| 31 | |
| 32 | /** The GStreamer core GError type. |
| 33 | * GStreamer elements can throw non-fatal warnings and fatal errors. |
| 34 | * Higher-level elements and applications can programatically filter the ones |
| 35 | * they are interested in or can recover from, and have a default handler |
| 36 | * handle the rest of them. Both warnings and fatal errors are treated |
| 37 | * similarly. |
| 38 | * |
| 39 | * Core errors are errors inside the core GStreamer library: |
| 40 | * |
| 41 | * - FAILED - a general error which doesn't fit in any other category. Make |
| 42 | * sure you add a custom message to the error call. |
| 43 | * - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 44 | * go while developing code. |
| 45 | * - NOT_IMPLEMENTED - use this when you do not want to implement this |
| 46 | * functionality yet. |
| 47 | * - STATE_CHANGE - used for state change errors. |
| 48 | * - PAD - used for pad-related errors. |
| 49 | * - THREAD - used for thread-related errors. |
| 50 | * - NEGOTIATION - used for negotiation-related errors. |
| 51 | * - EVENT - used for event-related errors. |
| 52 | * - SEEK - used for seek-related errors. |
| 53 | * - CAPS - used for caps-related errors. |
| 54 | * - TAG - used for negotiation-related errors. |
| 55 | * - MISSING_PLUGIN - used if a plugin is missing. |
| 56 | * - CLOCK - used for clock related errors. |
| 57 | * - DISABLED - used if functionality has been disabled at compile time (Since: |
| 58 | * 0.10.13). |
| 59 | * - NUM_ERRORS - the number of core error types. |
| 60 | * |
| 61 | * Elements do not have the context required to decide what to do with |
| 62 | * errors. As such, they should only inform about errors, and stop their |
| 63 | * processing. In short, an element doesn't know what it is being used for. |
| 64 | * |
| 65 | * It is the application or compound element using the given element that has |
| 66 | * more context about the use of the element. Errors can be received by |
| 67 | * listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 68 | * with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 69 | * errors should be inspected, and filtered if appropriate. |
| 70 | * |
| 71 | * An application is expected to, by default, present the user with a dialog |
| 72 | * box (or an equivalent) showing the error message. The dialog should also |
| 73 | * allow a way to get at the additional debug information, so the user can |
| 74 | * provide bug reporting information. |
| 75 | * |
| 76 | * A compound element is expected to forward errors by default higher up the |
| 77 | * hierarchy; this is done by default in the same way as for other types of |
| 78 | * Gst::Message. |
| 79 | * |
| 80 | * When applications or compound elements trigger errors that they can |
| 81 | * recover from, they can filter out these errors and take appropriate |
| 82 | * action. For example, an application that gets an error from xvimagesink |
| 83 | * that indicates all XVideo ports are taken, the application can attempt to |
| 84 | * use another sink instead. |
| 85 | */ |
| 86 | class CoreError : public Glib::Error |
| 87 | { |
| 88 | public: |
| 89 | /** @var Code FAILED |
| 90 | * A general error which doesn't fit in any other |
| 91 | * category. Make sure you add a custom message to the error call. |
| 92 | * |
| 93 | * @var Code TOO_LAZY |
| 94 | * Do not use this except as a placeholder for |
| 95 | * deciding where to go while developing code. |
| 96 | * |
| 97 | * @var Code NOT_IMPLEMENTED |
| 98 | * Use this when you do not want to implement |
| 99 | * this functionality yet. |
| 100 | * |
| 101 | * @var Code STATE_CHANGE |
| 102 | * Used for state change errors. |
| 103 | * |
| 104 | * @var Code PAD |
| 105 | * Used for pad-related errors. |
| 106 | * |
| 107 | * @var Code THREAD |
| 108 | * Used for thread-related errors. |
| 109 | * |
| 110 | * @var Code NEGOTIATION |
| 111 | * Used for negotiation-related errors. |
| 112 | * |
| 113 | * @var Code EVENT |
| 114 | * Used for event-related errors. |
| 115 | * |
| 116 | * @var Code SEEK |
| 117 | * Used for seek-related errors. |
| 118 | * |
| 119 | * @var Code CAPS |
| 120 | * Used for caps-related errors. |
| 121 | * |
| 122 | * @var Code TAG |
| 123 | * Used for negotiation-related errors. |
| 124 | * |
| 125 | * @var Code MISSING_PLUGIN |
| 126 | * Used if a plugin is missing. |
| 127 | * |
| 128 | * @var Code CLOCK |
| 129 | * Used for clock related errors. |
| 130 | * |
| 131 | * @var Code DISABLED |
| 132 | * Used if functionality has been disabled at |
| 133 | * compile time. |
| 134 | * |
| 135 | * @var Code NUM_ERRORS |
| 136 | * The number of core error types. |
| 137 | * |
| 138 | * @enum Code |
| 139 | * |
| 140 | * Core errors are errors inside the core GStreamer library. |
| 141 | */ |
| 142 | enum Code |
| 143 | { |
| 144 | FAILED = 1, |
| 145 | TOO_LAZY, |
| 146 | NOT_IMPLEMENTED, |
| 147 | STATE_CHANGE, |
| 148 | PAD, |
| 149 | THREAD, |
| 150 | NEGOTIATION, |
| 151 | EVENT, |
| 152 | SEEK, |
| 153 | CAPS, |
| 154 | TAG, |
| 155 | MISSING_PLUGIN, |
| 156 | CLOCK, |
| 157 | DISABLED, |
| 158 | NUM_ERRORS |
| 159 | }; |
| 160 | |
| 161 | CoreError(Code error_code, const Glib::ustring& error_message); |
| 162 | explicit CoreError(GError* gobject); |
| 163 | Code code() const; |
| 164 | |
| 165 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 166 | private: |
| 167 | |
| 168 | static void throw_func(GError* gobject); |
| 169 | |
| 170 | friend void wrap_init(); // uses throw_func() |
| 171 | |
| 172 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 173 | }; |
| 174 | |
| 175 | |
| 176 | /** Gets the error domain for core system. Errors in this domain will be from |
| 177 | * the Gst::CoreError enumeration. |
| 178 | * |
| 179 | * @return The quark associated with the core error domain. |
| 180 | */ |
| 181 | Glib::QueryQuark get_core_error_quark(); |
| 182 | |
| 183 | /** The GStreamer library GError type. |
| 184 | * GStreamer elements can throw non-fatal warnings and fatal errors. |
| 185 | * Higher-level elements and applications can programatically filter the ones |
| 186 | * they are interested in or can recover from, and have a default handler |
| 187 | * handle the rest of them. Both warnings and fatal errors are treated |
| 188 | * similarly. |
| 189 | * |
| 190 | * Library errors are for errors from the library being used by elements |
| 191 | * (initializing, finalizing, settings, ...) |
| 192 | * |
| 193 | * - FAILED - a general error which doesn't fit in any other category. Make |
| 194 | * sure you add a custom message to the error call. |
| 195 | * - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 196 | * go while developing code. |
| 197 | * - INIT - used when the library could not be opened. |
| 198 | * - SHUTDOWN - used when the library could not be closed. |
| 199 | * - SETTINGS - used when the library doesn't accept settings. |
| 200 | * - ENCODE - used when the library generated an encoding error. |
| 201 | * - NUM_ERRORS - the number of library error types. |
| 202 | * |
| 203 | * Elements do not have the context required to decide what to do with |
| 204 | * errors. As such, they should only inform about errors, and stop their |
| 205 | * processing. In short, an element doesn't know what it is being used for. |
| 206 | * |
| 207 | * It is the application or compound element using the given element that has |
| 208 | * more context about the use of the element. Errors can be received by |
| 209 | * listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 210 | * with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 211 | * errors should be inspected, and filtered if appropriate. |
| 212 | * |
| 213 | * An application is expected to, by default, present the user with a dialog |
| 214 | * box (or an equivalent) showing the error message. The dialog should also |
| 215 | * allow a way to get at the additional debug information, so the user can |
| 216 | * provide bug reporting information. |
| 217 | * |
| 218 | * A compound element is expected to forward errors by default higher up the |
| 219 | * hierarchy; this is done by default in the same way as for other types of |
| 220 | * Gst::Message. |
| 221 | * |
| 222 | * When applications or compound elements trigger errors that they can |
| 223 | * recover from, they can filter out these errors and take appropriate |
| 224 | * action. For example, an application that gets an error from xvimagesink |
| 225 | * that indicates all XVideo ports are taken, the application can attempt to |
| 226 | * use another sink instead. |
| 227 | */ |
| 228 | class LibraryError : public Glib::Error |
| 229 | { |
| 230 | public: |
| 231 | /** @var Code FAILED |
| 232 | * A general error which doesn't fit in any other |
| 233 | * category. Make sure you add a custom message to the error call. |
| 234 | * |
| 235 | * @var Code TOO_LAZY |
| 236 | * Do not use this except as a placeholder for |
| 237 | * deciding where to go while developing code. |
| 238 | * |
| 239 | * @var Code INIT |
| 240 | * Used when the library could not be opened. |
| 241 | * |
| 242 | * @var Code SHUTDOWN |
| 243 | * Used when the library could not be closed. |
| 244 | * |
| 245 | * @var Code SETTINGS |
| 246 | * Used when the library doesn't accept settings. |
| 247 | * |
| 248 | * @var Code ENCODE |
| 249 | * Used when the library generated an encoding error. |
| 250 | * |
| 251 | * @var Code NUM_ERRORS |
| 252 | * The number of library error types. |
| 253 | * |
| 254 | * @enum Code |
| 255 | * |
| 256 | * Library errors are for errors from the library being used by elements |
| 257 | * (initializing, finalizing, settings, ...) |
| 258 | */ |
| 259 | enum Code |
| 260 | { |
| 261 | FAILED = 1, |
| 262 | TOO_LAZY, |
| 263 | INIT, |
| 264 | SHUTDOWN, |
| 265 | SETTINGS, |
| 266 | ENCODE, |
| 267 | NUM_ERRORS |
| 268 | }; |
| 269 | |
| 270 | LibraryError(Code error_code, const Glib::ustring& error_message); |
| 271 | explicit LibraryError(GError* gobject); |
| 272 | Code code() const; |
| 273 | |
| 274 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 275 | private: |
| 276 | |
| 277 | static void throw_func(GError* gobject); |
| 278 | |
| 279 | friend void wrap_init(); // uses throw_func() |
| 280 | |
| 281 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 282 | }; |
| 283 | |
| 284 | |
| 285 | /** Gets the error domain for library loading. Errors in this domain will be |
| 286 | * from the gst::libraryerror enumeration. |
| 287 | * |
| 288 | * @return The quark associated with the library error domain. |
| 289 | */ |
| 290 | Glib::QueryQuark get_library_error_quark(); |
| 291 | |
| 292 | /** The GStreamer resource GError type. |
| 293 | * GStreamer elements can throw non-fatal warnings and fatal errors. |
| 294 | * Higher-level elements and applications can programatically filter the ones |
| 295 | * they are interested in or can recover from, and have a default handler |
| 296 | * handle the rest of them. Both warnings and fatal errors are treated |
| 297 | * similarly. |
| 298 | * |
| 299 | * Resource errors are for any resource used by an element: memory, files, |
| 300 | * network connections, process space, ... They're typically used by source and |
| 301 | * sink elements. |
| 302 | * |
| 303 | * - FAILED - a general error which doesn't fit in any other category. Make |
| 304 | * sure you add a custom message to the error call. |
| 305 | * - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 306 | * go while developing code. |
| 307 | * - NOT_FOUND - used when the resource could not be found. |
| 308 | * - BUSY - used when resource is busy. |
| 309 | * - OPEN_READ - used when resource fails to open for reading. |
| 310 | * - OPEN_WRITE - used when resource fails to open for writing. |
| 311 | * - OPEN_READ_WRITE - used when resource cannot be opened for both reading and |
| 312 | * writing, or either (but unspecified which). |
| 313 | * - CLOSE - used when the resource can't be closed. |
| 314 | * - READ - used when the resource can't be read from. |
| 315 | * - WRITE - used when the resource can't be written to. |
| 316 | * - SEEK - used when a seek on the resource fails. |
| 317 | * - SYNC - used when a synchronize on the resource fails. |
| 318 | * - SETTINGS - used when settings can't be manipulated on. |
| 319 | * - NO_SPACE_LEFT - used when the resource has no space left. |
| 320 | * - NUM_ERRORS - the number of resource error types. |
| 321 | * |
| 322 | * Elements do not have the context required to decide what to do with |
| 323 | * errors. As such, they should only inform about errors, and stop their |
| 324 | * processing. In short, an element doesn't know what it is being used for. |
| 325 | * |
| 326 | * It is the application or compound element using the given element that has |
| 327 | * more context about the use of the element. Errors can be received by |
| 328 | * listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 329 | * with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 330 | * errors should be inspected, and filtered if appropriate. |
| 331 | * |
| 332 | * An application is expected to, by default, present the user with a dialog |
| 333 | * box (or an equivalent) showing the error message. The dialog should also |
| 334 | * allow a way to get at the additional debug information, so the user can |
| 335 | * provide bug reporting information. |
| 336 | * |
| 337 | * A compound element is expected to forward errors by default higher up the |
| 338 | * hierarchy; this is done by default in the same way as for other types of |
| 339 | * Gst::Message. |
| 340 | * |
| 341 | * When applications or compound elements trigger errors that they can |
| 342 | * recover from, they can filter out these errors and take appropriate |
| 343 | * action. For example, an application that gets an error from xvimagesink |
| 344 | * that indicates all XVideo ports are taken, the application can attempt to |
| 345 | * use another sink instead. |
| 346 | */ |
| 347 | class ResourceError : public Glib::Error |
| 348 | { |
| 349 | public: |
| 350 | /** @var Code FAILED |
| 351 | * A general error which doesn't fit in any other |
| 352 | * category. Make sure you add a custom message to the error call. |
| 353 | * |
| 354 | * @var Code TOO_LAZY |
| 355 | * Do not use this except as a placeholder for |
| 356 | * deciding where to go while developing code. |
| 357 | * |
| 358 | * @var Code NOT_FOUND |
| 359 | * Used when the resource could not be found. |
| 360 | * |
| 361 | * @var Code BUSY |
| 362 | * Used when resource is busy. |
| 363 | * |
| 364 | * @var Code OPEN_READ |
| 365 | * Used when resource fails to open for reading. |
| 366 | * |
| 367 | * @var Code OPEN_WRITE |
| 368 | * Used when resource fails to open for writing. |
| 369 | * |
| 370 | * @var Code OPEN_READ_WRITE |
| 371 | * Used when resource cannot be opened for |
| 372 | * both reading and writing, or either (but unspecified which). |
| 373 | * |
| 374 | * @var Code CLOSE |
| 375 | * Used when the resource can't be closed. |
| 376 | * |
| 377 | * @var Code READ |
| 378 | * Used when the resource can't be read from. |
| 379 | * |
| 380 | * @var Code WRITE |
| 381 | * Used when the resource can't be written to. |
| 382 | * |
| 383 | * @var Code SEEK |
| 384 | * Used when a seek on the resource fails. |
| 385 | * |
| 386 | * @var Code SYNC |
| 387 | * Used when a synchronize on the resource fails. |
| 388 | * |
| 389 | * @var Code SETTINGS |
| 390 | * Used when settings can't be manipulated on. |
| 391 | * |
| 392 | * @var Code NO_SPACE_LEFT |
| 393 | * Used when the resource has no space left. |
| 394 | * |
| 395 | * @var Code NOT_AUTHORIZED |
| 396 | * Used when the resource can't be opened |
| 397 | * due to missing authorization. |
| 398 | * (Since 1.2.4). |
| 399 | * |
| 400 | * @var Code NUM_ERRORS |
| 401 | * The number of resource error types. |
| 402 | * |
| 403 | * @enum Code |
| 404 | * |
| 405 | * Resource errors are for any resource used by an element: |
| 406 | * memory, files, network connections, process space, ... |
| 407 | * They're typically used by source and sink elements. |
| 408 | */ |
| 409 | enum Code |
| 410 | { |
| 411 | FAILED = 1, |
| 412 | TOO_LAZY, |
| 413 | NOT_FOUND, |
| 414 | BUSY, |
| 415 | OPEN_READ, |
| 416 | OPEN_WRITE, |
| 417 | OPEN_READ_WRITE, |
| 418 | CLOSE, |
| 419 | READ, |
| 420 | WRITE, |
| 421 | SEEK, |
| 422 | SYNC, |
| 423 | SETTINGS, |
| 424 | NO_SPACE_LEFT, |
| 425 | NOT_AUTHORIZED, |
| 426 | NUM_ERRORS |
| 427 | }; |
| 428 | |
| 429 | ResourceError(Code error_code, const Glib::ustring& error_message); |
| 430 | explicit ResourceError(GError* gobject); |
| 431 | Code code() const; |
| 432 | |
| 433 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 434 | private: |
| 435 | |
| 436 | static void throw_func(GError* gobject); |
| 437 | |
| 438 | friend void wrap_init(); // uses throw_func() |
| 439 | |
| 440 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 441 | }; |
| 442 | |
| 443 | |
| 444 | /** Gets error domain for resource handling. Errors in this domain will be |
| 445 | * from the Gst::ResourceError enumeration. |
| 446 | * |
| 447 | * @return The quark associated with the resource error domain. |
| 448 | */ |
| 449 | Glib::QueryQuark get_resource_error_quark(); |
| 450 | |
| 451 | /** The GStreamer stream GError type. |
| 452 | * GStreamer elements can throw non-fatal warnings and fatal errors. |
| 453 | * Higher-level elements and applications can programatically filter the ones |
| 454 | * they are interested in or can recover from, and have a default handler |
| 455 | * handle the rest of them. Both warnings and fatal errors are treated |
| 456 | * similarly. |
| 457 | * |
| 458 | * Stream errors are for anything related to the stream being processed: format |
| 459 | * errors, media type errors, ... They're typically used by decoders, demuxers, |
| 460 | * converters, ... |
| 461 | * |
| 462 | * - FAILED - a general error which doesn't fit in any other category. Make |
| 463 | * sure you add a custom message to the error call. |
| 464 | * - TOO_LAZY - do not use this except as a placeholder for deciding where to |
| 465 | * go while developing code. |
| 466 | * - NOT_IMPLEMENTED - use this when you do not want to implement this |
| 467 | * functionality yet. |
| 468 | * - TYPE_NOT_FOUND - used when the element doesn't know the stream's type. |
| 469 | * - WRONG_TYPE - used when the element doesn't handle this type of stream. |
| 470 | * - CODEC_NOT_FOUND - used when there's no codec to handle the stream's type. |
| 471 | * - DECODE - used when decoding fails. |
| 472 | * - ENCODE - used when encoding fails. |
| 473 | * - DEMUX - used when demuxing fails. |
| 474 | * - MUX - used when muxing fails. |
| 475 | * - FORMAT - used when the stream is of the wrong format (for example, wrong |
| 476 | * caps). |
| 477 | * - DECRYPT - used when the stream is encrypted and can't be decrypted because |
| 478 | * this is not supported by the element. (Since: 0.10.20) |
| 479 | * - DECRYPT_NOKEY - used when the stream is encrypted and can't be decrypted |
| 480 | * because no suitable key is available. (Since: 0.10.20) |
| 481 | * - NUM_ERRORS - the number of stream error types. |
| 482 | * |
| 483 | * Elements do not have the context required to decide what to do with |
| 484 | * errors. As such, they should only inform about errors, and stop their |
| 485 | * processing. In short, an element doesn't know what it is being used for. |
| 486 | * |
| 487 | * It is the application or compound element using the given element that has |
| 488 | * more context about the use of the element. Errors can be received by |
| 489 | * listening to the Gst::Bus of the element/pipeline for Gst::Message objects |
| 490 | * with the type Gst::MESSAGE_ERROR or Gst::MESSAGE_WARNING. The thrown |
| 491 | * errors should be inspected, and filtered if appropriate. |
| 492 | * |
| 493 | * An application is expected to, by default, present the user with a dialog |
| 494 | * box (or an equivalent) showing the error message. The dialog should also |
| 495 | * allow a way to get at the additional debug information, so the user can |
| 496 | * provide bug reporting information. |
| 497 | * |
| 498 | * A compound element is expected to forward errors by default higher up the |
| 499 | * hierarchy; this is done by default in the same way as for other types of |
| 500 | * Gst::Message. |
| 501 | * |
| 502 | * When applications or compound elements trigger errors that they can |
| 503 | * recover from, they can filter out these errors and take appropriate |
| 504 | * action. For example, an application that gets an error from xvimagesink |
| 505 | * that indicates all XVideo ports are taken, the application can attempt to |
| 506 | * use another sink instead. |
| 507 | */ |
| 508 | class StreamError : public Glib::Error |
| 509 | { |
| 510 | public: |
| 511 | /** @var Code FAILED |
| 512 | * A general error which doesn't fit in any other |
| 513 | * category. Make sure you add a custom message to the error call. |
| 514 | * |
| 515 | * @var Code TOO_LAZY |
| 516 | * Do not use this except as a placeholder for |
| 517 | * deciding where to go while developing code. |
| 518 | * |
| 519 | * @var Code NOT_IMPLEMENTED |
| 520 | * Use this when you do not want to implement |
| 521 | * this functionality yet. |
| 522 | * |
| 523 | * @var Code TYPE_NOT_FOUND |
| 524 | * Used when the element doesn't know the |
| 525 | * stream's type. |
| 526 | * |
| 527 | * @var Code WRONG_TYPE |
| 528 | * Used when the element doesn't handle this type |
| 529 | * of stream. |
| 530 | * |
| 531 | * @var Code CODEC_NOT_FOUND |
| 532 | * Used when there's no codec to handle the |
| 533 | * stream's type. |
| 534 | * |
| 535 | * @var Code DECODE |
| 536 | * Used when decoding fails. |
| 537 | * |
| 538 | * @var Code ENCODE |
| 539 | * Used when encoding fails. |
| 540 | * |
| 541 | * @var Code DEMUX |
| 542 | * Used when demuxing fails. |
| 543 | * |
| 544 | * @var Code MUX |
| 545 | * Used when muxing fails. |
| 546 | * |
| 547 | * @var Code FORMAT |
| 548 | * Used when the stream is of the wrong format |
| 549 | * (for example, wrong caps). |
| 550 | * |
| 551 | * @var Code DECRYPT |
| 552 | * Used when the stream is encrypted and can't be |
| 553 | * decrypted because this is not supported by the element. |
| 554 | * |
| 555 | * @var Code DECRYPT_NOKEY |
| 556 | * Used when the stream is encrypted and |
| 557 | * can't be decrypted because no suitable key is available. |
| 558 | * |
| 559 | * @var Code NUM_ERRORS |
| 560 | * The number of stream error types. |
| 561 | * |
| 562 | * @enum Code |
| 563 | * |
| 564 | * Stream errors are for anything related to the stream being processed: |
| 565 | * format errors, media type errors, ... |
| 566 | * They're typically used by decoders, demuxers, converters, ... |
| 567 | */ |
| 568 | enum Code |
| 569 | { |
| 570 | FAILED = 1, |
| 571 | TOO_LAZY, |
| 572 | NOT_IMPLEMENTED, |
| 573 | TYPE_NOT_FOUND, |
| 574 | WRONG_TYPE, |
| 575 | CODEC_NOT_FOUND, |
| 576 | DECODE, |
| 577 | ENCODE, |
| 578 | DEMUX, |
| 579 | MUX, |
| 580 | FORMAT, |
| 581 | DECRYPT, |
| 582 | DECRYPT_NOKEY, |
| 583 | NUM_ERRORS |
| 584 | }; |
| 585 | |
| 586 | StreamError(Code error_code, const Glib::ustring& error_message); |
| 587 | explicit StreamError(GError* gobject); |
| 588 | Code code() const; |
| 589 | |
| 590 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 591 | private: |
| 592 | |
| 593 | static void throw_func(GError* gobject); |
| 594 | |
| 595 | friend void wrap_init(); // uses throw_func() |
| 596 | |
| 597 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 598 | }; |
| 599 | |
| 600 | |
| 601 | /** Gets error domain for media stream processing. Errors in this domain will |
| 602 | * be from the Gst::StreamError enumeration. |
| 603 | * |
| 604 | * @return The quark associated with the media stream error domain. |
| 605 | */ |
| 606 | Glib::QueryQuark get_stream_error_quark(); |
| 607 | |
| 608 | } // namespace Gst |
| 609 | |
| 610 | |
| 611 | #endif /* _GSTREAMERMM_ERROR_H */ |
| 612 |