From 06c45c497024f10e451c2be70346cbe1acaef1b8 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Thu, 1 Nov 2018 11:28:22 +0000 Subject: [PATCH] Remove a few unused functions. --- player.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/player.c b/player.c index 436eeb0c..43461bf3 100644 --- a/player.c +++ b/player.c @@ -165,14 +165,6 @@ static inline seq_t SUCCESSOR(seq_t x) { return p; } -// this is not used -static inline seq_t PREDECESSOR(seq_t x) { - uint32_t p = (x & 0xffff) + 0x10000; - p -= 1; - p = p & 0xffff; - return p; -} - // used in seq_diff and seq_order // anything with ORDINATE in it must be proctected by the ab_mutex @@ -211,25 +203,6 @@ static inline seq_t seq_sum(seq_t a, seq_t b) { return r; } -// now for 32-bit wrapping in timestamps - -// this returns true if the second arg is strictly after the first -// on the assumption that the gap between them is never greater than (2^31)-1 -// Represent a and b in 64 bits -static inline int seq32_order(uint32_t a, uint32_t b) { - if (a == b) - return 0; - int64_t A = a & 0xffffffff; - int64_t B = b & 0xffffffff; - int64_t C = B - A; - // if bit 31 is set, it means either b is before (i.e. less than) a or - // b is (2^31)-1 ahead of a. - - // If we assume the gap between b and a should never reach 2 billion, then - // bit 31 == 0 means b is strictly after a - return (C & 0x80000000) == 0; -} - void reset_input_flow_metrics(rtsp_conn_info *conn) { conn->play_number_after_flush = 0; conn->packet_count_since_flush = 0; @@ -1267,16 +1240,6 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) { return curframe; } -static inline short shortmean(short a, short b) { - long al = (long)a; - long bl = (long)b; - long longmean = (al + bl) / 2; - short r = (short)longmean; - if (r != longmean) - debug(1, "Error calculating average of two shorts"); - return r; -} - static inline int32_t mean_32(int32_t a, int32_t b) { int64_t al = a; int64_t bl = b; -- 2.47.2