Merge pull request #766 from mikebrady/remove_duplicate_gdbus_codegen_calls
Tidy up a few things – 1. Stop duplicate gdbus codegen calls during parallel makes. 2. Remove a few unused functions in player.c.
This commit is contained in:
@@ -116,6 +116,7 @@ CLEANFILES += $(BUILT_SOURCES)
|
||||
|
||||
dbus-interface.h dbus-interface.c: org.gnome.ShairportSync.xml
|
||||
gdbus-codegen --interface-prefix org.gnome --generate-c-code dbus-interface org.gnome.ShairportSync.xml
|
||||
dbus-interface.h: dbus-interface.c
|
||||
endif
|
||||
|
||||
if USE_MPRIS
|
||||
@@ -131,6 +132,7 @@ CLEANFILES += $(BUILT_SOURCES)
|
||||
|
||||
mpris-interface.h mpris-interface.c: org.mpris.MediaPlayer2.xml
|
||||
gdbus-codegen --interface-prefix org.mpris --generate-c-code mpris-interface org.mpris.MediaPlayer2.xml
|
||||
mpris-interface.h: mpris-interface.c
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS =
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user