You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
980 B
43 lines
980 B
7 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2019. All rights reserved.
|
||
|
* Description: adec event
|
||
|
* Author: audio
|
||
|
* Create: 2019-05-30
|
||
|
*/
|
||
|
|
||
|
#ifndef __ADEC_EVENT_H__
|
||
|
#define __ADEC_EVENT_H__
|
||
|
|
||
|
#include <pthread.h>
|
||
|
|
||
|
#include "mpi_adec_ext.h"
|
||
|
#include "mpi_adec_fifo.h"
|
||
|
|
||
|
typedef struct {
|
||
|
td_u8 *buffer;
|
||
|
td_u32 read;
|
||
|
td_u32 write;
|
||
|
td_u32 size;
|
||
|
|
||
|
kfifo fifo;
|
||
|
} adec_event_fifo;
|
||
|
|
||
|
typedef struct {
|
||
|
td_handle user_handle;
|
||
|
ext_mpi_adec_event_fn fun;
|
||
|
|
||
|
td_bool alive;
|
||
|
pthread_t thread;
|
||
|
pthread_mutex_t mutex;
|
||
|
|
||
|
adec_event_fifo event_fifo;
|
||
|
} adec_event;
|
||
|
|
||
|
td_s32 adec_event_init(adec_event *event);
|
||
|
td_s32 adec_event_deinit(adec_event *event);
|
||
|
td_s32 adec_event_register_call_back(adec_event *event, td_handle user_handle, ext_mpi_adec_event_fn fun);
|
||
|
td_void adec_event_report(adec_event *event, ext_adec_event_type event_type, td_u8 *param, td_u32 param_size);
|
||
|
|
||
|
#endif /* __ADEC_EVENT_H__ */
|
||
|
|