Commit eccfe793 authored by François Grisez's avatar François Grisez

Add extern "C" declaration to msiframerequestslimiter.h

parent 43d32a44
......@@ -22,6 +22,10 @@
#include <mediastreamer2/msticker.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _MSIFrameRequestsLimiterCtx {
const MSTicker *ticker;
bool_t iframe_required;
......@@ -37,4 +41,8 @@ MS2_PUBLIC bool_t ms_iframe_requests_limiter_iframe_sending_authorized(const MSI
MS2_PUBLIC void ms_iframe_requests_limiter_notify_iframe_sent(MSIFrameRequestsLimiterCtx *obj);
#ifdef __cplusplus
}
#endif
#endif
......@@ -12,7 +12,7 @@ void ms_iframe_requests_limiter_require_iframe(MSIFrameRequestsLimiterCtx *obj)
}
bool_t ms_iframe_requests_limiter_iframe_sending_authorized(const MSIFrameRequestsLimiterCtx *obj) {
return obj->ticker->time - obj->last_sent_iframe_time > obj->min_iframe_interval;
return obj->iframe_required && (obj->ticker->time - obj->last_sent_iframe_time) > obj->min_iframe_interval;
}
void ms_iframe_requests_limiter_notify_iframe_sent(MSIFrameRequestsLimiterCtx *obj) {
......
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