nb_frames = std::max(nb_frames, std::max(video_nb_frames, audio_nb_frames));\r
}\r
\r
+ nb_frames = muxer_.calc_nb_frames(nb_frames);\r
+\r
// TODO: Might need to scale nb_frames av frame_muxer transformations.\r
\r
return nb_frames + late_frames_ - start_;\r
\r
dest.push_back(core::basic_frame::interlace(frame1, frame2, format_desc_.mode)); \r
}\r
+ \r
+ int64_t calc_nb_frames(int64_t nb_frames) const\r
+ {\r
+ switch(display_mode_)\r
+ {\r
+ case display_mode::interlace:\r
+ case display_mode::half:\r
+ return nb_frames/2;\r
+ case display_mode::duplicate:\r
+ case display_mode::deinterlace_bob:\r
+ return nb_frames*2;\r
+ default:\r
+ return nb_frames;\r
+ }\r
+ }\r
};\r
\r
frame_muxer::frame_muxer(double in_fps, const safe_ptr<core::frame_factory>& frame_factory)\r
bool frame_muxer::empty() const {return impl_->size() == 0;}\r
bool frame_muxer::video_ready() const{return impl_->video_ready();}\r
bool frame_muxer::audio_ready() const{return impl_->audio_ready();}\r
+int64_t frame_muxer::calc_nb_frames(int64_t nb_frames) const {return impl_->calc_nb_frames(nb_frames);}\r
\r
}
\ No newline at end of file