Lines Matching refs:pContext

59     EffectContext* pContext;
65 pContext = new EffectContext;
66 pContext->sessionId = sessionId;
67 pContext->ioId = ioId;
68 pContext->uuid = *uuid;
69 pContext->common_itfe = &gEffectInterface;
73 pContext->eHandle[SUB_FX_HOST] = pContext->eHandle[SUB_FX_OFFLOAD] = NULL;
77 pContext->desc = new effect_descriptor_t[SUB_FX_COUNT];
84 delete pContext->desc;
93 pContext->desc[SUB_FX_OFFLOAD] = desc[0];
94 pContext->desc[SUB_FX_HOST] = desc[1];
98 pContext->desc[SUB_FX_HOST] = desc[0];
99 pContext->desc[SUB_FX_OFFLOAD] = desc[1];
103 effect_uuid_t uuid_print = pContext->desc[SUB_FX_HOST].uuid;
116 pContext->replySize = PROXY_REPLY_SIZE_DEFAULT;
117 pContext->replyData = (char *)malloc(PROXY_REPLY_SIZE_DEFAULT);
119 *pHandle = (effect_handle_t)pContext;
125 EffectContext * pContext = (EffectContext *)handle;
126 if (pContext == NULL) {
131 delete pContext->desc;
132 free(pContext->replyData);
134 if (pContext->eHandle[SUB_FX_HOST])
135 EffectRelease(pContext->eHandle[SUB_FX_HOST]);
136 if (pContext->eHandle[SUB_FX_OFFLOAD])
137 EffectRelease(pContext->eHandle[SUB_FX_OFFLOAD]);
138 delete pContext;
139 pContext = NULL;
161 EffectContext *pContext = (EffectContext *) self;
163 if (pContext != NULL) {
164 int index = pContext->index;
167 ret = (*pContext->eHandle[index])->process(pContext->eHandle[index],
182 EffectContext *pContext = (EffectContext *) self;
184 if (pContext == NULL) {
188 if (pContext->eHandle[SUB_FX_HOST] == NULL) {
190 status = EffectCreate(&pContext->desc[SUB_FX_HOST].uuid,
191 pContext->sessionId, pContext->ioId,
192 &(pContext->eHandle[SUB_FX_HOST]));
193 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_HOST] == NULL)) {
198 if (pContext->eHandle[SUB_FX_OFFLOAD] == NULL) {
200 status = EffectCreate(&pContext->desc[SUB_FX_OFFLOAD].uuid,
201 pContext->sessionId, pContext->ioId,
202 &(pContext->eHandle[SUB_FX_OFFLOAD]));
203 if (status != NO_ERROR || (pContext->eHandle[SUB_FX_OFFLOAD] == NULL)) {
208 pContext->index = SUB_FX_HOST;
223 pContext->index = offloadParam->isOffload ? SUB_FX_OFFLOAD : SUB_FX_HOST;
226 if (pContext->eHandle[pContext->index] == NULL) {
231 pContext->ioId = offloadParam->ioHandle;
232 ALOGV("Effect_command()CMD_OFFLOAD index:%d io %d", pContext->index, pContext->ioId);
236 if (pContext->eHandle[SUB_FX_OFFLOAD])
237 status = (*pContext->eHandle[SUB_FX_OFFLOAD])->command(
238 pContext->eHandle[SUB_FX_OFFLOAD], cmdCode, cmdSize,
243 int index = pContext->index;
258 tmpSize = pContext->replySize;
262 if (tmpSize > pContext->replySize) {
264 pContext->replyData = (char *)realloc(pContext->replyData, tmpSize);
265 pContext->replySize = tmpSize;
278 // other sub effect is lost in pContext->replyData
280 if (pContext->eHandle[i] == NULL) {
290 subReplyData[i] = pReplyData == NULL ? NULL : pContext->replyData;
292 *subStatus[i] = (*pContext->eHandle[i])->command(
293 pContext->eHandle[i], cmdCode, cmdSize,
305 EffectContext * pContext = (EffectContext *) self;
309 if (pContext == NULL || pDescriptor == NULL) {
313 if (pContext->desc == NULL) {
317 desc = &pContext->desc[SUB_FX_HOST];
319 pDescriptor->uuid = pContext->uuid; // Replace the uuid with the Proxy UUID
321 if (pContext->eHandle[SUB_FX_OFFLOAD] != NULL)