diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-05-22 10:15:44 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-05-26 15:31:55 +0100 |
commit | 293a976532b8fc66fd90c07d2cb9cf23e0b21d3e (patch) | |
tree | c3a0406c08c688065b950681bd6dba460c3d4ad2 /gst | |
parent | 871287ba2adb1295fb990aa78cfb01fb5a3e3d4f (diff) | |
download | gstreamer-plugins-bad-293a976532b8fc66fd90c07d2cb9cf23e0b21d3e.tar.gz |
dvdspu: Make the PGS dumping less verbose
Diffstat (limited to 'gst')
-rw-r--r-- | gst/dvdspu/gstspu-pgs.c | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/gst/dvdspu/gstspu-pgs.c b/gst/dvdspu/gstspu-pgs.c index de6a4151e..719a5d1df 100644 --- a/gst/dvdspu/gstspu-pgs.c +++ b/gst/dvdspu/gstspu-pgs.c @@ -23,6 +23,8 @@ guint8 *rle_data = NULL; guint32 rle_data_size = 0, rle_data_used = 0; PgsPaletteEntry palette[256]; +#define DUMP_FULL_IMAGE 0 + static void dump_bytes (guint8 * data, guint16 len) { @@ -43,8 +45,6 @@ dump_rle_data (guint8 * data, guint32 len) { guint8 *end = data + len; guint16 obj_w, obj_h; - gint i; - guint x = 0; if (data + 4 > end) return; @@ -104,24 +104,30 @@ dump_rle_data (guint8 * data, guint32 len) } } +#if DUMP_FULL_IMAGE + { + gint i; + guint x = 0; #if 1 - if (palette[pal_id].A) { - for (i = 0; i < run_len; i++) - g_print ("%02x ", pal_id); - } else { - for (i = 0; i < run_len; i++) - g_print (" "); - } - x += run_len; - if (!run_len || x > obj_w) { - g_print ("\n"); - x = 0; - } + if (palette[pal_id].A) { + for (i = 0; i < run_len; i++) + g_print ("%02x ", pal_id); + } else { + for (i = 0; i < run_len; i++) + g_print (" "); + } + x += run_len; + if (!run_len || x > obj_w) { + g_print ("\n"); + x = 0; + } #else - g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); - x += run_len; - if (x >= obj_w) - x = 0; + g_print ("Run x: %d pix: %d col: %d\n", x, run_len, pal_id); + x += run_len; + if (x >= obj_w) + x = 0; +#endif + } #endif }; @@ -413,6 +419,8 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) return -1; } + g_print ("Begin dumping command buffer of size %u ts %" GST_TIME_FORMAT "\n", + end - pos, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf))); do { type = *pos++; packet_len = GST_READ_UINT16_BE (pos); @@ -430,5 +438,6 @@ gstspu_dump_pgs_buffer (GstBuffer * buf) pos += packet_len; } while (pos + 3 <= end); + g_print ("End dumping command buffer with %u bytes remaining\n", end - pos); return (pos - GST_BUFFER_DATA (buf)); } |