From 835dd8938830b615d5b3e66272eb56d60bf7c45f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 29 Sep 2022 10:17:50 +0200 Subject: Change how video timing is done. This commit changes the approach with video timing. Previously, we would (more-or-less) try to use every video frame from the content in the output, hoping that they come at a constant frame rate. This is not always the case, however. Here we preserve the PTS of video frames, and then when one arrives we output whatever DCP video frames we can (at the regular DCP frame rate). Hopefully this will solve a range of sync problems, but it could also introduce new ones. --- src/lib/player_video.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/player_video.h') diff --git a/src/lib/player_video.h b/src/lib/player_video.h index f2781c1a0..10b2078a0 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -59,7 +59,7 @@ public: boost::optional colour_conversion, VideoRange video_range, std::weak_ptr content, - boost::optional video_frame, + boost::optional video_time, bool error ); @@ -141,8 +141,8 @@ private: boost::optional _text; /** Content that we came from. This is so that reset_metadata() can work. */ std::weak_ptr _content; - /** Video frame that we came from. Again, this is for reset_metadata() */ - boost::optional _video_frame; + /** Video time that we came from. Again, this is for reset_metadata() */ + boost::optional _video_time; mutable boost::mutex _mutex; mutable std::shared_ptr _image; -- cgit v1.2.3