[FFmpeg-soc] [soc]: r4741 - in rtmp: rtmppkt.c rtmppkt.h

kostya subversion at mplayerhq.hu
Wed Jul 22 07:19:19 CEST 2009


Author: kostya
Date: Wed Jul 22 07:19:18 2009
New Revision: 4741

Log:
Drop debug code

Modified:
   rtmp/rtmppkt.c
   rtmp/rtmppkt.h

Modified: rtmp/rtmppkt.c
==============================================================================
--- rtmp/rtmppkt.c	Tue Jul 21 17:05:57 2009	(r4740)
+++ rtmp/rtmppkt.c	Wed Jul 22 07:19:18 2009	(r4741)
@@ -242,93 +242,3 @@ int rtmp_amf_find_field(const uint8_t *d
     }
     return -1;
 }
-
-static void parse_amf(const uint8_t *data, int size)
-{
-    const uint8_t *ptr = data, *end = data+size;
-    int object = 0,array=0,i,len;
-    char buf[65536];
-    while(ptr < end){
-        if(object){
-            len=bytestream_get_be16(&ptr);
-            if(len){
-            for(i=0;i<object;i++)av_log(NULL,0,"    ");
-            bytestream_get_buffer(&ptr, buf, len);
-            buf[len] = 0;
-            av_log(NULL,0,"%s: ",buf);
-            }
-        }
-        switch (*ptr++) {
-        case AMF_NUMBER:
-            {
-                double d;
-                d = av_int2dbl(bytestream_get_be64(&ptr));
-                av_log(NULL,0,"Number %g\n",d);
-            }
-            break;
-        case AMF_BOOLEAN:
-            av_log(NULL,0,"Boolean %d\n",*ptr++);
-            break;
-        case AMF_STRING:
-            len=bytestream_get_be16(&ptr);
-            bytestream_get_buffer(&ptr, buf, len);
-            buf[len] = 0;
-            av_log(NULL,0,"String '%s'\n",buf);
-            break;
-        case AMF_NULL:
-            av_log(NULL,0,"NULL\n");
-            break;
-        case AMF_OBJECT:
-            for(i=0;i<object;i++)av_log(NULL,0,"    ");
-            av_log(NULL,0,"Object{\n");
-            object++;
-            break;
-        case AMF_ECMA_ARRAY:
-            array = bytestream_get_be32(&ptr);
-            av_log(NULL,0,"Array of %d elements: [\n",array);
-            object++;
-            break;
-        case AMF_OBJECT_END:
-            object--;
-            for(i=0;i<object;i++)av_log(NULL,0,"    ");
-            if(array){
-            array = 0;
-            av_log(NULL,0,"]\n");
-            }else
-            av_log(NULL,0,"}\n");
-            break;
-        default:
-            av_log(NULL,0,"Type %02X\n",ptr[-1]);
-            return;
-        }
-    }
-}
-
-void rtmp_packet_inspect(RTMPPacket *pkt)
-{
-    av_log(NULL,0,"Packet on ");
-    switch (pkt->channel_id) {
-    case RTMP_NETWORK_CHANNEL: av_log(NULL,0,"network channel");break;
-    case RTMP_SYSTEM_CHANNEL:  av_log(NULL,0,"system channel");break;
-    case RTMP_VIDEO_CHANNEL:   av_log(NULL,0,"video channel");break;
-    case RTMP_AUDIO_CHANNEL:   av_log(NULL,0,"audio channel");break;
-    default:                   av_log(NULL,0,"channel %d",pkt->channel_id);
-    }
-    av_log(NULL,0," type ");
-    switch (pkt->type) {
-    case RTMP_PT_CHUNK_SIZE:   av_log(NULL,0,"chunk size %d",AV_RB32(pkt->data));break;
-    case RTMP_PT_BYTES_READ:   av_log(NULL,0,"bytes read");break;
-    case RTMP_PT_PING:         av_log(NULL,0,"ping type = %d", AV_RB16(pkt->data));break;
-    case RTMP_PT_SERVER_BW:    av_log(NULL,0,"server BW=%d",AV_RB32(pkt->data));break;
-    case RTMP_PT_CLIENT_BW:    av_log(NULL,0,"client BW=%d",AV_RB32(pkt->data));break;
-    case RTMP_PT_AUDIO:        av_log(NULL,0,"audio");break;
-    case RTMP_PT_VIDEO:        av_log(NULL,0,"video");break;
-    case RTMP_PT_NOTIFY:       av_log(NULL,0,"notify");break;
-    case RTMP_PT_INVOKE:       av_log(NULL,0,"invoke");break;
-    case RTMP_PT_METADATA:     av_log(NULL,0,"metadata");break;
-    default:                   av_log(NULL,0,"%X",pkt->type);
-    }
-    av_log(NULL,0," ts %d/%d size %d\n", pkt->timestamp, pkt->extra, pkt->data_size);
-    if (pkt->type == RTMP_PT_INVOKE || pkt->type == RTMP_PT_NOTIFY)
-        parse_amf(pkt->data, pkt->data_size);
-}

Modified: rtmp/rtmppkt.h
==============================================================================
--- rtmp/rtmppkt.h	Tue Jul 21 17:05:57 2009	(r4740)
+++ rtmp/rtmppkt.h	Wed Jul 22 07:19:18 2009	(r4741)
@@ -180,6 +180,4 @@ int rtmp_amf_find_field(const uint8_t *d
  */
 void rtmp_amf_write_tag(uint8_t **dst, AMFType type, const void *data);
 
-void rtmp_packet_inspect(RTMPPacket *pkt);
-
 #endif /* AVFORMAT_RTMPPKT_H */


More information about the FFmpeg-soc mailing list