[xiph-commits] r16196 - trunk/xiph-qt/Theora/src

arek at svn.xiph.org arek at svn.xiph.org
Sat Jul 4 14:44:16 PDT 2009


Author: arek
Date: 2009-07-04 14:44:16 -0700 (Sat, 04 Jul 2009)
New Revision: 16196

Modified:
   trunk/xiph-qt/Theora/src/TheoraDecoder.c
Log:
Change/add some logging.

Modified: trunk/xiph-qt/Theora/src/TheoraDecoder.c
===================================================================
--- trunk/xiph-qt/Theora/src/TheoraDecoder.c	2009-07-03 22:47:03 UTC (rev 16195)
+++ trunk/xiph-qt/Theora/src/TheoraDecoder.c	2009-07-04 21:44:16 UTC (rev 16196)
@@ -426,7 +426,7 @@
     ICMDataProcRecordPtr dataProc = drp->dataProcRecord.dataProc ? &drp->dataProcRecord : NULL;
     SInt32 dataAvailable = dataProc != NULL ? codecMinimumDataSize : -1;
 
-    dbg_printf("--:Theora:-  CodecDecodeBand(%08lx, %08lx, %08lx) cald (                 frN: %8ld, dataProc: %8lx)\n",
+    dbg_printf("[TD  ]  >> [%08lx] :: DecodeBand(%08lx, %08lx): (                 frN: %8ld, dataProc: %8lx)\n",
                (long)glob, (long)drp, (long)myDrp, myDrp->frameNumber, (long)dataProc);
 
     if (dataAvailable > -1) {
@@ -502,7 +502,8 @@
             op.bytes = data_size;
             op.packet = data_buffer;
             terr = th_decode_packetin(glob->td, &op, NULL);
-            dbg_printf("--:Theora:-  theora_decode_packetin(pktno: %lld, size: %ld, data1: [%02x]) = %d\n", op.packetno, op.bytes, data_buffer[0], terr);
+            dbg_printf("[TD  ]     [%08lx] :: DecodeBand(): theora_decode_packetin(pktno: %lld, size: %ld, data1: [%02x]) = %d\n",
+                       (long) glob, op.packetno, op.bytes, data_buffer[0], terr);
 
             if (terr != 0) {
                 myDrp->draw = 0;
@@ -513,6 +514,8 @@
 
     myDrp->decoded = 1;
     drp->codecData += dataConsumed;
+
+    dbg_printf("[TD  ] <   [%08lx] :: DecodeBand() = %ld\n", (long) glob, err);
     return err;
 }
 
@@ -524,7 +527,7 @@
     unsigned char *dataPtr = (unsigned char *)drp->codecData;
     ICMDataProcRecordPtr dataProc = drp->dataProcRecord.dataProc ? &drp->dataProcRecord : NULL;
 
-    dbg_printf("--:Theora:-  CodecDrawBand(%08lx, %08lx, %08lx) called (                 frN: %8ld, dataProc: %8lx)\n",
+    dbg_printf("[TD  ]  >> [%08lx] :: DrawBand(%08lx, %08lx):   (                 frN: %8ld, dataProc: %8lx)\n",
                (long)glob, (long)drp, (long)myDrp, myDrp->frameNumber, (long)dataProc);
 
     if (myDrp->decoded == 0) {
@@ -536,7 +539,7 @@
             err = codecDroppedFrameErr;
         } else  {
             th_ycbcr_buffer ycbcrB;
-            dbg_printf("--:Theora:-  calling theora_decode_YUVout()...\n");
+            dbg_printf("[TD  ]     [%08lx] :: DrawBand(): calling theora_decode_YUVout()...\n", (long)glob);
             th_decode_ycbcr_out(glob->td, ycbcrB);
             if (myDrp->pixelFormat == k422YpCbCr8PixelFormat) {
                 if (glob->ti.pixel_fmt == TH_PF_420) {
@@ -558,6 +561,7 @@
         }
     }
 
+    dbg_printf("[TD  ] <   [%08lx] :: DrawBand() = %ld\n", (long) glob, err);
     return err;
 }
 
@@ -566,17 +570,19 @@
 #pragma unused(glob, result, flags)
     OSErr err = noErr;
     Theora_DecompressRecord *myDrp = (Theora_DecompressRecord *)drp->userDecompressRecord;
-    dbg_printf("--:Theora:-   CodecEndBand(%08lx, %08lx, %08lx, %08lx) called\n", (long)glob, (long)drp, (long)drp->userDecompressRecord, result);
+    dbg_printf("[TD  ]  >> [%08lx] :: EndBand(%08lx, %08lx, %08lx)\n", (long)glob, (long)drp, (long)drp->userDecompressRecord, result);
 
     if (myDrp->draw == 0)
         err = codecDroppedFrameErr;
+
+    dbg_printf("[TD  ] <   [%08lx] :: EndBand() = %ld\n", (long)glob, err);
     return err;
 }
 
 pascal ComponentResult Theora_ImageCodecQueueStarting(Theora_Globals glob)
 {
 #pragma unused(glob)
-    dbg_printf("--:Theora:- CodecQueueStarting(%08lx) called\n", (long)glob);
+    dbg_printf("[TD  ] <>> [%08lx] :: QueueStarting()\n", (long)glob);
 
     return noErr;
 }
@@ -584,7 +590,7 @@
 pascal ComponentResult Theora_ImageCodecQueueStopping(Theora_Globals glob)
 {
 #pragma unused(glob)
-    dbg_printf("--:Theora:- CodecQueueStopping(%08lx) called\n", (long)glob);
+    dbg_printf("[TD  ] <>> [%08lx] :: QueueStopping()\n", (long)glob);
 
     return noErr;
 }



More information about the commits mailing list