Browse Source

MT#55283 eliminate `basic_stats` struct

Pointless.

Change-Id: Idf546106115ca136f2c77bb13008bb561bd0173d
pull/1826/head
Richard Fuchs 2 years ago
parent
commit
2698e53948
3 changed files with 10 additions and 13 deletions
  1. +5
    -5
      daemon/media_socket.c
  2. +4
    -4
      kernel-module/xt_RTPENGINE.c
  3. +1
    -4
      kernel-module/xt_RTPENGINE.h

+ 5
- 5
daemon/media_socket.c View File

@ -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);


+ 4
- 4
kernel-module/xt_RTPENGINE.c View File

@ -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


+ 1
- 4
kernel-module/xt_RTPENGINE.h View File

@ -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


Loading…
Cancel
Save