diff options
Diffstat (limited to 'common/encode_lavc.h')
-rw-r--r-- | common/encode_lavc.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/encode_lavc.h b/common/encode_lavc.h index 97c2cf01f1..c60afb6cc5 100644 --- a/common/encode_lavc.h +++ b/common/encode_lavc.h @@ -41,7 +41,7 @@ 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 @@ -49,12 +49,6 @@ struct encode_lavc_context { // 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; - // anti discontinuity mode double next_in_pts; double discontinuity_pts_offset; @@ -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 @@ -111,6 +107,10 @@ bool encoder_init_codec_and_muxer(struct encoder_context *p, // Encode the frame and write the packet. frame is ref'ed as need. bool encoder_encode(struct encoder_context *p, AVFrame *frame); +// Return muxer timebase (only available after on_ready() has been called). +// 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 |