swaroop: Add date/time to watermark.
authorCarl Hetherington <cth@carlh.net>
Tue, 9 Oct 2018 11:08:31 +0000 (12:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 9 Oct 2018 11:08:31 +0000 (12:08 +0100)
src/wx/film_viewer.cc

index 54de78f275dea0dc32d37de69d7ac03861f264b2..1a0e30bf4e060147d73429389d5accbf68ffd116 100644 (file)
@@ -43,6 +43,7 @@
 #include "lib/butler.h"
 #include "lib/log.h"
 #include "lib/config.h"
+#include "lib/compose.hpp"
 extern "C" {
 #include <libavutil/pixfmt.h>
 }
@@ -342,7 +343,10 @@ FilmViewer::paint_panel ()
                        _watermark_y = rand() % _panel_size.height;
                }
                dc.SetTextForeground(*wxWHITE);
-               dc.DrawText(std_to_wx(Config::instance()->player_watermark_theatre()), _watermark_x, _watermark_y);
+               string wm = Config::instance()->player_watermark_theatre();
+               boost::posix_time::ptime t = boost::posix_time::second_clock::local_time();
+               wm += "\n" + boost::posix_time::to_iso_extended_string(t);
+               dc.DrawText(std_to_wx(wm), _watermark_x, _watermark_y);
        } else {
                _in_watermark = false;
        }