Only parse out a codec type if the codec is given with any parameters
set (and not just by name). Parsing out a codec type when just its name
is given leads to a codec type with default parameters set (such as the
number of channels) which can lead to a stricter matching than desired.
When a codec is given just by name we want to match all codecs of that
type, not just the ones with the same parameters as the default ones.
Change-Id: I583bf4045dbd55291d8dc596310730024853d386
There's no point in sampling Graphite-specific stats, nor in reporting
them out, if Graphite is not enabled.
Change-Id: If8014513832485f38d81b478c695391129c21dff
Distinguish between two different types of "gauge" type metrics: Actual
gauges which (at least conceptually) have a single continuous value, and
metrics which are comprised of discretely sampled values, possibly from
multiple sources.
Real gauges with continuous values don't have mean/average/deviation
values directly associated with them, as calculating these requires
sampling or some other analysis.
Sampled metrics on the other hand do have these associated values.
Clarify which function does what and where each value comes from.
Change-Id: Iff5dd844b70ff70979b1b8c84dc7734d44b3da20
Rename structs and variables to make it clear that these min/max values
are min/max per-sec rate values.
Carry mins and maxes separately from averages. This changes the meaning
of $command_ps_avg away from an "average of averages" to an actual
average, which is more accurate.
Calculate this average based on per-interval differences and interval
duration (stats_rate_min_max_avg_sample).
Side effect: As rtpe_latest_graphite_interval_start is now set in
print_graphite_data instead of in graphite_loop_run, the test now
reports a different "interval calls duration".
Change-Id: I67b1118c18ca2464a48c4836fca3cfdb4d53c898
Perform accumulation of stats only once (i.e. increasing an actual
counter) and report stats based on differences to previous values,
instead of carrying multiple stats counters for each metric and
resetting each counter to zero whenever stats are reported.
`rtpe_stats` is the global master accumulator.
`_intv` variables are intermediate and local storage for values sampled
from `rtpe_stats` at regular intervals.
`_rate` and `_diff` variables hold stats calculated from `rtpe_stats`
and the respective `_intv` variable whenever the sampling and reporting
occurs.
`stats_counters_calc_diff` is used to calculate stats as differences
between `rtpe_stats` and the last sampled `_intv`
`stats_counters_calc_rate` does the same but calculates a per-second
rate, based on a microsecond duration.
Eliminate now-useless struct global_stats_ax
Change-Id: Ic4ca630161787025219b67e49b41995204d60573
Use dedicated functions and different code paths for the different use
cases, instead of just a single function which does if/else all the
time.
Change-Id: Ic3ab928c3605cfe4a2f48889e95a3a1ddccdbbec
In order to rewrite certain session-level SDP lines, we need to
reference a packet_stream which contains the correct information. But we
cannot simply rely on the first media section having a usable packet
stream, as the first media section could have been rejected. Iterate
media sections until we find a usable one.
Change-Id: I36594e80981fc0645a7747399bd9951fbc2e5676
The "done" label is also used when the output is already open and
established, therefore the log message should go above it.
Change-Id: Iceb218a8cffeb42de302324374c790c46557d985
This fixes the payload counts not being tracked correctly when payload
types repeat after the tracker rolls over.
Change-Id: I16208ef73f3af3b051b96541a4c145b323cef7b2
The SRTP decryption context is associated with the local socket. Use the
socket that a packet was actually received on for the decryption context
instead of using the one that it was expected to be received on.
Change-Id: Iddf400a440fc51b4afb370ec827f75e9626b2cfd
(cherry picked from commit 8c3452e50b7aa4f5b7122dbd7221e34143467885)
When a receiving socket doesn't match the socket we were expecting, make
sure that the receiving socket is actually one of the sockets we want to
use at this point before blindly switching the socket.
This fixes a race condition after a re-invite: A new set of sockets has
been opened, but an old/delayed RTP packet still arrives on one of the
old ports. In this case we don't want to switch the local socket.
Change-Id: I4e2b87ad608b1a9c6a0bb2eae5c305fd79be70d5
(cherry picked from commit 304a1b11ef6679b4ab133c1c44bb0f180903d948)
This is the "type" of the recording, but sadly we already have "type"
with a slightly different meaning (i.e. the SSRC in hex for single
streams), so we name this the recording "kind".
Change-Id: I2f7c36e42f7eb075a4324e9659d2845ab40b4f07