Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-11-30 20:18:42 +0300
committerClément Bœsch <clement@stupeflix.com>2015-12-07 13:39:28 +0300
commitf98abe0ee778880408863aff8371f4749f1f9b49 (patch)
treee879f40b79f011c9fae9d5abca1415b447082aa1 /libavutil/threadmessage.h
parent6596c6fca7e8d94cca1eec21c692c8dd83aaf9cd (diff)
avutil/threadmessage: add av_thread_message_flush()
Diffstat (limited to 'libavutil/threadmessage.h')
-rw-r--r--libavutil/threadmessage.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavutil/threadmessage.h b/libavutil/threadmessage.h
index a8481d8ec3..e256cae9db 100644
--- a/libavutil/threadmessage.h
+++ b/libavutil/threadmessage.h
@@ -88,4 +88,20 @@ void av_thread_message_queue_set_err_send(AVThreadMessageQueue *mq,
void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq,
int err);
+/**
+ * Set the optional free message callback function which will be called if an
+ * operation is removing messages from the queue.
+ */
+void av_thread_message_queue_set_free_func(AVThreadMessageQueue *mq,
+ void (*free_func)(void *msg));
+
+/**
+ * Flush the message queue
+ *
+ * This function is mostly equivalent to reading and free-ing every message
+ * except that it will be done in a single operation (no lock/unlock between
+ * reads).
+ */
+void av_thread_message_flush(AVThreadMessageQueue *mq);
+
#endif /* AVUTIL_THREADMESSAGE_H */