diff gui/util/bitmap.c @ 33985:d99f341d8442

Replace all mp_dbg() calls by mp_msg(). These messages are useful to track down error causes and should be available even in a non-debug version of the GUI. Additionally, remove #ifdef MP_DEBUG which isn't longer needed in skin.c now.
author ib
date Tue, 06 Sep 2011 15:28:53 +0000
parents 60449f4234f7
children b0c63b098b6b
line wrap: on
line diff
--- a/gui/util/bitmap.c	Tue Sep 06 15:10:01 2011 +0000
+++ b/gui/util/bitmap.c	Tue Sep 06 15:28:53 2011 +0000
@@ -130,9 +130,9 @@
         bpl = img->Width * (img->Bpp / 8);
         img->ImageSize = bpl * img->Height;
 
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", img->Width, img->Height, img->Bpp);
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  image size: %lu\n", img->ImageSize);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] file: %s\n", fname);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  size: %lux%lu, color depth: %u\n", img->Width, img->Height, img->Bpp);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap]  image size: %lu\n", img->ImageSize);
 
         img->Image = malloc(img->ImageSize);
 
@@ -173,11 +173,11 @@
 
         if (!img->Image) {
             free(orgImage);
-            mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", img->ImageSize);
+            mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", img->ImageSize);
             return 0;
         }
 
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 32 bpp conversion size: %lu\n", img->ImageSize);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 32 bpp conversion size: %lu\n", img->ImageSize);
 
         for (c = 0, i = 0; c < img->ImageSize; c += 4, i += 3)
             *(uint32_t *)&img->Image[c] = ALPHA_OPAQUE | AV_RB24(&orgImage[i]);
@@ -235,12 +235,12 @@
     r = pngRead(fname, img);
 
     if (r != 0) {
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] read error #%d: %s\n", r, fname);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] read error #%d: %s\n", r, fname);
         return -5;
     }
 
     if (img->Bpp < 24) {
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", img->Bpp);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] bpp too low: %u\n", img->Bpp);
         return -1;
     }
 
@@ -284,7 +284,7 @@
     out->Image     = calloc(1, out->ImageSize);
 
     if (!out->Image) {
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", out->ImageSize);
+        mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] not enough memory: %lu\n", out->ImageSize);
         return 0;
     }
 
@@ -312,7 +312,7 @@
     if (!shaped)
         bpFree(out);
 
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 1 bpp conversion size: %lu\n", out->ImageSize);
+    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[bitmap] 1 bpp conversion size: %lu\n", out->ImageSize);
 
     return 1;
 }