diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-23 10:21:06 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-11-02 16:12:26 +0100 |
commit | be188c31f2528cdabfffd07ef1ec87ff6c23330a (patch) | |
tree | 9a9dded7fd8348ff2abb71ed046963a1f9a811b7 /4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c | |
parent | cabdc828ee3eb35d780f2145fdb37081a5f6d71d (diff) |
Use ctl defines to call afb functions
Use controller 'afb-defintions.h' defines to call application
framework functions.
Change-Id: If9599b0397a593440ce2e08f039dc279c63f7428
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c index 254c57b..2ffee91 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c @@ -94,13 +94,14 @@ int HalCtlsHandleMixerData(AFB_ApiT apiHandle, struct CtlHalMixerDataT *currentM currentMixerDataT->data[idx].verb = strdup(¤tDataVerbName[verbStart]); - if(afb_dynapi_add_verb(apiHandle, - currentMixerDataT->data[idx].verb, - "Stream action transferred to mixer", - HalCtlsActionOnCall, - (void *) ¤tMixerDataT->data[idx], - NULL, - 0)) { + if(AFB_ApiAddVerb(apiHandle, + currentMixerDataT->data[idx].verb, + "Stream action transferred to mixer", + HalCtlsActionOnCall, + (void *) ¤tMixerDataT->data[idx], + NULL, + 0, + 0)) { AFB_ApiError(apiHandle, "Error while creating verbs for stream : '%s'", currentMixerDataT->data[idx].verb); @@ -117,26 +118,28 @@ int HalCtlsHandleMixerData(AFB_ApiT apiHandle, struct CtlHalMixerDataT *currentM } if(dataType == MIXER_DATA_PLAYBACKS) { - if(afb_dynapi_add_verb(apiHandle, - HAL_PLAYBACK_VERB, - "Playback action transferred to mixer", - HalCtlsActionOnCall, - (void *) currentMixerDataT->data, - NULL, - 0)) { + if(AFB_ApiAddVerb(apiHandle, + HAL_PLAYBACK_VERB, + "Playback action transferred to mixer", + HalCtlsActionOnCall, + (void *) currentMixerDataT->data, + NULL, + 0, + 0)) { AFB_ApiError(apiHandle, "Error while creating verb for playbacks : '%s'", HAL_PLAYBACK_VERB); err += (int) MIXER_ERROR_PLAYBACK_VERB_NOT_CREATED; } } if(dataType == MIXER_DATA_CAPTURES) { - if(afb_dynapi_add_verb(apiHandle, - HAL_CAPTURE_VERB, - "Capture action transferred to mixer", - HalCtlsActionOnCall, - (void *) currentMixerDataT->data, - NULL, - 0)) { + if(AFB_ApiAddVerb(apiHandle, + HAL_CAPTURE_VERB, + "Capture action transferred to mixer", + HalCtlsActionOnCall, + (void *) currentMixerDataT->data, + NULL, + 0, + 0)) { AFB_ApiError(apiHandle, "Error while creating verb for captures : '%s'", HAL_CAPTURE_VERB); err += (int) MIXER_ERROR_CAPTURE_VERB_NOT_CREATED; } @@ -193,7 +196,7 @@ int HalCtlsAttachToMixer(AFB_ApiT apiHandle) return -1; } - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) { AFB_ApiError(apiHandle, "Can't get current hal controller config"); return -2; |