UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
packet_counter Struct Reference
Collaboration diagram for packet_counter:
Collaboration graph

Public Member Functions

 packet_counter (int ns)
 
void clear ()
 
int get_all_bytes ()
 
int get_total_bytes ()
 
void register_packet (int substream_id, int bufnum, int offset, int len)
 

Public Attributes

vector< map< int, map< int, int > > > substream_data
 

Detailed Description

Definition at line 51 of file packet_counter.cpp.

Constructor & Destructor Documentation

◆ packet_counter()

packet_counter::packet_counter ( int ns)
inlineexplicit

Definition at line 52 of file packet_counter.cpp.

52: substream_data(ns) {}
vector< map< int, map< int, int > > > substream_data

Referenced by packet_counter_init().

Member Function Documentation

◆ clear()

void packet_counter::clear ( )
inline

Definition at line 87 of file packet_counter.cpp.

87 {
88 for (auto &&chan : substream_data) {
89 chan.clear();
90 }
91 }

References substream_data.

◆ get_all_bytes()

int packet_counter::get_all_bytes ( )
inline

Definition at line 72 of file packet_counter.cpp.

72 {
73 int ret = 0;
74
75 for (auto &&chan : substream_data) {
76 for (auto &buf : chan) {
77 if (!buf.second.empty()) {
78 ret += (--buf.second.end())->first +
79 (--buf.second.end())->second;
80 }
81 }
82 }
83
84 return ret;
85 }

References substream_data.

◆ get_total_bytes()

int packet_counter::get_total_bytes ( )
inline

Definition at line 58 of file packet_counter.cpp.

58 {
59 int ret = 0;
60
61 for (auto &&chan : substream_data) {
62 for (auto &&buffer : chan) {
63 for (auto &&packet : buffer.second) {
64 ret += packet.second;
65 }
66 }
67 }
68
69 return ret;
70 }

References substream_data.

◆ register_packet()

void packet_counter::register_packet ( int substream_id,
int bufnum,
int offset,
int len )
inline

Definition at line 54 of file packet_counter.cpp.

54 {
55 substream_data.at(substream_id)[bufnum][offset] = len;
56 }
int void size_t * len
static __device__ const float offset
Definition cuda_dxt.cu:139

References len, offset, and substream_data.

Member Data Documentation

◆ substream_data

vector<map<int, map<int, int> > > packet_counter::substream_data

Definition at line 93 of file packet_counter.cpp.

Referenced by clear(), get_all_bytes(), get_total_bytes(), and register_packet().


The documentation for this struct was generated from the following file: