Loading...
Searching...
No Matches
fftools_thread_queue.h
Go to the documentation of this file.
/*
* This file is part of FFmpeg.
* Copyright (c) 2023 ARTHENICA LTD
*
* 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
*/
/*
* This file is the modified version of thread_queue.h file living in ffmpeg source code under the fftools folder. We
* manually update it each time we depend on a new ffmpeg version. Below you can see the list of changes applied
* by us to develop ffmpeg-kit library.
*
* ffmpeg-kit changes by ARTHENICA LTD
*
* 07.2023
* --------------------------------------------------------
* - FFmpeg 6.0 changes migrated
*/
#ifndef FFTOOLS_THREAD_QUEUE_H
#define FFTOOLS_THREAD_QUEUE_H
#include <string.h>
#include "fftools_objpool.h"
typedef struct ThreadQueue ThreadQueue;
ThreadQueue *tq_alloc(unsigned int nb_streams, size_t queue_size,
ObjPool *obj_pool, void (*obj_move)(void *dst, void *src));
void tq_free(ThreadQueue **tq);
int tq_send(ThreadQueue *tq, unsigned int stream_idx, void *data);
void tq_send_finish(ThreadQueue *tq, unsigned int stream_idx);
int tq_receive(ThreadQueue *tq, int *stream_idx, void *data);
void tq_receive_finish(ThreadQueue *tq, unsigned int stream_idx);
#endif // FFTOOLS_THREAD_QUEUE_H
nb_streams
__thread int nb_streams
Definition fftools_ffprobe.c:336
fftools_objpool.h
tq_send_finish
void tq_send_finish(ThreadQueue *tq, unsigned int stream_idx)
Definition fftools_thread_queue.c:231
tq_send
int tq_send(ThreadQueue *tq, unsigned int stream_idx, void *data)
Definition fftools_thread_queue.c:134
tq_alloc
ThreadQueue * tq_alloc(unsigned int nb_streams, size_t queue_size, ObjPool *obj_pool, void(*obj_move)(void *dst, void *src))
Definition fftools_thread_queue.c:93
tq_receive
int tq_receive(ThreadQueue *tq, int *stream_idx, void *data)
Definition fftools_thread_queue.c:205
tq_free
void tq_free(ThreadQueue **tq)
Definition fftools_thread_queue.c:69
tq_receive_finish
void tq_receive_finish(ThreadQueue *tq, unsigned int stream_idx)
Definition fftools_thread_queue.c:246
ObjPool
Definition fftools_objpool.c:44
ThreadQueue
Definition fftools_thread_queue.c:56
ThreadQueue::obj_pool
ObjPool * obj_pool
Definition fftools_thread_queue.c:62
ThreadQueue::obj_move
void(* obj_move)(void *dst, void *src)
Definition fftools_thread_queue.c:63