Emit no audio from DCPs if none is mapped
[dcpomatic.git] / src / wx / colour_conversion_editor.cc
index 908968712131848a73c7ae571c967de7b7acaebf..686238c55df0e7984a1ad339a88319a0c82c21cb 100644 (file)
 #include <dcp/locale_convert.h>
 #include <dcp/modified_gamma_transfer_function.h>
 #include <dcp/s_gamut3_transfer_function.h>
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/gbsizer.h>
 #include <wx/numformatter.h>
 #include <wx/spinctrl.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::dynamic_pointer_cast;
@@ -115,6 +118,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent, bool yuv)
        _yuv_to_rgb = new wxChoice (this, wxID_ANY);
        _yuv_to_rgb->Append (_("Rec. 601"));
        _yuv_to_rgb->Append (_("Rec. 709"));
+       _yuv_to_rgb->Append (_("Rec. 2020"));
        table->Add (_yuv_to_rgb, wxGBPosition (r, 1));
        ++r;
 
@@ -219,7 +223,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent, bool yuv)
        _input_power->SetIncrement (0.1);
 
        _input->Bind (wxEVT_CHOICE, bind (&ColourConversionEditor::changed, this));
-       _input_gamma->Bind (wxEVT_SPINCTRLDOUBLE, bind (&ColourConversionEditor::changed, this, _input_gamma));
+       _input_gamma->Bind(wxEVT_SPINCTRLDOUBLE, bind(&ColourConversionEditor::spin_ctrl_changed, this, _input_gamma));
        _input_power->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::changed, this));
        _input_threshold->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::changed, this));
        _input_A->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::changed, this));
@@ -232,11 +236,11 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent, bool yuv)
        _blue_y->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::chromaticity_changed, this));
        _white_x->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::chromaticity_changed, this));
        _white_y->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::chromaticity_changed, this));
-       _adjust_white->Bind (wxEVT_CHECKBOX, bind (&ColourConversionEditor::adjusted_white_changed, this));
+       _adjust_white->bind(&ColourConversionEditor::adjusted_white_changed, this);
        _adjusted_white_x->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::adjusted_white_changed, this));
        _adjusted_white_y->Bind (wxEVT_TEXT, bind (&ColourConversionEditor::adjusted_white_changed, this));
        _yuv_to_rgb->Bind (wxEVT_CHOICE, bind (&ColourConversionEditor::changed, this));
-       _output->Bind (wxEVT_CHECKBOX, bind (&ColourConversionEditor::changed, this));
+       _output->bind(&ColourConversionEditor::changed, this);
 }
 
 
@@ -445,7 +449,7 @@ ColourConversionEditor::update_rgb_to_xyz ()
 
 
 void
-ColourConversionEditor::changed (wxSpinCtrlDouble* sc)
+ColourConversionEditor::spin_ctrl_changed(wxSpinCtrlDouble* sc)
 {
        /* On OS X, it seems that in some cases when a wxSpinCtrlDouble loses focus
           it emits an erroneous changed signal, which messes things up.