[FFmpeg-devel] [PATCH] Message queue API
Clément Bœsch
u at pkh.me
Sun May 4 17:04:05 CEST 2014
On Sun, May 04, 2014 at 04:59:22PM +0200, Nicolas George wrote:
[...]
> From 6c3c109e7568f31ce9711ed98df18bd69b1a9bc6 Mon Sep 17 00:00:00 2001
> From: Nicolas George <george at nsup.org>
> Date: Thu, 20 Feb 2014 14:14:53 +0100
> Subject: [PATCH 3/3] ffmpeg: use thread message API.
>
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> ffmpeg.c | 98 ++++++++++++++++++----------------------------------------------
> ffmpeg.h | 5 ++--
> 2 files changed, 29 insertions(+), 74 deletions(-)
>
[...]
> diff --git a/ffmpeg.h b/ffmpeg.h
> index 316d0d5..9c20f18 100644
> --- a/ffmpeg.h
> +++ b/ffmpeg.h
> @@ -44,6 +44,7 @@
> #include "libavutil/fifo.h"
> #include "libavutil/pixfmt.h"
> #include "libavutil/rational.h"
> +#include "libavutil/threadmessage.h"
>
> #include "libswresample/swresample.h"
>
> @@ -335,13 +336,11 @@ typedef struct InputFile {
> int accurate_seek;
>
> #if HAVE_PTHREADS
> + AVThreadMessageQueue *in_thread_queue;
> pthread_t thread; /* thread reading from this file */
> int non_blocking; /* reading packets from the thread should not block */
> int finished; /* the thread has exited */
Is this field still required?
> int joined; /* the thread has been joined */
> - pthread_mutex_t fifo_lock; /* lock for access to fifo */
> - pthread_cond_t fifo_cond; /* the main thread will signal on this cond after reading from fifo */
> - AVFifoBuffer *fifo; /* demuxed packets are stored here; freed by the main thread */
> #endif
> } InputFile;
>
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140504/32541c92/attachment.asc>
More information about the ffmpeg-devel
mailing list