: _audio (DCPOMATIC_RTAUDIO_API)
, _closed_captions_dialog (new ClosedCaptionsDialog(p, this))
{
+#if wxCHECK_VERSION(3, 1, 0)
switch (Config::instance()->video_view_type()) {
case Config::VIDEO_VIEW_OPENGL:
_video_view = std::make_shared<GLVideoView>(this, p);
_video_view = std::make_shared<SimpleVideoView>(this, p);
break;
}
+#else
+ _video_view = std::make_shared<SimpleVideoView>(this, p);
+#endif
_video_view->Sized.connect (boost::bind(&FilmViewer::video_view_sized, this));
_video_view->TooManyDropped.connect (boost::bind(boost::ref(TooManyDropped)));
return;
}
+#if wxCHECK_VERSION(3, 1, 0)
auto const j2k_gl_optimised = dynamic_pointer_cast<GLVideoView>(_video_view) && _optimise_for_j2k;
+#else
+ auto const j2k_gl_optimised = false;
+#endif
_butler = std::make_shared<Butler>(
_film,
_maximum_j2k_bandwidth->SetRange (1, 1000);
_maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
_video_display_mode->Append (_("Simple (safer)"));
+#if wxCHECK_VERSION(3, 1, 0)
_video_display_mode->Append (_("OpenGL (faster)"));
+#endif
_video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this));
_allow_any_dcp_frame_rate->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
_allow_any_container->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_container_changed, this));
#endif
#include "gl_video_view.h"
+
+/* This will only build on an new-enough wxWidgets: see the comment in gl_video_view.h */
+#if wxCHECK_VERSION(3,1,0)
+
#include "film_viewer.h"
#include "wx_util.h"
#include "lib/image.h"
}
}
+#endif
*/
-#include "video_view.h"
-#include "lib/signaller.h"
-#include "lib/position.h"
+
#include "lib/warnings.h"
+
DCPOMATIC_DISABLE_WARNINGS
#include <wx/glcanvas.h>
#include <wx/wx.h>
DCPOMATIC_ENABLE_WARNINGS
+
+/* The OpenGL API in wxWidgets 3.0.x is sufficiently different to make it awkward to support,
+ * and I think it may even have things missing that we require (e.g. the attributes parameter
+ * to wxGLContext). Hence we only support the GLVideoView on wxWidgets 3.1.0 and higher
+ * (which only excludes the old macOS builds, since wxWidgets 3.1.x does not support macOS
+ * 10.9 or earlier).
+ */
+#if wxCHECK_VERSION(3,1,0)
+
+#include "video_view.h"
+#include "lib/signaller.h"
+#include "lib/position.h"
#include <dcp/util.h>
#include <boost/atomic.hpp>
#include <boost/thread.hpp>
std::map<GLenum, std::string> _information;
};
+
+#endif
using std::shared_ptr;
+#if wxCHECK_VERSION(3, 1, 0)
+
SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer> weak_viewer)
: TableDialog (parent, _("System information"), 2, 1, false)
{
layout ();
}
+
+#else
+
+SystemInformationDialog::SystemInformationDialog (wxWindow* parent, weak_ptr<FilmViewer>)
+ : TableDialog (parent, _("System information"), 2, 1, false)
+{
+ add (_("OpenGL version"), true);
+ add (_("OpenGL renderer not supported by this DCP-o-matic version"), false);
+}
+
+#endif