summaryrefslogtreecommitdiff
path: root/src/lib/content_video.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-29 10:17:50 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-04 23:20:11 +0200
commit0303a96b66eaf85060ce02d85cc36067f34b1051 (patch)
treecae8f9a013d18c3da77a9cc42655680613273b8a /src/lib/content_video.h
parent32294829b99fcbfa67e2b6b13b7a60d7244ff0ac (diff)
Change how video timing is done.v2.17.2
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.
Diffstat (limited to 'src/lib/content_video.h')
-rw-r--r--src/lib/content_video.h15
1 files changed, 10 insertions, 5 deletions
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<const ImageProxy> i, Frame f, Eyes e, Part p)
+ ContentVideo (std::shared_ptr<const ImageProxy> i, dcpomatic::ContentTime t, Eyes e, Part p)
: image (i)
- , frame (f)
+ , time (t)
, eyes (e)
, part (p)
{}
std::shared_ptr<const ImageProxy> image;
- Frame frame;
+ dcpomatic::ContentTime time;
Eyes eyes;
Part part;
};
+
#endif