Mercurial > libavformat.hg
comparison rtmpproto.c @ 5432:f282f7758d6e libavformat
Dump RTMP packet contents in debug mode
author | kostya |
---|---|
date | Fri, 11 Dec 2009 17:13:35 +0000 |
parents | b0eb87793222 |
children | 4ee5aa5e013c |
comparison
equal
deleted
inserted
replaced
5431:b0eb87793222 | 5432:f282f7758d6e |
---|---|
41 #define LOG_CONTEXT NULL | 41 #define LOG_CONTEXT NULL |
42 #else | 42 #else |
43 #define LOG_CONTEXT s | 43 #define LOG_CONTEXT s |
44 #endif | 44 #endif |
45 | 45 |
46 //#define DEBUG | |
47 | |
46 /** RTMP protocol handler state */ | 48 /** RTMP protocol handler state */ |
47 typedef enum { | 49 typedef enum { |
48 STATE_START, ///< client has not done anything yet | 50 STATE_START, ///< client has not done anything yet |
49 STATE_HANDSHAKED, ///< client has performed handshake | 51 STATE_HANDSHAKED, ///< client has performed handshake |
50 STATE_RELEASING, ///< client releasing stream before publish it (for output) | 52 STATE_RELEASING, ///< client releasing stream before publish it (for output) |
526 */ | 528 */ |
527 static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt) | 529 static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt) |
528 { | 530 { |
529 int i, t; | 531 int i, t; |
530 const uint8_t *data_end = pkt->data + pkt->data_size; | 532 const uint8_t *data_end = pkt->data + pkt->data_size; |
533 | |
534 #ifdef DEBUG | |
535 ff_rtmp_packet_dump(LOG_CONTEXT, pkt); | |
536 #endif | |
531 | 537 |
532 switch (pkt->type) { | 538 switch (pkt->type) { |
533 case RTMP_PT_CHUNK_SIZE: | 539 case RTMP_PT_CHUNK_SIZE: |
534 if (pkt->data_size != 4) { | 540 if (pkt->data_size != 4) { |
535 av_log(LOG_CONTEXT, AV_LOG_ERROR, | 541 av_log(LOG_CONTEXT, AV_LOG_ERROR, |