Revert "res_rtp_asterisk: Asterisk Media Experience Score (MES)"

This reverts commit d454801c2d.

Reason for revert: Issue when transcoding to/from g722

Change-Id: I09f49e171b1661548657a9ba7a978c29d0b5be86
This commit is contained in:
George Joseph
2023-01-09 07:21:22 -06:00
committed by Friendly Automation
parent d33bd6d67a
commit 62ca063fca
8 changed files with 102 additions and 932 deletions

View File

@@ -174,8 +174,6 @@ enum ast_rtp_instance_stat_field {
AST_RTP_INSTANCE_STAT_FIELD_QUALITY_LOSS,
/*! Retrieve quality information about round trip time */
AST_RTP_INSTANCE_STAT_FIELD_QUALITY_RTT,
/*! Retrieve quality information about Media Experience Score */
AST_RTP_INSTANCE_STAT_FIELD_QUALITY_MES,
};
/*! Statistics that can be retrieved from an RTP instance */
@@ -252,29 +250,6 @@ enum ast_rtp_instance_stat {
AST_RTP_INSTANCE_STAT_TXOCTETCOUNT,
/*! Retrieve number of octets received */
AST_RTP_INSTANCE_STAT_RXOCTETCOUNT,
/*! Retrieve ALL statistics relating to Media Experience Score */
AST_RTP_INSTANCE_STAT_COMBINED_MES,
/*! Retrieve MES on transmitted packets */
AST_RTP_INSTANCE_STAT_TXMES,
/*! Retrieve MES on received packets */
AST_RTP_INSTANCE_STAT_RXMES,
/*! Retrieve maximum MES on remote side */
AST_RTP_INSTANCE_STAT_REMOTE_MAXMES,
/*! Retrieve minimum MES on remote side */
AST_RTP_INSTANCE_STAT_REMOTE_MINMES,
/*! Retrieve average MES on remote side */
AST_RTP_INSTANCE_STAT_REMOTE_NORMDEVMES,
/*! Retrieve standard deviation MES on remote side */
AST_RTP_INSTANCE_STAT_REMOTE_STDEVMES,
/*! Retrieve maximum MES on local side */
AST_RTP_INSTANCE_STAT_LOCAL_MAXMES,
/*! Retrieve minimum MES on local side */
AST_RTP_INSTANCE_STAT_LOCAL_MINMES,
/*! Retrieve average MES on local side */
AST_RTP_INSTANCE_STAT_LOCAL_NORMDEVMES,
/*! Retrieve standard deviation MES on local side */
AST_RTP_INSTANCE_STAT_LOCAL_STDEVMES,
};
enum ast_rtp_instance_rtcp {
@@ -453,27 +428,6 @@ struct ast_rtp_instance_stats {
unsigned int txoctetcount;
/*! Number of octets received */
unsigned int rxoctetcount;
/*! Media Experience Score on transmitted packets */
double txmes;
/*! Media Experience Score on received packets */
double rxmes;
/*! Maximum MES on remote side */
double remote_maxmes;
/*! Minimum MES on remote side */
double remote_minmes;
/*! Average MES on remote side */
double remote_normdevmes;
/*! Standard deviation MES on remote side */
double remote_stdevmes;
/*! Maximum MES on local side */
double local_maxmes;
/*! Minimum MES on local side */
double local_minmes;
/*! Average MES on local side */
double local_normdevmes;
/*! Standard deviation MES on local side */
double local_stdevmes;
};
#define AST_RTP_STAT_SET(current_stat, combined, placement, value) \
@@ -2906,10 +2860,6 @@ uintmax_t ast_debug_category_ice_id(void);
#define ast_debug_rtp(sublevel, ...) \
ast_debug_category(sublevel, AST_DEBUG_CATEGORY_RTP, __VA_ARGS__)
/* Allow logging of RTP? */
#define ast_debug_rtp_is_allowed \
ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTP)
/* Allow logging of RTP packets? */
#define ast_debug_rtp_packet_is_allowed \
ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTP_PACKET)
@@ -2923,10 +2873,6 @@ uintmax_t ast_debug_category_ice_id(void);
#define ast_debug_rtcp(sublevel, ...) \
ast_debug_category(sublevel, AST_DEBUG_CATEGORY_RTCP, __VA_ARGS__)
/* Allow logging of RTCP? */
#define ast_debug_rtcp_is_allowed \
ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTCP)
/* Allow logging of RTCP packets? */
#define ast_debug_rtcp_packet_is_allowed \
ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTCP_PACKET)

View File

@@ -33,8 +33,6 @@
#include <unistd.h>
#endif
#include <math.h>
#include "asterisk/inline_api.h"
/* A time_t can be represented as an unsigned long long (or uint64_t).
@@ -234,41 +232,6 @@ struct timeval ast_tv(ast_time_t sec, ast_suseconds_t usec),
}
)
/*!
* \brief Returns a timeval structure corresponding to the
* number of seconds in the double _td.
*
* \param _td The number of seconds.
* \returns A timeval structure containing the number of seconds.
*
* This is the inverse of ast_tv2double().
*/
AST_INLINE_API(
struct timeval ast_double2tv(double _td),
{
struct timeval t;
t.tv_sec = (typeof(t.tv_sec))floor(_td);
t.tv_usec = (typeof(t.tv_usec))(_td - t.tv_sec) / 1000000.0;
return t;
}
)
/*!
* \brief Returns a double corresponding to the number of seconds
* in the timeval _tv.
*
* \param _tv A pointer to a timeval structure.
* \returns A double containing the number of seconds.
*
* This is the inverse of ast_double2tv().
*/
AST_INLINE_API(
double ast_tv2double(const struct timeval *tv),
{
return tv->tv_sec + ((double)tv->tv_usec) / 1000000.0;
}
)
/*!
* \brief Returns a timeval corresponding to the duration of n samples at rate r.
* Useful to convert samples to timevals, or even milliseconds to timevals
@@ -281,57 +244,6 @@ struct timeval ast_samp2tv(unsigned int _nsamp, unsigned int _rate),
}
)
/*!
* \brief Returns the number of samples at rate _rate in the
* duration specified by _tv.
*
* \param _tv A pointer to a timeval structure.
* \param _rate The sample rate in Hz.
* \returns A time_t containing the number of samples.
*
* This is the inverse of ast_samp2tv().
*/
AST_INLINE_API(
time_t ast_tv2samp(const struct timeval *_tv, int _rate),
{
return (time_t)(ast_tv2double(_tv) * (double)_rate);
}
)
/*!
* \brief Returns the duration in seconds of _nsamp samples
* at rate _rate.
*
* \param _nsamp The number of samples
* \param _rate The sample rate in Hz.
* \returns A double containing the number of seconds.
*
* This is the inverse of ast_sec2samp().
*/
AST_INLINE_API(
double ast_samp2sec(int _nsamp, unsigned int _rate),
{
return ((double)_nsamp) / ((double)_rate);
}
)
/*!
* \brief Returns the number of samples at _rate in the duration
* in _seconds.
*
* \param _seconds The time interval in seconds.
* \param _rate The sample rate in Hz.
* \returns The number of samples.
*
* This is the inverse of ast_samp2sec().
*/
AST_INLINE_API(
unsigned int ast_sec2samp(double _seconds, int _rate),
{
return (unsigned int)(_seconds * _rate);
}
)
/*!
* \brief Time units enumeration.
*/