mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
74b7001500
This field will be moved out of the ao struct. The encoding code was basically using an invalid way of accessing this field. Since the AO will be moved into its own thread too and will do its own buffering, the AO and the playback core might not even agree which sample a PTS timestamp belongs to. Add some extrapolation code to handle this case.
25 lines
1.0 KiB
C
25 lines
1.0 KiB
C
#ifndef MPLAYER_ENCODE_H
|
|
#define MPLAYER_ENCODE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct mpv_global;
|
|
struct mp_log;
|
|
struct encode_lavc_context;
|
|
struct encode_output_conf;
|
|
|
|
// interface for mplayer.c
|
|
struct encode_lavc_context *encode_lavc_init(struct encode_output_conf *options,
|
|
struct mpv_global *global);
|
|
void encode_lavc_finish(struct encode_lavc_context *ctx);
|
|
void encode_lavc_free(struct encode_lavc_context *ctx);
|
|
void encode_lavc_discontinuity(struct encode_lavc_context *ctx);
|
|
bool encode_lavc_showhelp(struct mp_log *log, struct encode_output_conf *options);
|
|
int encode_lavc_getstatus(struct encode_lavc_context *ctx, char *buf, int bufsize, float relative_position);
|
|
void encode_lavc_expect_stream(struct encode_lavc_context *ctx, int mt);
|
|
void encode_lavc_set_video_fps(struct encode_lavc_context *ctx, float fps);
|
|
void encode_lavc_set_audio_pts(struct encode_lavc_context *ctx, double pts);
|
|
bool encode_lavc_didfail(struct encode_lavc_context *ctx); // check if encoding failed
|
|
|
|
#endif
|