Commit 1a05114e authored by Ghislain MARY's avatar Ghislain MARY

Use #define instead of enum.

parent a191c392
......@@ -2706,7 +2706,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp);
call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp = evd->packet;
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsReceivedRTCPUpdate;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
......@@ -2716,7 +2716,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp);
call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp = evd->packet;
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsSentRTCPUpdate;
call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]);
......@@ -2751,7 +2751,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp);
call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp = evd->packet;
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsReceivedRTCPUpdate;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
......@@ -2761,7 +2761,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp);
call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp = evd->packet;
evd->packet = NULL;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsSentRTCPUpdate;
call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE;
update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream);
if (lc->vtable.call_stats_updated)
lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]);
......
......@@ -577,19 +577,10 @@ enum _LinphoneUpnpState{
**/
typedef enum _LinphoneUpnpState LinphoneUpnpState;
/**
* Enum describing what has been updated in a LinphoneCallStats object.
**/
enum _LinphoneCallStatsRTCPUpdate {
LinphoneCallStatsReceivedRTCPUpdate, /**< received_rtcp field of LinphoneCallStats object has been updated */
LinphoneCallStatsSentRTCPUpdate /**< sent_rtcp field of LinphoneCallStats object has been updated */
};
/**
* Enum describing what has been updated in a LinphoneCallStats object.
**/
#define LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE (1 << 0) /**< received_rtcp field of LinphoneCallStats object has been updated */
#define LINPHONE_CALL_STATS_SENT_RTCP_UPDATE (1 << 1) /**< sent_rtcp field of LinphoneCallStats object has been updated */
typedef enum _LinphoneCallStatsRTCPUpdate LinphoneCallStatsRTCPUpdate;
/**
* The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams.
......@@ -621,7 +612,7 @@ struct _LinphoneCallStats {
float upload_bandwidth; /**<Download bandwidth measurement of sent stream, expressed in kbit/s, including IP/UDP/RTP headers*/
float local_late_rate; /**<percentage of packet received too late over last second*/
float local_loss_rate; /**<percentage of lost packet over last second*/
LinphoneCallStatsRTCPUpdate updated; /**< Tell which RTCP packet has been updated (received_rtcp or sent_rtcp) */
int updated; /**< Tell which RTCP packet has been updated (received_rtcp or sent_rtcp). Can be either LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE or LINPHONE_CALL_STATS_SENT_RTCP_UPDATE */
};
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment