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:
@@ -536,7 +536,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
|
||||
av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n",
|
||||
ost->file_index, ost->index, q);
|
||||
}
|
||||
if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) {
|
||||
if (!vid && ost->type == AVMEDIA_TYPE_VIDEO && ost->filter) {
|
||||
float fps;
|
||||
uint64_t frame_number = atomic_load(&ost->packets_written);
|
||||
|
||||
@@ -550,8 +550,8 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
|
||||
if (is_last_report)
|
||||
av_bprintf(&buf, "L");
|
||||
|
||||
nb_frames_dup = ost->nb_frames_dup;
|
||||
nb_frames_drop = ost->nb_frames_drop;
|
||||
nb_frames_dup = ost->filter->nb_frames_dup;
|
||||
nb_frames_drop = ost->filter->nb_frames_drop;
|
||||
|
||||
vid = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user