fftools/ffmpeg_enc: move fps conversion code to ffmpeg_filter
Its function is analogous to that of the fps filter, so filtering is a more appropriate place for this. The main practical reason for this move is that it places the encoding sync queue right at the boundary between filters and encoders. This will be important when switching to threaded scheduling, as the sync queue involves multiple streams and will thus need to do nontrivial inter-thread synchronization. In addition to framerate conversion, the closely-related * encoder timebase selection * applying the start_time offset are also moved to filtering.
This commit is contained in:
@@ -302,6 +302,9 @@ typedef struct OutputFilter {
|
||||
|
||||
/* pts of the last frame received from this filter, in AV_TIME_BASE_Q */
|
||||
int64_t last_pts;
|
||||
|
||||
uint64_t nb_frames_dup;
|
||||
uint64_t nb_frames_drop;
|
||||
} OutputFilter;
|
||||
|
||||
typedef struct FilterGraph {
|
||||
@@ -536,10 +539,6 @@ typedef struct OutputStream {
|
||||
Encoder *enc;
|
||||
AVCodecContext *enc_ctx;
|
||||
|
||||
uint64_t nb_frames_dup;
|
||||
uint64_t nb_frames_drop;
|
||||
int64_t last_dropped;
|
||||
|
||||
/* video only */
|
||||
AVRational frame_rate;
|
||||
AVRational max_frame_rate;
|
||||
|
||||
Reference in New Issue
Block a user