summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-03-31 17:33:48 +0200
committerAnton Khirnov <anton@khirnov.net>2022-07-23 11:53:19 +0200
commit2d924b3a630869c65fe0c76568910500f54ed057 (patch)
tree046e6484309205ca7715ec0a66e5b77732cf536b /fftools/ffmpeg.h
parent37c764df6730e8299c468dd7636c45da6e158ef3 (diff)
fftools/ffmpeg: move each muxer to a separate thread
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index d12577e992..0c9498c23e 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -21,6 +21,7 @@
#include "config.h"
+#include <stdatomic.h>
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
@@ -557,7 +558,7 @@ typedef struct OutputStream {
// combined size of all the packets written
uint64_t data_size;
// number of packets send to the muxer
- uint64_t packets_written;
+ atomic_uint_least64_t packets_written;
// number of frames/samples sent to the encoder
uint64_t frames_encoded;
uint64_t samples_encoded;
@@ -699,14 +700,14 @@ int hw_device_setup_for_filter(FilterGraph *fg);
int hwaccel_decode_init(AVCodecContext *avctx);
int of_muxer_init(OutputFile *of, AVFormatContext *fc,
- AVDictionary *opts, int64_t limit_filesize);
+ AVDictionary *opts, int64_t limit_filesize,
+ int thread_queue_size);
/* open the muxer when all the streams are initialized */
int of_check_init(OutputFile *of);
int of_write_trailer(OutputFile *of);
void of_close(OutputFile **pof);
int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost);
-int of_finished(OutputFile *of);
int64_t of_filesize(OutputFile *of);
AVChapter * const *
of_get_chapters(OutputFile *of, unsigned int *nb_chapters);