packet counter: removed unused function

+ optimized includes + using
This commit is contained in:
Martin Pulec
2023-08-01 10:50:17 +02:00
parent 7f810b8ddd
commit 2e03e67ba3
2 changed files with 3 additions and 24 deletions

View File

@@ -42,17 +42,12 @@
#endif // defined HAVE_CONFIG_H
#include "utils/packet_counter.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <cassert>
#include <map>
#include <vector>
#include "debug.h"
using namespace std;
using std::map;
using std::vector;
struct packet_counter {
explicit packet_counter(int ns)
@@ -67,14 +62,6 @@ struct packet_counter {
current_frame[substream_id][offset] = len;
}
bool has_packet(int substream_id, int bufnum, int offset, int len) {
UNUSED(len);
assert(substream_id < num_substreams);
return cumulative[substream_id][bufnum][offset] != 0;
}
int get_total_bytes() {
int ret = 0;
@@ -168,12 +155,6 @@ void packet_counter_register_packet(struct packet_counter *state, unsigned int s
state->register_packet(substream_id, bufnum, offset, len);
}
bool packet_counter_has_packet(struct packet_counter *state, unsigned int substream_id,
unsigned int bufnum, unsigned int offset, unsigned int len)
{
return state->has_packet(substream_id, bufnum, offset, len);
}
int packet_counter_get_total_bytes(struct packet_counter *state)
{
return state->get_total_bytes();

View File

@@ -52,8 +52,6 @@ struct packet_counter *packet_counter_init(int num_substreams);
void packet_counter_destroy(struct packet_counter *state);
void packet_counter_register_packet(struct packet_counter *state, unsigned int substream_id,
unsigned int bufnum, unsigned int offset, unsigned int len);
bool packet_counter_has_packet(struct packet_counter *state, unsigned int substream_id,
unsigned int bufnum, unsigned int offset, unsigned int len);
int packet_counter_get_total_bytes(struct packet_counter *state);
int packet_counter_get_all_bytes(struct packet_counter *state);
int packet_counter_get_channels(struct packet_counter *state);