diff --git a/daemon/media_socket.c b/daemon/media_socket.c index d159ec318..c57bae540 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1776,11 +1776,11 @@ static void __stream_consume_stats(struct packet_stream *ps, const struct rtpeng continue; struct ssrc_entry_call *parent = ssrc_ctx->parent; - if (!stats_info->ssrc_stats[u].basic_stats.packets) // no change + if (!stats_info->ssrc_stats[u].packets) // no change continue; - atomic64_add(&ssrc_ctx->packets, stats_info->ssrc_stats[u].basic_stats.packets); - atomic64_add(&ssrc_ctx->octets, stats_info->ssrc_stats[u].basic_stats.bytes); + atomic64_add(&ssrc_ctx->packets, stats_info->ssrc_stats[u].packets); + atomic64_add(&ssrc_ctx->octets, stats_info->ssrc_stats[u].bytes); parent->packets_lost += stats_info->ssrc_stats[u].total_lost; // XXX should be atomic? atomic64_set(&ssrc_ctx->last_seq, stats_info->ssrc_stats[u].ext_seq); parent->jitter = stats_info->ssrc_stats[u].jitter; @@ -1811,8 +1811,8 @@ static void __stream_consume_stats(struct packet_stream *ps, const struct rtpeng if (ssrc_ctx) { parent = ssrc_ctx->parent; - atomic64_add(&ssrc_ctx->packets, stats_info->ssrc_stats[u].basic_stats.packets); - atomic64_add(&ssrc_ctx->octets, stats_info->ssrc_stats[u].basic_stats.bytes); + atomic64_add(&ssrc_ctx->packets, stats_info->ssrc_stats[u].packets); + atomic64_add(&ssrc_ctx->octets, stats_info->ssrc_stats[u].bytes); } mutex_unlock(&sink->out_lock); diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 94d1de846..c5ac6ff45 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -1864,8 +1864,8 @@ static void target_retrieve_stats(struct rtpengine_target *g, struct rtpengine_s i->ssrc[u] = g->target.ssrc[u]; i->ssrc_stats[u] = g->ssrc_stats[u]; - g->ssrc_stats[u].basic_stats.packets = 0; - g->ssrc_stats[u].basic_stats.bytes = 0; + g->ssrc_stats[u].packets = 0; + g->ssrc_stats[u].bytes = 0; g->ssrc_stats[u].total_lost = 0; } @@ -5226,8 +5226,8 @@ static void rtp_stats(struct rtpengine_target *g, struct rtp_parsed *rtp, s64 ar spin_lock_irqsave(&g->ssrc_stats_lock, flags); - s->basic_stats.packets++; - s->basic_stats.bytes += rtp->payload_len; + s->packets++; + s->bytes += rtp->payload_len; s->timestamp = ts; // track sequence numbers and lost frames diff --git a/kernel-module/xt_RTPENGINE.h b/kernel-module/xt_RTPENGINE.h index bf39783fb..a1920e2e6 100644 --- a/kernel-module/xt_RTPENGINE.h +++ b/kernel-module/xt_RTPENGINE.h @@ -17,12 +17,9 @@ struct xt_rtpengine_info { unsigned int id; }; -struct rtpengine_rtp_stats { +struct rtpengine_ssrc_stats { uint64_t packets; uint64_t bytes; -}; -struct rtpengine_ssrc_stats { - struct rtpengine_rtp_stats basic_stats; uint32_t timestamp; uint32_t ext_seq; uint32_t lost_bits; // sliding bitfield, [0] = ext_seq