changeset 20530:42d58e583110

printf -> mp_msg
author rtogni
date Mon, 30 Oct 2006 22:32:04 +0000
parents 90b3178b8c16
children bc7c04eaf71e
files stream/realrtsp/real.c
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/stream/realrtsp/real.c	Mon Oct 30 22:17:11 2006 +0000
+++ b/stream/realrtsp/real.c	Mon Oct 30 22:32:04 2006 +0000
@@ -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"));