History

rtpdec: Add ff_ prefix to all nonstatic symbols

Martin Storsjö committed 15 years ago

Commit bfc6db41 parent 318efbf5 files · +39 −39Browse files

Unified · Split

5 files
  1. avserver.c +2 −2
  2. libavformat/rtpdec.c +8 −8
  3. libavformat/rtpdec.h +12 −12
  4. libavformat/rtpproto.c +4 −4
  5. libavformat/rtsp.c +13 −13
avserver.c+2−2
@@ -3169,8 +3169,8 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url, · 3168 unmodified lines
31693169
31703170 switch(rtp_c->rtp_protocol) {
31713171 case RTSP_LOWER_TRANSPORT_UDP:
3172− rtp_port = rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]);
3173− rtcp_port = rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]);
3172+ rtp_port = ff_rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]);
3173+ rtcp_port = ff_rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]);
31743174 avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;"
31753175 "client_port=%d-%d;server_port=%d-%d",
31763176 th->client_port_min, th->client_port_max,
libavformat/rtpdec.c+8−8
@@ -218,7 +218,7 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq) · 217 unmodified lines
218218 return 1;
219219 }
220220
221−int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
221+int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
222222 {
223223 AVIOContext *pb;
224224 uint8_t *buf;
@@ -315,7 +315,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) · 90 unmodified lines
315315 return 0;
316316 }
317317
318−void rtp_send_punch_packets(URLContext* rtp_handle)
318+void ff_rtp_send_punch_packets(URLContext* rtp_handle)
319319 {
320320 AVIOContext *pb;
321321 uint8_t *buf;
@@ -359,7 +359,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle) · 37 unmodified lines
359359 * MPEG2TS streams to indicate that they should be demuxed inside the
360360 * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned)
361361 */
362−RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size)
362+RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size)
363363 {
364364 RTPDemuxContext *s;
365365
@@ -407,8 +407,8 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r · 41 unmodified lines
407407 }
408408
409409 void
410−rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
411− RTPDynamicProtocolHandler *handler)
410+ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
411+ RTPDynamicProtocolHandler *handler)
412412 {
413413 s->dynamic_protocol_context = ctx;
414414 s->parse_packet = handler->parse_packet;
@@ -722,8 +722,8 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt, · 307 unmodified lines
722722 * @return 0 if a packet is returned, 1 if a packet is returned and more can follow
723723 * (use buf as NULL to read the next). -1 if no packet (error or no more packet).
724724 */
725−int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
726− uint8_t **bufptr, int len)
725+int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
726+ uint8_t **bufptr, int len)
727727 {
728728 int rv = rtp_parse_one_packet(s, pkt, bufptr, len);
729729 s->prev_ret = rv;
@@ -732,7 +732,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, · 2 unmodified lines
732732 return rv ? rv : has_next_packet(s);
733733 }
734734
735−void rtp_parse_close(RTPDemuxContext *s)
735+void ff_rtp_parse_close(RTPDemuxContext *s)
736736 {
737737 ff_rtp_reset_packet_queue(s);
738738 if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
libavformat/rtpdec.h+12−12
@@ -38,18 +38,18 @@ typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler; · 37 unmodified lines
3838 #define RTP_NOTS_VALUE ((uint32_t)-1)
3939
4040 typedef struct RTPDemuxContext RTPDemuxContext;
41−RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size);
42−void rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
43− RTPDynamicProtocolHandler *handler);
44−int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
45− uint8_t **buf, int len);
46−void rtp_parse_close(RTPDemuxContext *s);
41+RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size);
42+void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
43+ RTPDynamicProtocolHandler *handler);
44+int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
45+ uint8_t **buf, int len);
46+void ff_rtp_parse_close(RTPDemuxContext *s);
4747 int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s);
4848 void ff_rtp_reset_packet_queue(RTPDemuxContext *s);
49−int rtp_get_local_rtp_port(URLContext *h);
50−int rtp_get_local_rtcp_port(URLContext *h);
49+int ff_rtp_get_local_rtp_port(URLContext *h);
50+int ff_rtp_get_local_rtcp_port(URLContext *h);
5151
52−int rtp_set_remote_url(URLContext *h, const char *uri);
52+int ff_rtp_set_remote_url(URLContext *h, const char *uri);
5353
5454 /**
5555 * Send a dummy packet on both port pairs to set up the connection
@@ -62,19 +62,19 @@ int rtp_set_remote_url(URLContext *h, const char *uri); · 6 unmodified lines
6262 * The same routine is used with RDT too, even if RDT doesn't use normal
6363 * RTP packets otherwise.
6464 */
65−void rtp_send_punch_packets(URLContext* rtp_handle);
65+void ff_rtp_send_punch_packets(URLContext* rtp_handle);
6666
6767 /**
6868 * some rtp servers assume client is dead if they don't hear from them...
6969 * so we send a Receiver Report to the provided ByteIO context
7070 * (we don't have access to the rtcp handle from here)
7171 */
72−int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count);
72+int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count);
7373
7474 /**
7575 * Get the file handle for the RTCP socket.
7676 */
77−int rtp_get_rtcp_file_handle(URLContext *h);
77+int ff_rtp_get_rtcp_file_handle(URLContext *h);
7878
7979 // these statistics are used for rtcp receiver reports...
8080 typedef struct {
libavformat/rtpproto.c+4−4
@@ -60,7 +60,7 @@ typedef struct RTPContext { · 59 unmodified lines
6060 * @return zero if no error.
6161 */
6262
63−int rtp_set_remote_url(URLContext *h, const char *uri)
63+int ff_rtp_set_remote_url(URLContext *h, const char *uri)
6464 {
6565 RTPContext *s = h->priv_data;
6666 char hostname[256];
@@ -300,7 +300,7 @@ static int rtp_close(URLContext *h) · 233 unmodified lines
300300 * @return the local port number
301301 */
302302
303−int rtp_get_local_rtp_port(URLContext *h)
303+int ff_rtp_get_local_rtp_port(URLContext *h)
304304 {
305305 RTPContext *s = h->priv_data;
306306 return ff_udp_get_local_port(s->rtp_hd);
@@ -312,7 +312,7 @@ int rtp_get_local_rtp_port(URLContext *h) · 5 unmodified lines
312312 * @return the local port number
313313 */
314314
315−int rtp_get_local_rtcp_port(URLContext *h)
315+int ff_rtp_get_local_rtcp_port(URLContext *h)
316316 {
317317 RTPContext *s = h->priv_data;
318318 return ff_udp_get_local_port(s->rtcp_hd);
@@ -324,7 +324,7 @@ static int rtp_get_file_handle(URLContext *h) · 5 unmodified lines
324324 return s->rtp_fd;
325325 }
326326
327−int rtp_get_rtcp_file_handle(URLContext *h) {
327+int ff_rtp_get_rtcp_file_handle(URLContext *h) {
328328 RTPContext *s = h->priv_data;
329329 return s->rtcp_fd;
330330 }
libavformat/rtsp.c+13−13
@@ -501,7 +501,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s) · 500 unmodified lines
501501 } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
502502 ff_rdt_parse_close(rtsp_st->transport_priv);
503503 else if (CONFIG_RTPDEC)
504− rtp_parse_close(rtsp_st->transport_priv);
504+ ff_rtp_parse_close(rtsp_st->transport_priv);
505505 }
506506 rtsp_st->transport_priv = NULL;
507507 if (rtsp_st->rtp_handle)
@@ -558,7 +558,7 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) · 50 unmodified lines
558558 rtsp_st->dynamic_protocol_context,
559559 rtsp_st->dynamic_handler);
560560 else if (CONFIG_RTPDEC)
561− rtsp_st->transport_priv = rtp_parse_open(s, st, rtsp_st->rtp_handle,
561+ rtsp_st->transport_priv = ff_rtp_parse_open(s, st, rtsp_st->rtp_handle,
562562 rtsp_st->sdp_payload_type,
563563 (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP || !s->max_delay)
564564 ? 0 : RTP_REORDER_QUEUE_DEFAULT_SIZE);
@@ -567,9 +567,9 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st) · 2 unmodified lines
567567 return AVERROR(ENOMEM);
568568 } else if (rt->transport != RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) {
569569 if (rtsp_st->dynamic_handler) {
570− rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv,
571− rtsp_st->dynamic_protocol_context,
572− rtsp_st->dynamic_handler);
570+ ff_rtp_parse_set_dynamic_protocol(rtsp_st->transport_priv,
571+ rtsp_st->dynamic_protocol_context,
572+ rtsp_st->dynamic_handler);
573573 }
574574 }
575575
@@ -1121,7 +1121,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, · 545 unmodified lines
11211121 goto fail;
11221122
11231123 rtp_opened:
1124− port = rtp_get_local_rtp_port(rtsp_st->rtp_handle);
1124+ port = ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle);
11251125 have_port:
11261126 snprintf(transport, sizeof(transport) - 1,
11271127 "%s/UDP;", trans_pref);
@@ -1225,7 +1225,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, · 97 unmodified lines
12251225 reply->transports[0].server_port_min, "%s", options);
12261226 }
12271227 if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) &&
1228− rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) {
1228+ ff_rtp_set_remote_url(rtsp_st->rtp_handle, url) < 0) {
12291229 err = AVERROR_INVALIDDATA;
12301230 goto fail;
12311231 }
@@ -1235,7 +1235,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, · 3 unmodified lines
12351235 */
12361236 if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat &&
12371237 CONFIG_RTPDEC)
1238− rtp_send_punch_packets(rtsp_st->rtp_handle);
1238+ ff_rtp_send_punch_packets(rtsp_st->rtp_handle);
12391239 break;
12401240 }
12411241 case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: {
@@ -1569,7 +1569,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, · 327 unmodified lines
15691569 if (rtsp_st->rtp_handle) {
15701570 p[max_p].fd = ffurl_get_file_handle(rtsp_st->rtp_handle);
15711571 p[max_p++].events = POLLIN;
1572− p[max_p].fd = rtp_get_rtcp_file_handle(rtsp_st->rtp_handle);
1572+ p[max_p].fd = ff_rtp_get_rtcp_file_handle(rtsp_st->rtp_handle);
15731573 p[max_p++].events = POLLIN;
15741574 }
15751575 }
@@ -1624,7 +1624,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) · 48 unmodified lines
16241624 if (rt->transport == RTSP_TRANSPORT_RDT) {
16251625 ret = ff_rdt_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
16261626 } else
1627− ret = rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
1627+ ret = ff_rtp_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
16281628 if (ret == 0) {
16291629 rt->cur_transport_priv = NULL;
16301630 return 0;
@@ -1672,13 +1672,13 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) · 41 unmodified lines
16721672 case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
16731673 len = udp_read_packet(s, &rtsp_st, rt->recvbuf, RECVBUF_SIZE, wait_end);
16741674 if (len > 0 && rtsp_st->transport_priv && rt->transport == RTSP_TRANSPORT_RTP)
1675− rtp_check_and_send_back_rr(rtsp_st->transport_priv, len);
1675+ ff_rtp_check_and_send_back_rr(rtsp_st->transport_priv, len);
16761676 break;
16771677 }
16781678 if (len == AVERROR(EAGAIN) && first_queue_st &&
16791679 rt->transport == RTSP_TRANSPORT_RTP) {
16801680 rtsp_st = first_queue_st;
1681− ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, NULL, 0);
1681+ ret = ff_rtp_parse_packet(rtsp_st->transport_priv, pkt, NULL, 0);
16821682 goto end;
16831683 }
16841684 if (len < 0)
@@ -1688,7 +1688,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt) · 3 unmodified lines
16881688 if (rt->transport == RTSP_TRANSPORT_RDT) {
16891689 ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
16901690 } else {
1691− ret = rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
1691+ ret = ff_rtp_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
16921692 if (ret < 0) {
16931693 /* Either bad packet, or a RTCP packet. Check if the
16941694 * first_rtcp_ntp_time field was initialized. */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t