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/safe_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/safe_queue.h')
-rw-r--r-- | libavfilter/dnn/safe_queue.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libavfilter/dnn/safe_queue.h b/libavfilter/dnn/safe_queue.h new file mode 100644 index 0000000000..aaa15fadf2 --- /dev/null +++ b/libavfilter/dnn/safe_queue.h @@ -0,0 +1,36 @@ +/* + * 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_SAFE_QUEUE_H +#define AVFILTER_DNN_SAFE_QUEUE_H + +typedef struct _safe_queue safe_queue; + +safe_queue *safe_queue_create(void); +void safe_queue_destroy(safe_queue *sq); + +size_t safe_queue_size(safe_queue *sq); + +void safe_queue_push_front(safe_queue *sq, void *v); +void safe_queue_push_back(safe_queue *sq, void *v); + +void *safe_queue_pop_front(safe_queue *sq); + +#endif |