diff --git a/src/gstducati.c b/src/gstducati.c
index 244fb59a59ba127e43a2fe09626271ac2276afe8..3e63b726f89da0b790128d0789e5970f8c600123 100644 (file)
--- a/src/gstducati.c
+++ b/src/gstducati.c
#include "gstducatimpeg4dec.h"
#include "gstducatimpeg2dec.h"
#include "gstducativc1dec.h"
-#include "gstducativp6dec.h"
-#include "gstducativp7dec.h"
-#include "gstducatirvdec.h"
+#include "gstducatijpegdec.h"
-GST_DEBUG_CATEGORY (gst_ducati_debug);
+#include "gstducatih264enc.h"
+#include "gstducatimpeg4enc.h"
+#include "gstducatijpegenc.h"
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- GST_DEBUG_CATEGORY_INIT (gst_ducati_debug, "ducati", 0, "ducati");
- /* TODO .. find some way to reasonably detect if the corresponding
- * codecs are actually available..
- */
- return gst_element_register (plugin, "ducatih264dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIH264DEC) &&
- gst_element_register (plugin, "ducatimpeg4dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIMPEG4DEC) &&
- gst_element_register (plugin, "ducatimpeg2dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIMPEG2DEC) &&
- gst_element_register (plugin, "ducativc1dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIVC1DEC) &&
- gst_element_register (plugin, "ducativp6dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIVP6DEC) &&
- gst_element_register (plugin, "ducativp7dec", GST_RANK_PRIMARY, GST_TYPE_DUCATIVP7DEC) &&
- gst_element_register (plugin, "ducatirvdec", GST_RANK_PRIMARY, GST_TYPE_DUCATIRVDEC);
-}
+GST_DEBUG_CATEGORY (gst_ducati_debug);
-void *
-gst_ducati_alloc_1d (gint sz)
+void
+gst_ducati_set_generic_error_strings (const char *strings[])
{
- MemAllocBlock block = {
- .pixelFormat = PIXEL_FMT_PAGE,
- .dim.len = sz,
- };
- return MemMgr_Alloc (&block, 1);
+#ifndef GST_DISABLE_GST_DEBUG
+ strings[XDM_PARAMSCHANGE] = "sequence parameters change";
+ strings[XDM_APPLIEDCONCEALMENT] = "applied concealment";
+ strings[XDM_INSUFFICIENTDATA] = "insufficient data";
+ strings[XDM_CORRUPTEDDATA] = "corrupted data";
+ strings[XDM_CORRUPTEDHEADER] = "corrupted header";
+ strings[XDM_UNSUPPORTEDINPUT] = "unsupported input";
+ strings[XDM_UNSUPPORTEDPARAM] = "unsupported param";
+ strings[XDM_FATALERROR] = "fatal";
+#endif
}
-void *
-gst_ducati_alloc_2d (gint width, gint height, guint * sz)
+#ifndef GST_DISABLE_GST_DEBUG
+void
+gst_ducati_log_extended_error_info (uint32_t error, const char *strings[])
{
- MemAllocBlock block[] = { {
- .pixelFormat = PIXEL_FMT_8BIT,
- .dim = {.area = {
- .width = width,
- .height = ALIGN2 (height, 1),
- }},
- .stride = 4096
- }, {
- .pixelFormat = PIXEL_FMT_16BIT,
- .dim = {.area = {
- .width = width,
- .height = ALIGN2 (height, 1) / 2,
- }},
- .stride = 4096
- }
- };
- if (sz) {
- *sz = (4096 * ALIGN2 (height, 1) * 3) / 2;
+ int bit = 0;
+ while (error) {
+ if (error & 1) {
+ GST_ERROR ("Bit %d (%08x): %s", bit, 1 << bit,
+ strings[bit] ? strings[bit] : "unknown");
+ }
+ error >>= 1;
+ ++bit;
}
- return MemMgr_Alloc (block, 2);
}
+#endif
-XDAS_Int16
-gst_ducati_get_mem_type (SSPtr paddr)
+static gboolean
+plugin_init (GstPlugin * plugin)
{
- XDAS_Int16 type = -1;
-
- if ((0x60000000 <= paddr) && (paddr < 0x68000000))
- type = XDM_MEMTYPE_TILED8;
- else if ((0x68000000 <= paddr) && (paddr < 0x70000000))
- type = XDM_MEMTYPE_TILED16;
- else if ((0x70000000 <= paddr) && (paddr < 0x78000000))
- type = XDM_MEMTYPE_TILED32;
- else if ((0x78000000 <= paddr) && (paddr < 0x80000000))
- type = XDM_MEMTYPE_TILEDPAGE;
+ GST_DEBUG_CATEGORY_INIT (gst_ducati_debug, "ducati", 0, "ducati");
- return type;
+ return gst_element_register (plugin, "ducatih264dec", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIH264DEC) &&
+ gst_element_register (plugin, "ducatimpeg4dec", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIMPEG4DEC) &&
+ gst_element_register (plugin, "ducatimpeg2dec", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIMPEG2DEC) &&
+ gst_element_register (plugin, "ducativc1dec", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIVC1DEC) &&
+ gst_element_register (plugin, "ducatijpegdec", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIJPEGDEC) &&
+ gst_element_register (plugin, "ducatih264enc", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIH264ENC) &&
+ gst_element_register (plugin, "ducatimpeg4enc", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIMPEG4ENC) &&
+ gst_element_register (plugin, "ducatijpegenc", GST_RANK_PRIMARY + 1,
+ GST_TYPE_DUCATIJPEGENC);
}
/* PACKAGE: this is usually set by autotools depending on some _INIT macro
# define PACKAGE "ducati"
#endif
-GST_PLUGIN_DEFINE (
- GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "ducati",
- "Hardware accellerated codecs for OMAP4",
- plugin_init,
- VERSION,
- "LGPL",
- "GStreamer",
- "http://gstreamer.net/"
-)
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, ducati,
+ "Hardware accelerated codecs for OMAP4",
+ plugin_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/")