summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1efe62)
raw | patch | inline | side by side (parent: d1efe62)
author | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Fri, 23 Dec 2011 12:10:22 +0000 (13:10 +0100) | ||
committer | Alessandro Decina <alessandro.decina@collabora.co.uk> | |
Fri, 23 Dec 2011 12:10:22 +0000 (13:10 +0100) |
Useful to implement decoder specific hacks to workaround broken error reporting
from codecs.
from codecs.
src/gstducatividdec.c | patch | blob | history | |
src/gstducatividdec.h | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 251468d7e0839fd111949beec97e58904994dc6f..b4f54ba365e24048fad26b1842ced1909045aa7e 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
GstClockTime t;
GstBuffer *outbuf = NULL;
gint i;
+ GstDucatiVidDecClass *klass = GST_DUCATIVIDDEC_GET_CLASS (self);
memset (&self->outArgs->outputID, 0, sizeof (self->outArgs->outputID));
memset (&self->outArgs->freeBufID, 0, sizeof (self->outArgs->freeBufID));
GST_WARNING_OBJECT (self, "XDM_GETSTATUS: err=%d, extendedError=%08x",
err, self->status->extendedError);
- if (XDM_ISFATALERROR (self->outArgs->extendedError) || flush) {
- /* we are processing for display and it is a non-fatal error, so lets
- * try to recover.. otherwise return the error
- */
+ if (flush)
err = XDM_EFAIL;
- } else {
- err = XDM_EOK;
- }
+ else
+ err = klass->handle_error (self, err,
+ self->outArgs->extendedError, self->status->extendedError);
}
for (i = 0; self->outArgs->outputID[i]; i++) {
return NULL;
}
+static gint
+gst_ducati_viddec_handle_error (GstDucatiVidDec * self, gint ret,
+ gint extended_error, gint status_extended_error)
+{
+ if (XDM_ISFATALERROR (extended_error))
+ ret = XDM_EFAIL;
+ else
+ ret = XDM_EOK;
+
+ return ret;
+}
+
/* GstElement vmethod implementations */
static gboolean
klass->allocate_params =
GST_DEBUG_FUNCPTR (gst_ducati_viddec_allocate_params);
klass->push_input = GST_DEBUG_FUNCPTR (gst_ducati_viddec_push_input);
+ klass->handle_error = GST_DEBUG_FUNCPTR (gst_ducati_viddec_handle_error);
g_object_class_install_property (gobject_class, PROP_VERSION,
g_param_spec_string ("version", "Version",
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index f6b4b6652d0f3ce77da2c951ffd9a32d68d19bb1..f783d0e2a662f70263582fb7b7287d9e2d8243a7 100644 (file)
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
* any remaining data, or NULL if none. Consumes reference to 'buf'
*/
GstBuffer * (*push_input) (GstDucatiVidDec * self, GstBuffer * buf);
+
+ /**
+ * Called to handle errors returned by VIDDEC3_process.
+ */
+ gint (*handle_error) (GstDucatiVidDec * self, gint ret, gint extended_error,
+ gint status_extended_error);
};
GType gst_ducati_viddec_get_type (void);