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/content_video.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/lib/content_video.h') diff --git a/src/lib/content_video.h b/src/lib/content_video.h index 8ca18576e..1c145f602 100644 --- a/src/lib/content_video.h +++ b/src/lib/content_video.h @@ -18,13 +18,18 @@ */ + #ifndef DCPOMATIC_CONTENT_VIDEO_H #define DCPOMATIC_CONTENT_VIDEO_H + +#include "dcpomatic_time.h" #include "types.h" + class ImageProxy; + /** @class ContentVideo * @brief A frame of video straight out of some content. */ @@ -32,22 +37,22 @@ class ContentVideo { public: ContentVideo () - : frame (0) - , eyes (Eyes::LEFT) + : eyes (Eyes::LEFT) , part (Part::WHOLE) {} - ContentVideo (std::shared_ptr i, Frame f, Eyes e, Part p) + ContentVideo (std::shared_ptr i, dcpomatic::ContentTime t, Eyes e, Part p) : image (i) - , frame (f) + , time (t) , eyes (e) , part (p) {} std::shared_ptr image; - Frame frame; + dcpomatic::ContentTime time; Eyes eyes; Part part; }; + #endif -- cgit v1.2.3