gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9993 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r9993 - Extractor/src/plugins
Date: Wed, 13 Jan 2010 17:12:56 +0100

Author: grothoff
Date: 2010-01-13 17:12:56 +0100 (Wed, 13 Jan 2010)
New Revision: 9993

Modified:
   Extractor/src/plugins/id3_extractor.c
   Extractor/src/plugins/thumbnailqt_extractor.cc
Log:
reduce logging

Modified: Extractor/src/plugins/id3_extractor.c
===================================================================
--- Extractor/src/plugins/id3_extractor.c       2010-01-13 16:04:51 UTC (rev 
9992)
+++ Extractor/src/plugins/id3_extractor.c       2010-01-13 16:12:56 UTC (rev 
9993)
@@ -272,7 +272,6 @@
   char track[16];
   int ret;
 
-  fprintf (stderr, "called with %llu bytes\n", (unsigned long long) size);
   if (OK != get_id3 (data, size, &info))
     return 0;
   if (strlen (info.title) > 0)

Modified: Extractor/src/plugins/thumbnailqt_extractor.cc
===================================================================
--- Extractor/src/plugins/thumbnailqt_extractor.cc      2010-01-13 16:04:51 UTC 
(rev 9992)
+++ Extractor/src/plugins/thumbnailqt_extractor.cc      2010-01-13 16:12:56 UTC 
(rev 9993)
@@ -43,6 +43,14 @@
 extern "C"
 {
 
+
+static void 
+mh (QtMsgType mtype, const char *msg)
+{
+  /* just discard */
+}
+
+
 int 
 EXTRACTOR_thumbnailqt_extract (const char *data,
                               size_t size,
@@ -57,7 +65,9 @@
   unsigned long height;
   char format[64];
   QImage::Format colors;
+  QtMsgHandler oh;
 
+  oh = qInstallMsgHandler (&mh);
   /* Determine image format to use */
   if (options == NULL)
     colors = QImage::Format_Indexed8;
@@ -106,6 +116,7 @@
   if ( (height == 0) || (width == 0) )
     {
       delete img;
+      qInstallMsgHandler (oh);
       return 0;
     }
   snprintf(format,
@@ -122,6 +133,7 @@
                 strlen(format)+1))
     {
       delete img;
+      qInstallMsgHandler (oh);
       return 1;
     }
   /* Change color depth */
@@ -154,6 +166,7 @@
   buffer.setBuffer(&bytes);
   buffer.open(QIODevice::WriteOnly);
   thumb.save(&buffer, "PNG");
+  qInstallMsgHandler (oh);
   return proc (proc_cls,
               "thumbnailqt",
               EXTRACTOR_METATYPE_THUMBNAIL,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]