X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_source.h;h=d2aa045a715e858fa8854fc22a2ccda098aa7908;hb=47f25009bcbc765e397bcb471dd361a511c99daf;hp=e7c9805ef613d527d00f374d141b475ab36d9b4e;hpb=147cca5876dfbdf56e21289c3a36bec4b4850191;p=dcpomatic.git diff --git a/src/lib/video_source.h b/src/lib/video_source.h index e7c9805ef..d2aa045a7 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 { @@ -49,4 +50,22 @@ public: 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); +}; + #endif