mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 18:38:55 +00:00
v1.1.1
This commit is contained in:
33
packages/artinchip/mpp/base/include/mpp_ringbuf.h
Normal file
33
packages/artinchip/mpp/base/include/mpp_ringbuf.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Author: <che.jiang@artinchip.com>
|
||||
* Desc: mpp ringbuf interface
|
||||
*/
|
||||
|
||||
#ifndef MPP_RINGBUF_H
|
||||
#define MPP_RINGBUF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef void *mpp_ringbuf_t;
|
||||
|
||||
mpp_ringbuf_t mpp_ringbuffer_create(int length);
|
||||
void mpp_ringbuffer_destroy(mpp_ringbuf_t rb);
|
||||
void mpp_ringbuffer_reset(mpp_ringbuf_t rb);
|
||||
int mpp_ringbuffer_put(mpp_ringbuf_t rb, const unsigned char *ptr, int length);
|
||||
int mpp_ringbuffer_get(mpp_ringbuf_t rb, unsigned char *ptr, int length);
|
||||
int mpp_ringbuffer_data_len(mpp_ringbuf_t rb);
|
||||
int mpp_ringbuffer_space_len(mpp_ringbuf_t rb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MPP_RINGBUF_H */
|
||||
36
packages/artinchip/mpp/base/include/mpp_thread.h
Normal file
36
packages/artinchip/mpp/base/include/mpp_thread.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Author: <che.jiang@artinchip.com>
|
||||
* Desc: mpp thread interface
|
||||
*/
|
||||
|
||||
#ifndef MPP_THREAD_H
|
||||
#define MPP_THREAD_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include "mpp_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MPP_WAIT_FOREVER (-1)
|
||||
|
||||
typedef void *mpp_sem_t;
|
||||
|
||||
|
||||
mpp_sem_t mpp_sem_create();
|
||||
void mpp_sem_delete(mpp_sem_t sem);
|
||||
int mpp_sem_signal(mpp_sem_t sem);
|
||||
int mpp_sem_wait(mpp_sem_t sem, int64_t us);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MPP_THREAD_H */
|
||||
Reference in New Issue
Block a user