mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
add GstGError to help the bindings
Original commit message from CVS: add GstGError to help the bindings
This commit is contained in:
parent
e36f583bab
commit
deb1c93227
6 changed files with 51 additions and 20 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2004-03-09 Johan Dahlin <johan@gnome.org>
|
||||
|
||||
Reviewed by: Thomas Vander Stichele
|
||||
|
||||
* gst/gstelement.c (gst_element_class_init): register second
|
||||
parameter as GST_TYPE_G_ERROR instead of G_TYPE_POINTER, so
|
||||
language bindings can (de)marshall correctly.
|
||||
|
||||
* gst/gsterror.h: Add GST_TYPE_G_ERROR and cleanup a little bit
|
||||
|
||||
* gst/gsterror.c (gst_g_error_get_type): New function
|
||||
|
||||
* gst/gstmarshal.list: Remove VOID:OBJECT,POINTER,STRING, replace
|
||||
with VOID:OBJECT,OBJECT,STRING
|
||||
|
||||
2004-03-10 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/registries/gstxmlregistry.c: (gst_xml_registry_load):
|
||||
|
|
|
@ -110,6 +110,10 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
|
|||
|
||||
</para>
|
||||
|
||||
@:
|
||||
@:
|
||||
@:
|
||||
|
||||
@gstxml: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
@ -119,7 +123,7 @@ All GstElements can be serialized to an XML presentation and subsequently loaded
|
|||
|
||||
</para>
|
||||
|
||||
@:
|
||||
@:
|
||||
@:
|
||||
@gstxml: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
|
|
|
@ -132,8 +132,8 @@ gst_element_class_init (GstElementClass *klass)
|
|||
gst_element_signals[ERROR] =
|
||||
g_signal_new ("error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstElementClass, error), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT_POINTER_STRING, G_TYPE_NONE, 3,
|
||||
GST_TYPE_ELEMENT, G_TYPE_POINTER,
|
||||
gst_marshal_VOID__OBJECT_OBJECT_STRING, G_TYPE_NONE, 3,
|
||||
GST_TYPE_ELEMENT, GST_TYPE_G_ERROR,
|
||||
G_TYPE_STRING);
|
||||
gst_element_signals[EOS] =
|
||||
g_signal_new ("eos", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
|
|
|
@ -33,6 +33,18 @@ GQuark gst_ ## string ## _error_quark (void) { \
|
|||
quark = g_quark_from_static_string ("gst-" # string "-error-quark"); \
|
||||
return quark; }
|
||||
|
||||
GType
|
||||
gst_g_error_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
type = g_boxed_type_register_static ("GstGError",
|
||||
(GBoxedCopyFunc) g_error_copy,
|
||||
(GBoxedFreeFunc) g_error_free);
|
||||
return type;
|
||||
}
|
||||
|
||||
/* initialize the dynamic table of translated core errors */
|
||||
static gchar ** _gst_core_errors_init ()
|
||||
{
|
||||
|
|
|
@ -53,9 +53,6 @@ typedef enum {
|
|||
}
|
||||
GstCoreError;
|
||||
|
||||
#define GST_CORE_ERROR gst_core_error_quark ()
|
||||
GQuark gst_core_error_quark (void);
|
||||
|
||||
/* Library errors are for errors from the library being used by elements
|
||||
initializing, closing, ... */
|
||||
typedef enum {
|
||||
|
@ -69,10 +66,6 @@ typedef enum {
|
|||
}
|
||||
GstLibraryError;
|
||||
|
||||
#define GST_LIBRARY_ERROR gst_library_error_quark ()
|
||||
GQuark gst_library_error_quark (void);
|
||||
|
||||
|
||||
/* Resource errors are for anything external used by an element:
|
||||
memory, files, network connections, process space, ...
|
||||
They're typically used by source and sink elements */
|
||||
|
@ -94,9 +87,6 @@ typedef enum {
|
|||
}
|
||||
GstResourceError;
|
||||
|
||||
#define GST_RESOURCE_ERROR gst_resource_error_quark ()
|
||||
GQuark gst_resource_error_quark (void);
|
||||
|
||||
/* Stream errors are for anything related to the stream being processed:
|
||||
format errors, media type errors, ...
|
||||
They're typically used by decoders, demuxers, converters, ... */
|
||||
|
@ -116,12 +106,22 @@ typedef enum {
|
|||
}
|
||||
GstStreamError;
|
||||
|
||||
#define GST_STREAM_ERROR gst_stream_error_quark ()
|
||||
GQuark gst_stream_error_quark (void);
|
||||
/* This should go away once we convinced glib people to register GError */
|
||||
#define GST_TYPE_G_ERROR (gst_g_error_get_type ())
|
||||
|
||||
#define GST_LIBRARY_ERROR gst_library_error_quark ()
|
||||
#define GST_RESOURCE_ERROR gst_resource_error_quark ()
|
||||
#define GST_CORE_ERROR gst_core_error_quark ()
|
||||
#define GST_STREAM_ERROR gst_stream_error_quark ()
|
||||
|
||||
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
|
||||
gchar * gst_error_get_message (GQuark domain, gint code);
|
||||
#define GST_ERROR_SYSTEM ("system error: %s", g_strerror (errno))
|
||||
|
||||
GType gst_g_error_get_type (void);
|
||||
gchar * gst_error_get_message (GQuark domain, gint code);
|
||||
GQuark gst_stream_error_quark (void);
|
||||
GQuark gst_core_error_quark (void);
|
||||
GQuark gst_resource_error_quark (void);
|
||||
GQuark gst_library_error_quark (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ VOID:OBJECT
|
|||
VOID:OBJECT,PARAM
|
||||
VOID:OBJECT,POINTER
|
||||
VOID:OBJECT,BOXED
|
||||
VOID:OBJECT,POINTER,STRING
|
||||
VOID:OBJECT,OBJECT,STRING
|
||||
VOID:OBJECT,STRING
|
||||
VOID:INT,INT
|
||||
VOID:INT64
|
||||
|
|
Loading…
Reference in a new issue