Skip to content

Commit

Permalink
Merge pull request #5 from NATTools/priority
Browse files Browse the repository at this point in the history
Priority support
  • Loading branch information
trondand committed Aug 9, 2016
2 parents 50da1f7 + b6f1a9a commit 11f2dac
Show file tree
Hide file tree
Showing 10 changed files with 1,329 additions and 601 deletions.
23 changes: 22 additions & 1 deletion include/icelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,17 @@ typedef ICELIB_Result (* ICELIB_connectivityChecksComplete)(void* pUserData,
isControlling,
bool iceFailed);


/* */
/* ----- Callback to signal that a canidate pair has been nominated */
/* */
typedef ICELIB_Result (* ICELIB_nominated)(void* pUserData,
uint32_t userValue1,
uint32_t userValue2,
uint32_t componentId,
uint64_t priority,
int32_t proto,
const struct sockaddr* local,
const struct sockaddr* remote);

/* */
/* ----- Callback used to generate keepalives */
Expand Down Expand Up @@ -153,6 +163,12 @@ typedef struct {
ICELIB_INSTANCE_* pInstance;
} ICELIB_CALLBACK_COMPLETE;

typedef struct {
ICELIB_nominated pICELIB_nominated;
void* pNominatedUserData;
ICELIB_INSTANCE_* pInstance;
} ICELIB_CALLBACK_NOMINATED;

typedef struct {
ICELIB_outgoingBindingRequest pICELIB_sendBindingRequest;
void* pBindingRequestUserData;
Expand Down Expand Up @@ -198,6 +214,7 @@ typedef struct {
ICELIB_CALLBACK_RESPONSE callbackResponse;
ICELIB_CALLBACK_KEEPALIVE callbackKeepAlive;
ICELIB_CALLBACK_COMPLETE callbackComplete;
ICELIB_CALLBACK_NOMINATED callbackNominated;
ICELIB_CALLBACK_CANCEL_REQUEST callbackCancelRequest;
ICELIB_CALLBACK_PASSWORD_UPDATE callbackPasswordUpdate;
ICELIB_CALLBACK_LOG callbackLog;
Expand Down Expand Up @@ -306,6 +323,10 @@ ICELIB_setCallbackConnecitivityChecksComplete(
void* userData);

void
ICELIB_setCallbackNominated(ICELIB_INSTANCE* pInstance,
ICELIB_nominated pICELIB_nominated,
void* userData);
void
ICELIB_setCallbackOutgoingBindingRequest(
ICELIB_INSTANCE* pInstance,
ICELIB_outgoingBindingRequest pICELIB_sendBindingRequest,
Expand Down
11 changes: 0 additions & 11 deletions include/icelib_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@
#define ICELIB_REFLEX_TYPEREF 100
#define ICELIB_RELAY_TYPEREF 0



#define ICELIB_COMPLETE_WEIGHT 150
/*Warning. No equal values are allowed. (Used to ensure that RTP and RTCP has
* the same path)*/
#define ICELIB_HOST_WEIGHT 50
#define ICELIB_SRFLX_WEIGHT 25
#define ICELIB_PRFLX_WEIGHT 20
#define ICELIB_RELAY_WEIGHT 10
#define ICELIB_TIME_MULTIPLIER_INCREASE_MS 250

#define ICELIB_RTP_COMPONENT_ID 1
#define ICELIB_RTCP_COMPONENT_ID 2

Expand Down
2 changes: 0 additions & 2 deletions include/icelibtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ typedef struct {
typedef struct {
ICELIB_LIST_VL pairs;
uint32_t nextPairId;
uint32_t readyToNominateWeighting;
uint32_t nominatedPathScore;
} ICELIB_VALIDLIST;


Expand Down
Loading

0 comments on commit 11f2dac

Please sign in to comment.