struct in_addr sdp_ip;
int ttl;
-#ifdef DEBUG
- printf("sdp: %c='%s'\n", letter, buf);
-#endif
+ dprintf(s, "sdp: %c='%s'\n", letter, buf);
p = buf;
if (s1->skip_media && letter != 'm')
if (ret != 3)
return;
len = AV_RB16(buf + 1);
-#ifdef DEBUG
- printf("skipping RTP packet len=%d\n", len);
-#endif
+
+ dprintf(s, "skipping RTP packet len=%d\n", len);
+
/* skip payload */
while (len > 0) {
len1 = len;
for(;;) {
ret = url_readbuf(rt->rtsp_hd, &ch, 1);
#ifdef DEBUG_RTP_TCP
- printf("ret=%d c=%02x [%c]\n", ret, ch, ch);
+ dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
#endif
if (ret != 1)
return -1;
}
}
*q = '\0';
-#ifdef DEBUG
- printf("line='%s'\n", buf);
-#endif
+
+ dprintf(s, "line='%s'\n", buf);
+
/* test if last line */
if (buf[0] == '\0')
break;
av_strlcat(buf, buf1, sizeof(buf));
}
av_strlcat(buf, "\r\n", sizeof(buf));
-#ifdef DEBUG
- printf("Sending:\n%s--\n", buf);
-#endif
+
+ dprintf(s, "Sending:\n%s--\n", buf);
+
url_write(rt->rtsp_hd, buf, strlen(buf));
rt->last_cmd_time = av_gettime();
}
RTSPStream *rtsp_st;
#ifdef DEBUG_RTP_TCP
- printf("tcp_read_packet:\n");
+ dprintf(s, "tcp_read_packet:\n");
#endif
redo:
for(;;) {
id = buf[0];
len = AV_RB16(buf + 1);
#ifdef DEBUG_RTP_TCP
- printf("id=%d len=%d\n", id, len);
+ dprintf(s, "id=%d len=%d\n", id, len);
#endif
if (len > buf_size || len < 12)
goto redo;