Originally committed as revision 16115 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
| @@ -25,7 +25,7 @@ | |||||
| #include "avformat.h" | #include "avformat.h" | ||||
| /** Structure listing useful vars to parse RTP packet payload*/ | /** Structure listing useful vars to parse RTP packet payload*/ | ||||
| typedef struct rtp_payload_data_s | |||||
| typedef struct rtp_payload_data | |||||
| { | { | ||||
| int sizelength; | int sizelength; | ||||
| int indexlength; | int indexlength; | ||||
| @@ -49,7 +49,7 @@ typedef struct rtp_payload_data_s | |||||
| int nb_au_headers; | int nb_au_headers; | ||||
| int au_headers_length_bytes; | int au_headers_length_bytes; | ||||
| int cur_au_index; | int cur_au_index; | ||||
| } rtp_payload_data_t; | |||||
| } RTPPayloadData; | |||||
| typedef struct PayloadContext PayloadContext; | typedef struct PayloadContext PayloadContext; | ||||
| typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler; | typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler; | ||||
| @@ -63,7 +63,7 @@ int rtp_get_codec_info(AVCodecContext *codec, int payload_type); | |||||
| int rtp_get_payload_type(AVCodecContext *codec); | int rtp_get_payload_type(AVCodecContext *codec); | ||||
| typedef struct RTPDemuxContext RTPDemuxContext; | typedef struct RTPDemuxContext RTPDemuxContext; | ||||
| RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, rtp_payload_data_t *rtp_payload_data); | |||||
| RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data); | |||||
| void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, | void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, | ||||
| RTPDynamicProtocolHandler *handler); | RTPDynamicProtocolHandler *handler); | ||||
| int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, | int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, | ||||
| @@ -112,7 +112,7 @@ struct RTPDemuxContext { | |||||
| uint8_t *buf_ptr; | uint8_t *buf_ptr; | ||||
| /* special infos for au headers parsing */ | /* special infos for au headers parsing */ | ||||
| rtp_payload_data_t *rtp_payload_data; // TODO: Move into dynamic payload handlers | |||||
| RTPPayloadData *rtp_payload_data; // TODO: Move into dynamic payload handlers | |||||
| /* dynamic payload stuff */ | /* dynamic payload stuff */ | ||||
| DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure | DynamicPayloadPacketHandlerProc parse_packet; ///< This is also copied from the dynamic protocol handler structure | ||||
| @@ -267,7 +267,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) | |||||
| * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned) | * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned) | ||||
| * TODO: change this to not take rtp_payload data, and use the new dynamic payload system. | * TODO: change this to not take rtp_payload data, and use the new dynamic payload system. | ||||
| */ | */ | ||||
| RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, rtp_payload_data_t *rtp_payload_data) | |||||
| RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data) | |||||
| { | { | ||||
| RTPDemuxContext *s; | RTPDemuxContext *s; | ||||
| @@ -323,7 +323,7 @@ static int rtp_parse_mp4_au(RTPDemuxContext *s, const uint8_t *buf) | |||||
| { | { | ||||
| int au_headers_length, au_header_size, i; | int au_headers_length, au_header_size, i; | ||||
| GetBitContext getbitcontext; | GetBitContext getbitcontext; | ||||
| rtp_payload_data_t *infos; | |||||
| RTPPayloadData *infos; | |||||
| infos = s->rtp_payload_data; | infos = s->rtp_payload_data; | ||||
| @@ -512,7 +512,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, | |||||
| if (rtp_parse_mp4_au(s, buf)) | if (rtp_parse_mp4_au(s, buf)) | ||||
| return -1; | return -1; | ||||
| { | { | ||||
| rtp_payload_data_t *infos = s->rtp_payload_data; | |||||
| RTPPayloadData *infos = s->rtp_payload_data; | |||||
| if (infos == NULL) | if (infos == NULL) | ||||
| return -1; | return -1; | ||||
| buf += infos->au_headers_length_bytes + 2; | buf += infos->au_headers_length_bytes + 2; | ||||
| @@ -89,7 +89,7 @@ typedef struct RTSPStream { | |||||
| struct in_addr sdp_ip; /* IP address (from SDP content - not used in RTSP) */ | struct in_addr sdp_ip; /* IP address (from SDP content - not used in RTSP) */ | ||||
| int sdp_ttl; /* IP TTL (from SDP content - not used in RTSP) */ | int sdp_ttl; /* IP TTL (from SDP content - not used in RTSP) */ | ||||
| int sdp_payload_type; /* payload type - only used in SDP */ | int sdp_payload_type; /* payload type - only used in SDP */ | ||||
| rtp_payload_data_t rtp_payload_data; /* rtp payload parsing infos from SDP */ | |||||
| RTPPayloadData rtp_payload_data; /* rtp payload parsing infos from SDP */ | |||||
| RTPDynamicProtocolHandler *dynamic_handler; ///< Only valid if it's a dynamic protocol. (This is the handler structure) | RTPDynamicProtocolHandler *dynamic_handler; ///< Only valid if it's a dynamic protocol. (This is the handler structure) | ||||
| PayloadContext *dynamic_protocol_context; ///< Only valid if it's a dynamic protocol. (This is any private data associated with the dynamic protocol) | PayloadContext *dynamic_protocol_context; ///< Only valid if it's a dynamic protocol. (This is any private data associated with the dynamic protocol) | ||||
| @@ -294,12 +294,12 @@ typedef struct { | |||||
| #define ATTR_NAME_TYPE_STR 1 | #define ATTR_NAME_TYPE_STR 1 | ||||
| static const AttrNameMap attr_names[]= | static const AttrNameMap attr_names[]= | ||||
| { | { | ||||
| {"SizeLength", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, sizelength)}, | |||||
| {"IndexLength", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, indexlength)}, | |||||
| {"IndexDeltaLength", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, indexdeltalength)}, | |||||
| {"profile-level-id", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, profile_level_id)}, | |||||
| {"StreamType", ATTR_NAME_TYPE_INT, offsetof(rtp_payload_data_t, streamtype)}, | |||||
| {"mode", ATTR_NAME_TYPE_STR, offsetof(rtp_payload_data_t, mode)}, | |||||
| {"SizeLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, sizelength)}, | |||||
| {"IndexLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, indexlength)}, | |||||
| {"IndexDeltaLength", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, indexdeltalength)}, | |||||
| {"profile-level-id", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, profile_level_id)}, | |||||
| {"StreamType", ATTR_NAME_TYPE_INT, offsetof(RTPPayloadData, streamtype)}, | |||||
| {"mode", ATTR_NAME_TYPE_STR, offsetof(RTPPayloadData, mode)}, | |||||
| {NULL, -1, -1}, | {NULL, -1, -1}, | ||||
| }; | }; | ||||
| @@ -331,7 +331,7 @@ static void sdp_parse_fmtp(AVStream *st, const char *p) | |||||
| RTSPStream *rtsp_st = st->priv_data; | RTSPStream *rtsp_st = st->priv_data; | ||||
| AVCodecContext *codec = st->codec; | AVCodecContext *codec = st->codec; | ||||
| rtp_payload_data_t *rtp_payload_data = &rtsp_st->rtp_payload_data; | |||||
| RTPPayloadData *rtp_payload_data = &rtsp_st->rtp_payload_data; | |||||
| /* loop on each attribute */ | /* loop on each attribute */ | ||||
| while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value))) | while(rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(value))) | ||||