Browse code

rtp: remove disabled code

Diego Biurrun authored on 2011/07/17 20:27:46
Showing 2 changed files
... ...
@@ -218,22 +218,6 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
218 218
     return 1;
219 219
 }
220 220
 
221
-#if 0
222
-/**
223
-* This function is currently unused; without a valid local ntp time, I don't see how we could calculate the
224
-* difference between the arrival and sent timestamp.  As a result, the jitter and transit statistics values
225
-* never change.  I left this in in case someone else can see a way. (rdm)
226
-*/
227
-static void rtcp_update_jitter(RTPStatistics *s, uint32_t sent_timestamp, uint32_t arrival_timestamp)
228
-{
229
-    uint32_t transit= arrival_timestamp - sent_timestamp;
230
-    int d;
231
-    s->transit= transit;
232
-    d= FFABS(transit - s->transit);
233
-    s->jitter += d - ((s->jitter + 8)>>4);
234
-}
235
-#endif
236
-
237 221
 int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
238 222
 {
239 223
     AVIOContext *pb;
... ...
@@ -225,20 +225,6 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
225 225
     int len, n;
226 226
     struct pollfd p[2] = {{s->rtp_fd, POLLIN, 0}, {s->rtcp_fd, POLLIN, 0}};
227 227
 
228
-#if 0
229
-    for(;;) {
230
-        from_len = sizeof(from);
231
-        len = recvfrom (s->rtp_fd, buf, size, 0,
232
-                        (struct sockaddr *)&from, &from_len);
233
-        if (len < 0) {
234
-            if (ff_neterrno() == AVERROR(EAGAIN) ||
235
-                ff_neterrno() == AVERROR(EINTR))
236
-                continue;
237
-            return AVERROR(EIO);
238
-        }
239
-        break;
240
-    }
241
-#else
242 228
     for(;;) {
243 229
         if (url_interrupt_cb())
244 230
             return AVERROR_EXIT;
... ...
@@ -277,7 +263,6 @@ static int rtp_read(URLContext *h, uint8_t *buf, int size)
277 277
             return AVERROR(EIO);
278 278
         }
279 279
     }
280
-#endif
281 280
     return len;
282 281
 }
283 282
 
... ...
@@ -296,14 +281,6 @@ static int rtp_write(URLContext *h, const uint8_t *buf, int size)
296 296
     }
297 297
 
298 298
     ret = ffurl_write(hd, buf, size);
299
-#if 0
300
-    {
301
-        struct timespec ts;
302
-        ts.tv_sec = 0;
303
-        ts.tv_nsec = 10 * 1000000;
304
-        nanosleep(&ts, NULL);
305
-    }
306
-#endif
307 299
     return ret;
308 300
 }
309 301