X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_source.h;h=9b4c9b4a2040db794a94b179da4e2c46dcdb7dc8;hb=cd4a82d90677cec80e891ac190000cb70767446f;hp=e7c9805ef613d527d00f374d141b475ab36d9b4e;hpb=afc495f722f89fea0bcc579046d1a5d362e36f69;p=dcpomatic.git diff --git a/src/lib/video_source.h b/src/lib/video_source.h index e7c9805ef..9b4c9b4a2 100644 --- a/src/lib/video_source.h +++ b/src/lib/video_source.h @@ -29,11 +29,12 @@ #include "util.h" class VideoSink; +class TimedVideoSink; class Subtitle; class Image; /** @class VideoSource - * @param A class that emits video data. + * @param A class that emits video data without timestamps. */ class VideoSource { @@ -44,9 +45,28 @@ public: * Second parameter is true if the image is the same as the last one that was emitted. * Third parameter is either 0 or a subtitle that should be on this frame. */ - boost::signals2::signal, bool, boost::shared_ptr)> Video; + boost::signals2::signal, bool, boost::shared_ptr)> Video; void connect_video (boost::shared_ptr); }; +/** @class TimedVideoSource + * @param A class that emits video data with timestamps. + */ +class TimedVideoSource +{ +public: + + /** Emitted when a video frame is ready. + * First parameter is the video image. + * Second parameter is true if the image is the same as the last one that was emitted. + * Third parameter is either 0 or a subtitle that should be on this frame. + * Fourth parameter is the source timestamp of this frame. + */ + boost::signals2::signal, bool, boost::shared_ptr, double)> Video; + + void connect_video (boost::shared_ptr); + void connect_video (boost::shared_ptr); +}; + #endif