1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

ffmpeg: change vsync value to an enum

Stop explicitly defining VSCFR and DROP values, which were never
documented.
This commit is contained in:
Anton Khirnov
2021-12-04 14:53:58 +01:00
parent bb6f591c49
commit 011114f3e1
3 changed files with 12 additions and 9 deletions

View File

@@ -1143,7 +1143,8 @@ static void do_video_out(OutputFile *of,
OutputStream *ost, OutputStream *ost,
AVFrame *next_picture) AVFrame *next_picture)
{ {
int ret, format_video_sync; int ret;
enum VideoSyncMethod format_video_sync;
AVPacket *pkt = ost->pkt; AVPacket *pkt = ost->pkt;
AVCodecContext *enc = ost->enc_ctx; AVCodecContext *enc = ost->enc_ctx;
AVRational frame_rate; AVRational frame_rate;

View File

@@ -47,12 +47,14 @@
#include "libswresample/swresample.h" #include "libswresample/swresample.h"
#define VSYNC_AUTO -1 enum VideoSyncMethod {
#define VSYNC_PASSTHROUGH 0 VSYNC_AUTO = -1,
#define VSYNC_CFR 1 VSYNC_PASSTHROUGH,
#define VSYNC_VFR 2 VSYNC_CFR,
#define VSYNC_VSCFR 0xfe VSYNC_VFR,
#define VSYNC_DROP 0xff VSYNC_VSCFR,
VSYNC_DROP,
};
#define MAX_STREAMS 1024 /* arbitrary sanity check value */ #define MAX_STREAMS 1024 /* arbitrary sanity check value */
@@ -605,7 +607,7 @@ extern float dts_error_threshold;
extern int audio_volume; extern int audio_volume;
extern int audio_sync_method; extern int audio_sync_method;
extern int video_sync_method; extern enum VideoSyncMethod video_sync_method;
extern float frame_drop_threshold; extern float frame_drop_threshold;
extern int do_benchmark; extern int do_benchmark;
extern int do_benchmark_all; extern int do_benchmark_all;

View File

@@ -147,7 +147,7 @@ float dts_error_threshold = 3600*30;
int audio_volume = 256; int audio_volume = 256;
int audio_sync_method = 0; int audio_sync_method = 0;
int video_sync_method = VSYNC_AUTO; enum VideoSyncMethod video_sync_method = VSYNC_AUTO;
float frame_drop_threshold = 0; float frame_drop_threshold = 0;
int do_benchmark = 0; int do_benchmark = 0;
int do_benchmark_all = 0; int do_benchmark_all = 0;