summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-19 22:34:51 +0200
committerCarl Hetherington <cth@carlh.net>2024-12-08 23:09:47 +0100
commiteeb153a9beff36fca1098621c78cc3a1eb543f7d (patch)
tree890fb9a37af52e71c53de3c1acfd1cbbfe43c0f6
parent2eb78ba216199a49150832c89d324880d08c65d8 (diff)
Add stub sign language window.
-rw-r--r--src/lib/constants.h2
-rw-r--r--src/tools/dcpomatic.cc8
-rw-r--r--src/wx/film_viewer.cc9
-rw-r--r--src/wx/film_viewer.h3
-rw-r--r--src/wx/sign_language_dialog.cc35
-rw-r--r--src/wx/sign_language_dialog.h34
-rw-r--r--src/wx/wscript1
7 files changed, 92 insertions, 0 deletions
diff --git a/src/lib/constants.h b/src/lib/constants.h
index cfa156778..e815bfab4 100644
--- a/src/lib/constants.h
+++ b/src/lib/constants.h
@@ -47,6 +47,8 @@
#define MAX_CLOSED_CAPTION_XML_SIZE_TEXT "256KB"
#define CERTIFICATE_VALIDITY_PERIOD (10 * 365)
#define SNAP_SUBDIVISION 64
+#define SIGN_LANGUAGE_WIDTH 480
+#define SIGN_LANGUAGE_HEIGHT 640
#endif
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index e80bfc333..3735f4790 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -244,6 +244,7 @@ enum {
ID_jobs_show_dcp,
ID_jobs_open_dcp_in_player,
ID_view_closed_captions,
+ ID_view_sign_language,
ID_view_video_waveform,
ID_tools_version_file,
ID_tools_hints,
@@ -356,6 +357,7 @@ public:
Bind (wxEVT_MENU, boost::bind (&DOMFrame::jobs_show_dcp, this), ID_jobs_show_dcp);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::jobs_open_dcp_in_player, this), ID_jobs_open_dcp_in_player);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_closed_captions, this), ID_view_closed_captions);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_sign_language, this), ID_view_sign_language);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::view_video_waveform, this), ID_view_video_waveform);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_version_file, this), ID_tools_version_file);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_hints, this), ID_tools_hints);
@@ -1081,6 +1083,11 @@ private:
_film_viewer.show_closed_captions ();
}
+ void view_sign_language()
+ {
+ _film_viewer.show_sign_language();
+ }
+
void view_video_waveform ()
{
if (!_video_waveform_dialog) {
@@ -1411,6 +1418,7 @@ private:
auto view = new wxMenu;
add_item (view, _("Closed captions..."), ID_view_closed_captions, NEEDS_FILM);
+ add_item(view, _("Sign language..."), ID_view_sign_language, NEEDS_FILM);
add_item (view, _("Video waveform..."), ID_view_video_waveform, NEEDS_FILM);
auto tools = new wxMenu;
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 9edd4578e..0d0f04c55 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -31,6 +31,7 @@
#include "nag_dialog.h"
#include "playhead_to_frame_dialog.h"
#include "playhead_to_timecode_dialog.h"
+#include "sign_language_dialog.h"
#include "simple_video_view.h"
#include "wx_util.h"
#include "lib/butler.h"
@@ -89,6 +90,7 @@ rtaudio_callback (void* out, void *, unsigned int frames, double, RtAudioStreamS
FilmViewer::FilmViewer (wxWindow* p)
: _closed_captions_dialog (new ClosedCaptionsDialog(p, this))
+ , _sign_language_dialog(new SignLanguageDialog(p))
{
#if wxCHECK_VERSION(3, 1, 0)
switch (Config::instance()->video_view_type()) {
@@ -807,6 +809,13 @@ FilmViewer::show_closed_captions ()
void
+FilmViewer::show_sign_language()
+{
+ _sign_language_dialog->Show();
+}
+
+
+void
FilmViewer::seek_by (DCPTime by, bool accurate)
{
seek (_video_view->position() + by, accurate);
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 5c379575d..6c6262d9d 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -49,6 +49,7 @@ class Image;
class Player;
class PlayerVideo;
class RGBPlusAlphaImage;
+class SignLanguageDialog;
class wxToggleButton;
@@ -71,6 +72,7 @@ public:
}
void show_closed_captions ();
+ void show_sign_language();
void set_film (std::shared_ptr<Film>);
std::shared_ptr<Film> film () const {
@@ -208,6 +210,7 @@ private:
Optimisation _optimisation = Optimisation::NONE;
ClosedCaptionsDialog* _closed_captions_dialog = nullptr;
+ SignLanguageDialog* _sign_language_dialog = nullptr;
bool _outline_content = false;
boost::optional<dcpomatic::Rect<double>> _outline_subtitles;
diff --git a/src/wx/sign_language_dialog.cc b/src/wx/sign_language_dialog.cc
new file mode 100644
index 000000000..857e4380b
--- /dev/null
+++ b/src/wx/sign_language_dialog.cc
@@ -0,0 +1,35 @@
+/*
+ Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "sign_language_dialog.h"
+#include "simple_video_view.h"
+#include "lib/constants.h"
+
+
+using std::make_shared;
+
+
+SignLanguageDialog::SignLanguageDialog(wxWindow* parent)
+ : wxDialog(parent, wxID_ANY, _("Sign language"), wxDefaultPosition, wxSize(SIGN_LANGUAGE_WIDTH, SIGN_LANGUAGE_HEIGHT))
+{
+
+}
+
diff --git a/src/wx/sign_language_dialog.h b/src/wx/sign_language_dialog.h
new file mode 100644
index 000000000..831df3c46
--- /dev/null
+++ b/src/wx/sign_language_dialog.h
@@ -0,0 +1,34 @@
+/*
+ Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
+#include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
+
+
+class SignLanguageDialog : public wxDialog
+{
+public:
+ SignLanguageDialog(wxWindow* parent);
+
+};
+
diff --git a/src/wx/wscript b/src/wx/wscript
index 5a19c0df3..b52a234a7 100644
--- a/src/wx/wscript
+++ b/src/wx/wscript
@@ -152,6 +152,7 @@ sources = """
send_test_email_dialog.cc
server_dialog.cc
servers_list_dialog.cc
+ sign_language_dialog.cc
simple_video_view.cc
smpte_metadata_dialog.cc
standard_controls.cc