mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 12:40:19 +00:00
packet counter: removed unused function
+ optimized includes + using
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user