X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_source.h;h=748cb6fe98b403cda07b939568ef8971eec7993a;hb=003de48cd0371a60d095dc9d02ed5763c410cf5e;hp=893629160eb4bc61a7327302e07923671bfd0b3e;hpb=422341d1cb6bc8cbb6be76eac239c40cb4061c79;p=dcpomatic.git diff --git a/src/lib/video_source.h b/src/lib/video_source.h index 893629160..748cb6fe9 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 VideoSink - * @param A class that emits video data. +/** @class VideoSource + * @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