Browse code

rtpdec: Add ff_ prefix to all nonstatic symbols

Signed-off-by: Martin Storsjö <martin@martin.st>

Martin Storsjö authored on 2011/10/12 18:37:42
Showing 5 changed files
... ...
@@ -3169,8 +3169,8 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
3169 3169
 
3170 3170
     switch(rtp_c->rtp_protocol) {
3171 3171
     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]);
3174 3174
         avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;"
3175 3175
                     "client_port=%d-%d;server_port=%d-%d",
3176 3176
                     th->client_port_min, th->client_port_max,
... ...
@@ -218,7 +218,7 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
218 218
     return 1;
219 219
 }
220 220
 
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)
222 222
 {
223 223
     AVIOContext *pb;
224 224
     uint8_t *buf;
... ...
@@ -315,7 +315,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
315 315
     return 0;
316 316
 }
317 317
 
318
-void rtp_send_punch_packets(URLContext* rtp_handle)
318
+void ff_rtp_send_punch_packets(URLContext* rtp_handle)
319 319
 {
320 320
     AVIOContext *pb;
321 321
     uint8_t *buf;
... ...
@@ -359,7 +359,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle)
359 359
  * MPEG2TS streams to indicate that they should be demuxed inside the
360 360
  * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned)
361 361
  */
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)
363 363
 {
364 364
     RTPDemuxContext *s;
365 365
 
... ...
@@ -407,8 +407,8 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r
407 407
 }
408 408
 
409 409
 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)
412 412
 {
413 413
     s->dynamic_protocol_context = ctx;
414 414
     s->parse_packet = handler->parse_packet;
... ...
@@ -722,8 +722,8 @@ static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt,
722 722
  * @return 0 if a packet is returned, 1 if a packet is returned and more can follow
723 723
  * (use buf as NULL to read the next). -1 if no packet (error or no more packet).
724 724
  */
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)
727 727
 {
728 728
     int rv = rtp_parse_one_packet(s, pkt, bufptr, len);
729 729
     s->prev_ret = rv;
... ...
@@ -732,7 +732,7 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
732 732
     return rv ? rv : has_next_packet(s);
733 733
 }
734 734
 
735
-void rtp_parse_close(RTPDemuxContext *s)
735
+void ff_rtp_parse_close(RTPDemuxContext *s)
736 736
 {
737 737
     ff_rtp_reset_packet_queue(s);
738 738
     if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
... ...
@@ -38,18 +38,18 @@ typedef struct RTPDynamicProtocolHandler_s RTPDynamicProtocolHandler;
38 38
 #define RTP_NOTS_VALUE ((uint32_t)-1)
39 39
 
40 40
 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);
47 47
 int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s);
48 48
 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);
51 51
 
52
-int rtp_set_remote_url(URLContext *h, const char *uri);
52
+int ff_rtp_set_remote_url(URLContext *h, const char *uri);
53 53
 
54 54
 /**
55 55
  * 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);
62 62
  * The same routine is used with RDT too, even if RDT doesn't use normal
63 63
  * RTP packets otherwise.
64 64
  */
65
-void rtp_send_punch_packets(URLContext* rtp_handle);
65
+void ff_rtp_send_punch_packets(URLContext* rtp_handle);
66 66
 
67 67
 /**
68 68
  * some rtp servers assume client is dead if they don't hear from them...
69 69
  * so we send a Receiver Report to the provided ByteIO context
70 70
  * (we don't have access to the rtcp handle from here)
71 71
  */
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);
73 73
 
74 74
 /**
75 75
  * Get the file handle for the RTCP socket.
76 76
  */
77
-int rtp_get_rtcp_file_handle(URLContext *h);
77
+int ff_rtp_get_rtcp_file_handle(URLContext *h);
78 78
 
79 79
 // these statistics are used for rtcp receiver reports...
80 80
 typedef struct {
... ...
@@ -60,7 +60,7 @@ typedef struct RTPContext {
60 60
  * @return zero if no error.
61 61
  */
62 62
 
63
-int rtp_set_remote_url(URLContext *h, const char *uri)
63
+int ff_rtp_set_remote_url(URLContext *h, const char *uri)
64 64
 {
65 65
     RTPContext *s = h->priv_data;
66 66
     char hostname[256];
... ...
@@ -300,7 +300,7 @@ static int rtp_close(URLContext *h)
300 300
  * @return the local port number
301 301
  */
302 302
 
303
-int rtp_get_local_rtp_port(URLContext *h)
303
+int ff_rtp_get_local_rtp_port(URLContext *h)
304 304
 {
305 305
     RTPContext *s = h->priv_data;
306 306
     return ff_udp_get_local_port(s->rtp_hd);
... ...
@@ -312,7 +312,7 @@ int rtp_get_local_rtp_port(URLContext *h)
312 312
  * @return the local port number
313 313
  */
314 314
 
315
-int rtp_get_local_rtcp_port(URLContext *h)
315
+int ff_rtp_get_local_rtcp_port(URLContext *h)
316 316
 {
317 317
     RTPContext *s = h->priv_data;
318 318
     return ff_udp_get_local_port(s->rtcp_hd);
... ...
@@ -324,7 +324,7 @@ static int rtp_get_file_handle(URLContext *h)
324 324
     return s->rtp_fd;
325 325
 }
326 326
 
327
-int rtp_get_rtcp_file_handle(URLContext *h) {
327
+int ff_rtp_get_rtcp_file_handle(URLContext *h) {
328 328
     RTPContext *s = h->priv_data;
329 329
     return s->rtcp_fd;
330 330
 }
... ...
@@ -501,7 +501,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s)
501 501
             } else if (rt->transport == RTSP_TRANSPORT_RDT && CONFIG_RTPDEC)
502 502
                 ff_rdt_parse_close(rtsp_st->transport_priv);
503 503
             else if (CONFIG_RTPDEC)
504
-                rtp_parse_close(rtsp_st->transport_priv);
504
+                ff_rtp_parse_close(rtsp_st->transport_priv);
505 505
         }
506 506
         rtsp_st->transport_priv = NULL;
507 507
         if (rtsp_st->rtp_handle)
... ...
@@ -558,7 +558,7 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
558 558
                                             rtsp_st->dynamic_protocol_context,
559 559
                                             rtsp_st->dynamic_handler);
560 560
     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,
562 562
                                          rtsp_st->sdp_payload_type,
563 563
             (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP || !s->max_delay)
564 564
             ? 0 : RTP_REORDER_QUEUE_DEFAULT_SIZE);
... ...
@@ -567,9 +567,9 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
567 567
          return AVERROR(ENOMEM);
568 568
     } else if (rt->transport != RTSP_TRANSPORT_RDT && CONFIG_RTPDEC) {
569 569
         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);
573 573
         }
574 574
     }
575 575
 
... ...
@@ -1121,7 +1121,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
1121 1121
             goto fail;
1122 1122
 
1123 1123
         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);
1125 1125
         have_port:
1126 1126
             snprintf(transport, sizeof(transport) - 1,
1127 1127
                      "%s/UDP;", trans_pref);
... ...
@@ -1225,7 +1225,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
1225 1225
                             reply->transports[0].server_port_min, "%s", options);
1226 1226
             }
1227 1227
             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) {
1229 1229
                 err = AVERROR_INVALIDDATA;
1230 1230
                 goto fail;
1231 1231
             }
... ...
@@ -1235,7 +1235,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
1235 1235
              */
1236 1236
             if (!(rt->server_type == RTSP_SERVER_WMS && i > 1) && s->iformat &&
1237 1237
                 CONFIG_RTPDEC)
1238
-                rtp_send_punch_packets(rtsp_st->rtp_handle);
1238
+                ff_rtp_send_punch_packets(rtsp_st->rtp_handle);
1239 1239
             break;
1240 1240
         }
1241 1241
         case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: {
... ...
@@ -1569,7 +1569,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
1569 1569
             if (rtsp_st->rtp_handle) {
1570 1570
                 p[max_p].fd = ffurl_get_file_handle(rtsp_st->rtp_handle);
1571 1571
                 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);
1573 1573
                 p[max_p++].events = POLLIN;
1574 1574
             }
1575 1575
         }
... ...
@@ -1624,7 +1624,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
1624 1624
         if (rt->transport == RTSP_TRANSPORT_RDT) {
1625 1625
             ret = ff_rdt_parse_packet(rt->cur_transport_priv, pkt, NULL, 0);
1626 1626
         } 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);
1628 1628
         if (ret == 0) {
1629 1629
             rt->cur_transport_priv = NULL;
1630 1630
             return 0;
... ...
@@ -1672,13 +1672,13 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
1672 1672
     case RTSP_LOWER_TRANSPORT_UDP_MULTICAST:
1673 1673
         len = udp_read_packet(s, &rtsp_st, rt->recvbuf, RECVBUF_SIZE, wait_end);
1674 1674
         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);
1676 1676
         break;
1677 1677
     }
1678 1678
     if (len == AVERROR(EAGAIN) && first_queue_st &&
1679 1679
         rt->transport == RTSP_TRANSPORT_RTP) {
1680 1680
         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);
1682 1682
         goto end;
1683 1683
     }
1684 1684
     if (len < 0)
... ...
@@ -1688,7 +1688,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
1688 1688
     if (rt->transport == RTSP_TRANSPORT_RDT) {
1689 1689
         ret = ff_rdt_parse_packet(rtsp_st->transport_priv, pkt, &rt->recvbuf, len);
1690 1690
     } 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);
1692 1692
         if (ret < 0) {
1693 1693
             /* Either bad packet, or a RTCP packet. Check if the
1694 1694
              * first_rtcp_ntp_time field was initialized. */