Skip to content

Commit 8d6d918

Browse files
committed
Merge branch 'bugfix/fix_build_and_method_wrong' into 'main'
Fix build issue and method caps wrong logic See merge request adf/multimedia/esp-gmf!42
2 parents 3c016aa + fee0e98 commit 8d6d918

File tree

13 files changed

+70
-70
lines changed

13 files changed

+70
-70
lines changed

gmf_core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(COMPONENT_ADD_INCLUDEDIRS "oal/include" "include" "data_bus/include" "helpers/include")
22
set(COMPONENT_SRCDIRS src oal data_bus helpers)
33

4-
set(COMPONENT_REQUIRES)
4+
set(COMPONENT_REQUIRES esp_timer)
55

66
register_component()

gmf_elements/gmf_audio/esp_gmf_alc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,21 +230,21 @@ static esp_gmf_err_t esp_gmf_alc_destroy(esp_gmf_audio_element_handle_t self)
230230

231231
static esp_gmf_err_t _load_alc_caps_func(esp_gmf_element_handle_t handle)
232232
{
233-
esp_gmf_cap_t **caps = NULL;
233+
esp_gmf_cap_t *caps = NULL;
234234
esp_gmf_cap_t dec_caps = {0};
235235
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_ALC;
236236
dec_caps.attr_fun = NULL;
237-
int ret = esp_gmf_cap_append(caps, &dec_caps);
237+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
238238
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
239239

240240
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
241-
el->caps = *caps;
241+
el->caps = caps;
242242
return ESP_GMF_ERR_OK;
243243
}
244244

245245
static esp_gmf_err_t _load_alc_methods_func(esp_gmf_element_handle_t handle)
246246
{
247-
esp_gmf_method_t **method = NULL;
247+
esp_gmf_method_t *method = NULL;
248248
esp_gmf_args_desc_t *set_args = NULL;
249249
esp_gmf_args_desc_t *get_args = NULL;
250250
esp_gmf_err_t ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_ALC_SET_GAIN_ARG_IDX,
@@ -253,16 +253,16 @@ static esp_gmf_err_t _load_alc_methods_func(esp_gmf_element_handle_t handle)
253253
ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_ALC_SET_GAIN_ARG_GAIN, ESP_GMF_ARGS_TYPE_INT8,
254254
sizeof(int8_t), sizeof(uint8_t));
255255
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append gain argument");
256-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_ALC_SET_GAIN, __alc_set_gain, set_args);
256+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_ALC_SET_GAIN, __alc_set_gain, set_args);
257257
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_ALC_SET_GAIN);
258258

259259
ret = esp_gmf_args_desc_copy(set_args, &get_args);
260260
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to copy argument");
261-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_ALC_GET_GAIN, __alc_get_gain, get_args);
261+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_ALC_GET_GAIN, __alc_get_gain, get_args);
262262
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_ALC_GET_GAIN);
263263

264264
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
265-
el->method = *method;
265+
el->method = method;
266266
return ESP_GMF_ERR_OK;
267267
}
268268

gmf_elements/gmf_audio/esp_gmf_audio_dec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ static esp_gmf_err_t esp_gmf_audio_dec_destroy(esp_gmf_audio_element_handle_t se
242242

243243
static esp_gmf_err_t _load_dec_caps_func(esp_gmf_element_handle_t handle)
244244
{
245-
esp_gmf_cap_t **caps = NULL;
245+
esp_gmf_cap_t *caps = NULL;
246246
esp_gmf_cap_t dec_caps = {0};
247247
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_DECODER;
248248
dec_caps.attr_fun = _dec_caps_iter_fun;
249-
int ret = esp_gmf_cap_append(caps, &dec_caps);
249+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
250250
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
251251

252252
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
253-
el->caps = *caps;
253+
el->caps = caps;
254254
return ESP_GMF_ERR_OK;
255255
}
256256

gmf_elements/gmf_audio/esp_gmf_audio_enc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ static esp_gmf_err_t esp_gmf_audio_enc_destroy(esp_gmf_audio_element_handle_t se
288288

289289
static esp_gmf_err_t _load_enc_caps_func(esp_gmf_element_handle_t handle)
290290
{
291-
esp_gmf_cap_t **caps = NULL;
291+
esp_gmf_cap_t *caps = NULL;
292292
esp_gmf_cap_t dec_caps = {0};
293293
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_ENCODER;
294294
dec_caps.attr_fun = NULL;
295-
int ret = esp_gmf_cap_append(caps, &dec_caps);
295+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
296296
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
297297

298298
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
299-
el->caps = *caps;
299+
el->caps = caps;
300300
return ESP_GMF_ERR_OK;
301301
}
302302

gmf_elements/gmf_audio/esp_gmf_bit_cvt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,30 +200,30 @@ static esp_gmf_err_t esp_gmf_bit_cvt_destroy(esp_gmf_audio_element_handle_t self
200200

201201
static esp_gmf_err_t _load_bit_cvt_caps_func(esp_gmf_element_handle_t handle)
202202
{
203-
esp_gmf_cap_t **caps = NULL;
203+
esp_gmf_cap_t *caps = NULL;
204204
esp_gmf_cap_t dec_caps = {0};
205205
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_BIT_CONVERT;
206206
dec_caps.attr_fun = NULL;
207-
int ret = esp_gmf_cap_append(caps, &dec_caps);
207+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
208208
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
209209

210210
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
211-
el->caps = *caps;
211+
el->caps = caps;
212212
return ESP_GMF_ERR_OK;
213213
}
214214

215215
static esp_gmf_err_t _load_bit_cvt_methods_func(esp_gmf_element_handle_t handle)
216216
{
217-
esp_gmf_method_t **method = NULL;
217+
esp_gmf_method_t *method = NULL;
218218
esp_gmf_args_desc_t *set_args = NULL;
219219
esp_gmf_err_t ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_BIT_CVT_SET_DEST_BITS_ARG_BITS,
220220
ESP_GMF_ARGS_TYPE_UINT8, sizeof(uint8_t), 0);
221221
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append argument");
222-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_BIT_CVT_SET_DEST_BITS, __set_dest_bits, set_args);
222+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_BIT_CVT_SET_DEST_BITS, __set_dest_bits, set_args);
223223
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_BIT_CVT_SET_DEST_BITS);
224224

225225
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
226-
el->method = *method;
226+
el->method = method;
227227
return ESP_GMF_ERR_OK;
228228
}
229229

gmf_elements/gmf_audio/esp_gmf_ch_cvt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,29 +213,29 @@ static esp_gmf_err_t esp_gmf_ch_cvt_destroy(esp_gmf_audio_element_handle_t self)
213213

214214
static esp_gmf_err_t _load_channel_cvt_caps_func(esp_gmf_element_handle_t handle)
215215
{
216-
esp_gmf_cap_t **caps = NULL;
216+
esp_gmf_cap_t *caps = NULL;
217217
esp_gmf_cap_t dec_caps = {0};
218218
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_CHANNEL_CONVERT;
219219
dec_caps.attr_fun = NULL;
220-
int ret = esp_gmf_cap_append(caps, &dec_caps);
220+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
221221
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
222222

223223
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
224-
el->caps = *caps;
224+
el->caps = caps;
225225
return ESP_GMF_ERR_OK;
226226
}
227227

228228
static esp_gmf_err_t _load_channel_cvt_methods_func(esp_gmf_element_handle_t handle)
229229
{
230-
esp_gmf_method_t **method = NULL;
230+
esp_gmf_method_t *method = NULL;
231231
esp_gmf_args_desc_t *set_args = NULL;
232232
esp_gmf_err_t ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_CH_CVT_SET_DEST_CH_ARG_CH, ESP_GMF_ARGS_TYPE_UINT8, sizeof(uint8_t), 0);
233233
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append argument");
234-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_CH_CVT_SET_DEST_CH, __set_dest_ch, set_args);
234+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_CH_CVT_SET_DEST_CH, __set_dest_ch, set_args);
235235
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_CH_CVT_SET_DEST_CH);
236236

237237
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
238-
el->method = *method;
238+
el->method = method;
239239
return ESP_GMF_ERR_OK;
240240
}
241241

gmf_elements/gmf_audio/esp_gmf_deinterleave.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,15 @@ static esp_gmf_err_t esp_gmf_deinterleave_destroy(esp_gmf_audio_element_handle_t
210210

211211
static esp_gmf_err_t _load_deinterleave_caps_func(esp_gmf_element_handle_t handle)
212212
{
213-
esp_gmf_cap_t **caps = NULL;
213+
esp_gmf_cap_t *caps = NULL;
214214
esp_gmf_cap_t dec_caps = {0};
215215
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_DEINTERLEAVE;
216216
dec_caps.attr_fun = NULL;
217-
int ret = esp_gmf_cap_append(caps, &dec_caps);
217+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
218218
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
219219

220220
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
221-
el->caps = *caps;
221+
el->caps = caps;
222222
return ESP_GMF_ERR_OK;
223223
}
224224

gmf_elements/gmf_audio/esp_gmf_eq.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,21 +304,21 @@ static esp_gmf_err_t esp_gmf_eq_destroy(esp_gmf_audio_element_handle_t self)
304304

305305
static esp_gmf_err_t _load_eq_caps_func(esp_gmf_element_handle_t handle)
306306
{
307-
esp_gmf_cap_t **caps = NULL;
307+
esp_gmf_cap_t *caps = NULL;
308308
esp_gmf_cap_t dec_caps = {0};
309309
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_EQUALIZER;
310310
dec_caps.attr_fun = NULL;
311-
int ret = esp_gmf_cap_append(caps, &dec_caps);
311+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
312312
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
313313

314314
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
315-
el->caps = *caps;
315+
el->caps = caps;
316316
return ESP_GMF_ERR_OK;
317317
}
318318

319319
static esp_gmf_err_t _load_eq_methods_func(esp_gmf_element_handle_t handle)
320320
{
321-
esp_gmf_method_t **method = NULL;
321+
esp_gmf_method_t *method = NULL;
322322
esp_gmf_args_desc_t *set_args = NULL;
323323
esp_gmf_args_desc_t *get_args = NULL;
324324
esp_gmf_args_desc_t *pointer_args = NULL;
@@ -339,12 +339,12 @@ static esp_gmf_err_t _load_eq_methods_func(esp_gmf_element_handle_t handle)
339339
ret = esp_gmf_args_desc_append_array(&set_args, ESP_GMF_METHOD_EQ_SET_PARA_ARG_PARA, pointer_args,
340340
sizeof(esp_ae_eq_filter_para_t), sizeof(uint8_t));
341341
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append PARA argument");
342-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_EQ_SET_PARA, __eq_set_para, set_args);
342+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_EQ_SET_PARA, __eq_set_para, set_args);
343343
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_EQ_SET_PARA);
344344

345345
ret = esp_gmf_args_desc_copy(set_args, &get_args);
346346
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to copy PARA argument");
347-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_EQ_GET_PARA, __eq_get_para, get_args);
347+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_EQ_GET_PARA, __eq_get_para, get_args);
348348
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_EQ_GET_PARA);
349349

350350
set_args = NULL;
@@ -354,11 +354,11 @@ static esp_gmf_err_t _load_eq_methods_func(esp_gmf_element_handle_t handle)
354354
ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_EQ_ENABLE_FILTER_ARG_PARA, ESP_GMF_ARGS_TYPE_UINT8,
355355
sizeof(uint8_t), sizeof(uint8_t));
356356
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append PARA argument");
357-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_EQ_ENABLE_FILTER, __eq_enable_filter, set_args);
357+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_EQ_ENABLE_FILTER, __eq_enable_filter, set_args);
358358
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_EQ_ENABLE_FILTER);
359359

360360
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
361-
el->method = *method;
361+
el->method = method;
362362
return ESP_GMF_ERR_OK;
363363
}
364364

gmf_elements/gmf_audio/esp_gmf_fade.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,38 +223,38 @@ static esp_gmf_err_t esp_gmf_fade_destroy(esp_gmf_audio_element_handle_t self)
223223

224224
static esp_gmf_err_t _load_fade_caps_func(esp_gmf_element_handle_t handle)
225225
{
226-
esp_gmf_cap_t **caps = NULL;
226+
esp_gmf_cap_t *caps = NULL;
227227
esp_gmf_cap_t dec_caps = {0};
228228
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_FADE;
229229
dec_caps.attr_fun = NULL;
230-
int ret = esp_gmf_cap_append(caps, &dec_caps);
230+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
231231
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
232232

233233
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
234-
el->caps = *caps;
234+
el->caps = caps;
235235
return ESP_GMF_ERR_OK;
236236
}
237237

238238
static esp_gmf_err_t _load_fade_methods_func(esp_gmf_element_handle_t handle)
239239
{
240-
esp_gmf_method_t **method = NULL;
240+
esp_gmf_method_t *method = NULL;
241241
esp_gmf_args_desc_t *set_args = NULL;
242242
esp_gmf_args_desc_t *get_args = NULL;
243243
esp_gmf_err_t ret = esp_gmf_args_desc_append(&set_args, ESP_GMF_METHOD_FADE_SET_MODE_ARG_MODE, ESP_GMF_ARGS_TYPE_INT32, sizeof(int32_t), 0);
244244
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to append MODE argument");
245-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_FADE_SET_MODE, __fade_set_mode, set_args);
245+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_FADE_SET_MODE, __fade_set_mode, set_args);
246246
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_FADE_SET_MODE);
247247

248248
ret = esp_gmf_args_desc_copy(set_args, &get_args);
249249
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to copy argument");
250-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_FADE_GET_MODE, __fade_get_mode, get_args);
250+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_FADE_GET_MODE, __fade_get_mode, get_args);
251251
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_FADE_GET_MODE);
252252

253-
ret = esp_gmf_method_append(method, ESP_GMF_METHOD_FADE_RESET, __fade_reset, NULL);
253+
ret = esp_gmf_method_append(&method, ESP_GMF_METHOD_FADE_RESET, __fade_reset, NULL);
254254
ESP_GMF_RET_ON_ERROR(TAG, ret, {return ret;}, "Failed to register %s method", ESP_GMF_METHOD_FADE_RESET);
255255

256256
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
257-
el->method = *method;
257+
el->method = method;
258258
return ESP_GMF_ERR_OK;
259259
}
260260

gmf_elements/gmf_audio/esp_gmf_interleave.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ static esp_gmf_err_t esp_gmf_interleave_destroy(esp_gmf_audio_element_handle_t s
209209

210210
static esp_gmf_err_t _load_interleave_caps_func(esp_gmf_element_handle_t handle)
211211
{
212-
esp_gmf_cap_t **caps = NULL;
212+
esp_gmf_cap_t *caps = NULL;
213213
esp_gmf_cap_t dec_caps = {0};
214214
dec_caps.cap_eightcc = ESP_GMF_CAPS_AUDIO_INTERLEAVE;
215215
dec_caps.attr_fun = NULL;
216-
int ret = esp_gmf_cap_append(caps, &dec_caps);
216+
int ret = esp_gmf_cap_append(&caps, &dec_caps);
217217
ESP_GMF_RET_ON_NOT_OK(TAG, ret, {return ret;}, "Failed to create capability");
218218

219219
esp_gmf_element_t *el = (esp_gmf_element_t *)handle;
220-
el->caps = *caps;
220+
el->caps = caps;
221221
return ESP_GMF_ERR_OK;
222222
}
223223

0 commit comments

Comments
 (0)