Add stub sign language window.
authorCarl Hetherington <cth@carlh.net>
Wed, 19 Oct 2022 20:34:51 +0000 (22:34 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 22 Dec 2022 23:12:00 +0000 (00:12 +0100)
src/lib/constants.h
src/tools/dcpomatic.cc
src/wx/film_viewer.cc
src/wx/film_viewer.h
src/wx/sign_language_dialog.cc [new file with mode: 0644]
src/wx/sign_language_dialog.h [new file with mode: 0644]
src/wx/wscript

index 3b187155453d32b0a6f822e799fbbe08f918432a..b6476cc99b2c18a28eeca7bf047c946a23f0f4f8 100644 (file)
@@ -47,6 +47,8 @@
 #define MAX_CLOSED_CAPTION_XML_SIZE (256 * 1024)
 #define MAX_CLOSED_CAPTION_XML_SIZE_TEXT "256KB"
 #define CERTIFICATE_VALIDITY_PERIOD (10 * 365)
+#define SIGN_LANGUAGE_WIDTH 480
+#define SIGN_LANGUAGE_HEIGHT 640
 
 
 #endif
index 5ff04de228bd0611092a8b9610c2b58bee113b4c..eb245cef9d8efa3eb8e29f911678533bbd8b6f6c 100644 (file)
@@ -250,6 +250,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_hints,
        ID_tools_encoding_servers,
@@ -380,6 +381,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_hints, this),             ID_tools_hints);
                Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_encoding_servers, this),  ID_tools_encoding_servers);
@@ -1092,6 +1094,11 @@ private:
                _film_viewer.show_closed_captions ();
        }
 
+       void view_sign_language()
+       {
+               _film_viewer.show_sign_language();
+       }
+
        void view_video_waveform ()
        {
                if (!_video_waveform_dialog) {
@@ -1429,6 +1436,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;
index fb02f0a0ff41074015ebc9c6b9b939aa5698f6b1..9f79bbe012a42353c6de8ba8026ed49b41fc6179 100644 (file)
@@ -30,6 +30,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"
@@ -88,6 +89,7 @@ rtaudio_callback (void* out, void *, unsigned int frames, double, RtAudioStreamS
 FilmViewer::FilmViewer (wxWindow* p)
        : _audio (DCPOMATIC_RTAUDIO_API)
        , _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()) {
@@ -762,6 +764,13 @@ FilmViewer::show_closed_captions ()
 }
 
 
+void
+FilmViewer::show_sign_language()
+{
+       _sign_language_dialog->Show();
+}
+
+
 void
 FilmViewer::seek_by (DCPTime by, bool accurate)
 {
index aea3f8c8633465933af11c5e5ccad26610d87d4d..c95ab5b0a8572ccdb01eb665f9f0042abbf47af9 100644 (file)
@@ -45,6 +45,7 @@ class Image;
 class Player;
 class PlayerVideo;
 class RGBPlusAlphaImage;
+class SignLanguageDialog;
 class wxToggleButton;
 
 
@@ -67,6 +68,7 @@ public:
        }
 
        void show_closed_captions ();
+       void show_sign_language();
 
        void set_film (std::shared_ptr<Film>);
        std::shared_ptr<Film> film () const {
@@ -203,6 +205,7 @@ private:
        bool _optimise_for_j2k = false;
 
        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 (file)
index 0000000..857e438
--- /dev/null
@@ -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 (file)
index 0000000..831df3c
--- /dev/null
@@ -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);
+
+};
+
index a91ec618995ae9637b83af681ee31a47bf3af320..2de2ef437f6f196031a377caf7b9a008c570c383 100644 (file)
@@ -140,6 +140,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