diff options
author | Xie, Lin <lin.xie@intel.com> | 2020-11-09 14:09:13 +0800 |
---|---|---|
committer | Guo, Yejun <yejun.guo@intel.com> | 2020-12-29 09:31:06 +0800 |
commit | 6506ab8b03dd6747f6ad6b836a347a6fc346708b (patch) | |
tree | 408fdf7869ab42b9224b97989512a2bf0b6f36cf /libavfilter/dnn/queue.h | |
parent | 1b64954e42b4dc685a82d5576527a2166d818773 (diff) | |
download | ffmpeg-6506ab8b03dd6747f6ad6b836a347a6fc346708b.tar.gz |
dnn/queue: add queue and safe_queue support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/dnn/queue.h')
-rw-r--r-- | libavfilter/dnn/queue.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libavfilter/dnn/queue.h b/libavfilter/dnn/queue.h new file mode 100644 index 0000000000..75f42f403b --- /dev/null +++ b/libavfilter/dnn/queue.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2020 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVFILTER_DNN_QUEUE_H +#define AVFILTER_DNN_QUEUE_H + +typedef struct _queue queue; + +queue *queue_create(void); +void queue_destroy(queue *q); + +size_t queue_size(queue *q); + +void *queue_peek_front(queue *q); +void *queue_peek_back(queue *q); + +void queue_push_front(queue *q, void *v); +void queue_push_back(queue *q, void *v); + +void *queue_pop_front(queue *q); +void *queue_pop_back(queue *q); + +#endif |