summaryrefslogtreecommitdiffstats
path: root/common/encode_lavc.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/encode_lavc.h')
-rw-r--r--common/encode_lavc.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/common/encode_lavc.h b/common/encode_lavc.h
index 390aabd1f8..8517726529 100644
--- a/common/encode_lavc.h
+++ b/common/encode_lavc.h
@@ -22,7 +22,6 @@
#ifndef MPLAYER_ENCODE_LAVC_H
#define MPLAYER_ENCODE_LAVC_H
-#include <pthread.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
@@ -33,6 +32,7 @@
#include "common/common.h"
#include "encode.h"
+#include "osdep/threads.h"
#include "video/csputils.h"
struct encode_lavc_context {
@@ -41,19 +41,13 @@ struct encode_lavc_context {
struct encode_opts *options;
struct mp_log *log;
struct encode_priv *priv;
- AVOutputFormat *oformat;
+ const AVOutputFormat *oformat;
const char *filename;
// All entry points must be guarded with the lock. Functions called by
// the playback core lock this automatically, but ao_lavc.c and vo_lavc.c
// must lock manually before accessing state.
- pthread_mutex_t lock;
-
- // sync to audio mode
- double audio_pts_offset;
-
- double last_audio_in_pts;
- int64_t samples_since_last_pts;
+ mp_mutex lock;
// anti discontinuity mode
double next_in_pts;
@@ -77,7 +71,7 @@ struct encoder_context {
struct mpv_global *global;
struct encode_opts *options;
struct mp_log *log;
- AVOutputFormat *oformat;
+ const AVOutputFormat *oformat;
// (avoid using this)
struct encode_lavc_context *encode_lavc_ctx;
@@ -89,7 +83,9 @@ struct encoder_context {
AVCodecContext *encoder;
struct mux_stream *mux_stream;
+ // (essentially private)
struct stream *twopass_bytebuffer;
+ AVPacket *pkt;
};
// Free with talloc_free(). (Keep in mind actual deinitialization requires
@@ -115,6 +111,4 @@ bool encoder_encode(struct encoder_context *p, AVFrame *frame);
// Caller needs to acquire encode_lavc_context.lock (or call it from on_ready).
AVRational encoder_get_mux_timebase_unlocked(struct encoder_context *p);
-double encoder_get_offset(struct encoder_context *p);
-
#endif