aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-01-13 16:12:56 +0000
committerChristian Grothoff <christian@grothoff.org>2010-01-13 16:12:56 +0000
commit226573cd4846558620e4401f988e30765ccdfc86 (patch)
tree990e523d47c5d8acb51c8b1bd3325facb330fecd
parent5eafb01bbb8c7e151a9e08f9981626814d2933bd (diff)
downloadlibextractor-226573cd4846558620e4401f988e30765ccdfc86.tar.gz
libextractor-226573cd4846558620e4401f988e30765ccdfc86.zip
reduce logging
-rw-r--r--src/plugins/id3_extractor.c1
-rw-r--r--src/plugins/thumbnailqt_extractor.cc13
2 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/id3_extractor.c b/src/plugins/id3_extractor.c
index be399e0..575a328 100644
--- a/src/plugins/id3_extractor.c
+++ b/src/plugins/id3_extractor.c
@@ -272,7 +272,6 @@ EXTRACTOR_id3_extract (const char *data,
272 char track[16]; 272 char track[16];
273 int ret; 273 int ret;
274 274
275 fprintf (stderr, "called with %llu bytes\n", (unsigned long long) size);
276 if (OK != get_id3 (data, size, &info)) 275 if (OK != get_id3 (data, size, &info))
277 return 0; 276 return 0;
278 if (strlen (info.title) > 0) 277 if (strlen (info.title) > 0)
diff --git a/src/plugins/thumbnailqt_extractor.cc b/src/plugins/thumbnailqt_extractor.cc
index 6a66981..313ebbc 100644
--- a/src/plugins/thumbnailqt_extractor.cc
+++ b/src/plugins/thumbnailqt_extractor.cc
@@ -43,6 +43,14 @@
43extern "C" 43extern "C"
44{ 44{
45 45
46
47static void
48mh (QtMsgType mtype, const char *msg)
49{
50 /* just discard */
51}
52
53
46int 54int
47EXTRACTOR_thumbnailqt_extract (const char *data, 55EXTRACTOR_thumbnailqt_extract (const char *data,
48 size_t size, 56 size_t size,
@@ -57,7 +65,9 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
57 unsigned long height; 65 unsigned long height;
58 char format[64]; 66 char format[64];
59 QImage::Format colors; 67 QImage::Format colors;
68 QtMsgHandler oh;
60 69
70 oh = qInstallMsgHandler (&mh);
61 /* Determine image format to use */ 71 /* Determine image format to use */
62 if (options == NULL) 72 if (options == NULL)
63 colors = QImage::Format_Indexed8; 73 colors = QImage::Format_Indexed8;
@@ -106,6 +116,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
106 if ( (height == 0) || (width == 0) ) 116 if ( (height == 0) || (width == 0) )
107 { 117 {
108 delete img; 118 delete img;
119 qInstallMsgHandler (oh);
109 return 0; 120 return 0;
110 } 121 }
111 snprintf(format, 122 snprintf(format,
@@ -122,6 +133,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
122 strlen(format)+1)) 133 strlen(format)+1))
123 { 134 {
124 delete img; 135 delete img;
136 qInstallMsgHandler (oh);
125 return 1; 137 return 1;
126 } 138 }
127 /* Change color depth */ 139 /* Change color depth */
@@ -154,6 +166,7 @@ EXTRACTOR_thumbnailqt_extract (const char *data,
154 buffer.setBuffer(&bytes); 166 buffer.setBuffer(&bytes);
155 buffer.open(QIODevice::WriteOnly); 167 buffer.open(QIODevice::WriteOnly);
156 thumb.save(&buffer, "PNG"); 168 thumb.save(&buffer, "PNG");
169 qInstallMsgHandler (oh);
157 return proc (proc_cls, 170 return proc (proc_cls,
158 "thumbnailqt", 171 "thumbnailqt",
159 EXTRACTOR_METATYPE_THUMBNAIL, 172 EXTRACTOR_METATYPE_THUMBNAIL,