comparison rtsp.c @ 4067:8adccfc01be3 libavformat

Change function prototype of the sdp_parse_a_line in DynamicProtocolHandler. This function is called in rtsp.c for each a= line in the SDP of the Describe response after m= RTSP stream descriptors. The function prototype used to take an AVStream argument. For RDT, however, every RTSPStream represents a set of streams of identical content, and can thus represent multiple AVStreams. Therefore, it should not take an AVStream as argument. This patch modifies it to accept a AVFormatContext (of the RTSP/SDP demuxer) instead. See discussion in "[PATCH/RFC] change function prototype of parse_sdp_a_line" thread on ML.
author rbultje
date Sat, 06 Dec 2008 18:41:17 +0000
parents 7bc64c735f8b
children 526755859ce5
comparison
equal deleted inserted replaced
4066:10f7232a3545 4067:8adccfc01be3
516 for(i = 0; i < s->nb_streams;i++) { 516 for(i = 0; i < s->nb_streams;i++) {
517 st = s->streams[i]; 517 st = s->streams[i];
518 rtsp_st = st->priv_data; 518 rtsp_st = st->priv_data;
519 if (rtsp_st->sdp_payload_type == payload_type) { 519 if (rtsp_st->sdp_payload_type == payload_type) {
520 if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) { 520 if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) {
521 if(!rtsp_st->dynamic_handler->parse_sdp_a_line(st, rtsp_st->dynamic_protocol_context, buf)) { 521 if(!rtsp_st->dynamic_handler->parse_sdp_a_line(s, i, rtsp_st->dynamic_protocol_context, buf)) {
522 sdp_parse_fmtp(st, p); 522 sdp_parse_fmtp(st, p);
523 } 523 }
524 } else { 524 } else {
525 sdp_parse_fmtp(st, p); 525 sdp_parse_fmtp(st, p);
526 } 526 }
533 for(i = 0; i < s->nb_streams;i++) { 533 for(i = 0; i < s->nb_streams;i++) {
534 st = s->streams[i]; 534 st = s->streams[i];
535 rtsp_st = st->priv_data; 535 rtsp_st = st->priv_data;
536 if (rtsp_st->sdp_payload_type == payload_type) { 536 if (rtsp_st->sdp_payload_type == payload_type) {
537 if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) { 537 if(rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) {
538 rtsp_st->dynamic_handler->parse_sdp_a_line(st, rtsp_st->dynamic_protocol_context, buf); 538 rtsp_st->dynamic_handler->parse_sdp_a_line(s, i, rtsp_st->dynamic_protocol_context, buf);
539 } 539 }
540 } 540 }
541 } 541 }
542 } else if(av_strstart(p, "range:", &p)) { 542 } else if(av_strstart(p, "range:", &p)) {
543 int64_t start, end; 543 int64_t start, end;
551 rt->transport = RTSP_TRANSPORT_RDT; 551 rt->transport = RTSP_TRANSPORT_RDT;
552 } else if (s->nb_streams > 0) { 552 } else if (s->nb_streams > 0) {
553 rtsp_st = s->streams[s->nb_streams - 1]->priv_data; 553 rtsp_st = s->streams[s->nb_streams - 1]->priv_data;
554 if (rtsp_st->dynamic_handler && 554 if (rtsp_st->dynamic_handler &&
555 rtsp_st->dynamic_handler->parse_sdp_a_line) 555 rtsp_st->dynamic_handler->parse_sdp_a_line)
556 rtsp_st->dynamic_handler->parse_sdp_a_line(s->streams[s->nb_streams - 1], 556 rtsp_st->dynamic_handler->parse_sdp_a_line(s, s->nb_streams - 1,
557 rtsp_st->dynamic_protocol_context, buf); 557 rtsp_st->dynamic_protocol_context, buf);
558 } 558 }
559 break; 559 break;
560 } 560 }
561 } 561 }