summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-08-05 00:15:46 +0200
committerCarl Hetherington <cth@carlh.net>2022-08-11 22:45:33 +0200
commit0d8134a754878da34e2b2bf8c8847e64b4f5e90c (patch)
treef13fda5188e7135470d3a06a391a01ba999d6743 /src/tools
parent0f24bf2fe72b81d7e851e8d65a66fd15157ee142 (diff)
Add video waveform dialog to player (#2226).2226-add-video-waveform-to-player
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 7603b9842..5a3fb3920 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -34,6 +34,7 @@
#include "wx/verify_dcp_progress_dialog.h"
#include "wx/wx_signal_manager.h"
#include "wx/wx_util.h"
+#include "wx/video_waveform_dialog.h"
#include "lib/compose.hpp"
#include "lib/config.h"
#include "lib/cross.h"
@@ -125,6 +126,7 @@ enum {
ID_view_full_screen = 200,
ID_view_dual_screen,
ID_view_closed_captions,
+ ID_view_video_waveform,
ID_view_scale_appropriate,
ID_view_scale_full,
ID_view_scale_half,
@@ -186,6 +188,7 @@ public:
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_full_screen, this), ID_view_full_screen);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_dual_screen, this), ID_view_dual_screen);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_closed_captions, this), ID_view_closed_captions);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_video_waveform, this), ID_view_video_waveform);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_cpl, this, _1), ID_view_cpl, ID_view_cpl + MAX_CPLS);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(0)), ID_view_scale_full);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(1)), ID_view_scale_half);
@@ -536,6 +539,7 @@ private:
setup_menu ();
view->AppendSeparator();
view->Append(ID_view_closed_captions, _("Closed captions..."));
+ view->Append(ID_view_video_waveform, _("Video waveform..."));
view->AppendSeparator();
view->AppendRadioItem(ID_view_scale_appropriate, _("Set decode resolution to match display"))->Check(!static_cast<bool>(c));
view->AppendRadioItem(ID_view_scale_full, _("Decode at full resolution"))->Check(c && c.get() == 0);
@@ -834,6 +838,15 @@ private:
_viewer->show_closed_captions ();
}
+ void view_video_waveform ()
+ {
+ if (!_video_waveform_dialog) {
+ _video_waveform_dialog = new VideoWaveformDialog(this, _film, _viewer);
+ }
+
+ _video_waveform_dialog->Show();
+ }
+
void tools_verify ()
{
auto dcp = std::dynamic_pointer_cast<DCPContent>(_film->content().front());
@@ -1057,6 +1070,7 @@ private:
wxMenuItem* _view_dual_screen = nullptr;
wxSizer* _main_sizer = nullptr;
PlayerStressTester _stress;
+ VideoWaveformDialog* _video_waveform_dialog = nullptr;
};
static const wxCmdLineEntryDesc command_line_description[] = {