X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_source.h;h=9b4c9b4a2040db794a94b179da4e2c46dcdb7dc8;hb=f861018389acd9d277fe34d7621182b9b54f977f;hp=d53589e2e21448da56c83b6a437255a2a2563194;hpb=b1defe9019642dc4b80697291d40ed88f09de8be;p=dcpomatic.git diff --git a/src/lib/video_source.h b/src/lib/video_source.h index d53589e2e..9b4c9b4a2 100644 --- a/src/lib/video_source.h +++ b/src/lib/video_source.h @@ -21,19 +21,20 @@ * @brief Parent class for classes which emit video data. */ -#ifndef DVDOMATIC_VIDEO_SOURCE_H -#define DVDOMATIC_VIDEO_SOURCE_H +#ifndef DCPOMATIC_VIDEO_SOURCE_H +#define DCPOMATIC_VIDEO_SOURCE_H #include #include #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 { @@ -41,11 +42,31 @@ public: /** Emitted when a video frame is ready. * First parameter is the video image. - * Second parameter is either 0 or a subtitle that should be on this frame. + * 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, 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