[MPlayer-cvslog] r20546 - trunk/stream/realrtsp/real.c

rtogni subversion at mplayerhq.hu
Mon Oct 30 23:32:05 CET 2006


Author: rtogni
Date: Mon Oct 30 23:32:04 2006
New Revision: 20546

Modified:
   trunk/stream/realrtsp/real.c

Log:
printf -> mp_msg


Modified: trunk/stream/realrtsp/real.c
==============================================================================
--- trunk/stream/realrtsp/real.c	(original)
+++ trunk/stream/realrtsp/real.c	Mon Oct 30 23:32:04 2006
@@ -209,7 +209,8 @@
   numrules=BE_16(mlti_chunk);
 
   if (codec >= numrules) {
-    printf("codec index >= number of codecs. %i %i\n", codec, numrules);
+    mp_msg(MSGT_STREAM, MSGL_WARN, "realrtsp: codec index >= number of codecs. %i %i\n",
+      codec, numrules);
     return 0;
   }
 
@@ -355,7 +356,8 @@
   if (n<8) return 0;
   if (header[0] != 0x24)
   {
-    printf("rdt chunk not recognized: got 0x%02x\n", header[0]);
+    mp_msg(MSGT_STREAM, MSGL_WARN, "realrtsp: rdt chunk not recognized: got 0x%02x\n",
+      header[0]);
     return 0;
   }
   size=(header[1]<<16)+(header[2]<<8)+(header[3]);
@@ -366,7 +368,7 @@
     printf("got flags1: 0x%02x\n",flags1);
 #endif
     if(header[6] == 0x06) {
-      printf("Stream EOF detected\n");
+      mp_msg(MSGT_STREAM, MSGL_INFO, "realrtsp: Stream EOF detected\n");
       return -1;
     }
     header[0]=header[5];
@@ -524,7 +526,8 @@
   {
     char *alert=rtsp_search_answers(rtsp_session,"Alert");
     if (alert) {
-      printf("real: got message from server:\n%s\n", alert);
+      mp_msg(MSGT_STREAM, MSGL_WARN, "realrtsp: got message from server:\n%s\n",
+        alert);
     }
     rtsp_send_ok(rtsp_session);
     buf = xbuffer_free(buf);
@@ -534,20 +537,20 @@
   /* receive description */
   size=0;
   if (!rtsp_search_answers(rtsp_session,"Content-length"))
-    printf("real: got no Content-length!\n");
+    mp_msg(MSGT_STREAM, MSGL_WARN, "real: got no Content-length!\n");
   else
     size=atoi(rtsp_search_answers(rtsp_session,"Content-length"));
 
   // as size is unsigned this also catches the case (size < 0)
   if (size > MAX_DESC_BUF) {
-    printf("real: Content-length for description too big (> %uMB)!\n",
+    mp_msg(MSGT_STREAM, MSGL_ERR, "realrtsp: Content-length for description too big (> %uMB)!\n",
             MAX_DESC_BUF/(1024*1024) );
     xbuffer_free(buf);
     return NULL;
   }
 
   if (!rtsp_search_answers(rtsp_session,"ETag"))
-    printf("real: got no ETag!\n");
+    mp_msg(MSGT_STREAM, MSGL_WARN, "realrtsp: got no ETag!\n");
   else
     session_id=strdup(rtsp_search_answers(rtsp_session,"ETag"));
     



More information about the MPlayer-cvslog mailing list