using std::string;
using boost::shared_ptr;
using dcp::raw_convert;
+using namespace dcpomatic;
Cinema::Cinema (cxml::ConstNodePtr node)
: name (node->string_child ("Name"))
class Element;
}
-class Screen;
+namespace dcpomatic {
+ class Screen;
+}
/** @class Cinema
* @brief A description of a Cinema for KDM generation.
void as_xml (xmlpp::Element *) const;
- void add_screen (boost::shared_ptr<Screen>);
- void remove_screen (boost::shared_ptr<Screen>);
+ void add_screen (boost::shared_ptr<dcpomatic::Screen>);
+ void remove_screen (boost::shared_ptr<dcpomatic::Screen>);
void set_utc_offset_hour (int h);
void set_utc_offset_minute (int m);
return _utc_offset_minute;
}
- std::list<boost::shared_ptr<Screen> > screens () const {
+ std::list<boost::shared_ptr<dcpomatic::Screen> > screens () const {
return _screens;
}
private:
- std::list<boost::shared_ptr<Screen> > _screens;
+ std::list<boost::shared_ptr<dcpomatic::Screen> > _screens;
/** Offset such that the equivalent time in UTC can be determined
by subtracting the offset from the local time.
*/
class Document;
}
+namespace dcpomatic {
+ class Screen;
+}
+
class DCPContentType;
class Log;
class Content;
class Playlist;
class AudioContent;
-class Screen;
class AudioProcessor;
class AudioMapping;
class Ratio;
) const;
std::list<ScreenKDM> make_kdms (
- std::list<boost::shared_ptr<Screen> > screens,
+ std::list<boost::shared_ptr<dcpomatic::Screen> > screens,
boost::filesystem::path cpl_file,
boost::posix_time::ptime from,
boost::posix_time::ptime until,
#include <boost/foreach.hpp>
using std::string;
+using namespace dcpomatic;
Font::Font (cxml::NodePtr node)
: _id (node->string_child ("Id"))
bool
-operator== (Font const & a, Font const & b)
+dcpomatic::operator== (Font const & a, Font const & b)
{
if (a.id() != b.id()) {
return false;
}
bool
-operator!= (Font const & a, Font const & b)
+dcpomatic::operator!= (Font const & a, Font const & b)
{
return !(a == b);
}
#include <boost/filesystem.hpp>
#include <string>
+namespace dcpomatic {
+
class Font
{
public:
bool operator!= (Font const & a, Font const & b);
bool operator== (Font const & a, Font const & b);
+}
+
#endif
class ReelAsset;
}
+namespace dcpomatic {
+ class Font;
+}
+
class PlayerVideo;
class Playlist;
-class Font;
class AudioBuffers;
class ReferencedReelAsset;
class Shuffler;
bool pass ();
void seek (dcpomatic::DCPTime time, bool accurate);
- std::list<boost::shared_ptr<Font> > get_subtitle_fonts ();
+ std::list<boost::shared_ptr<dcpomatic::Font> > get_subtitle_fonts ();
std::list<ReferencedReelAsset> get_reel_assets ();
dcp::Size video_container_size () const {
boost::mutex::scoped_lock lm (_mutex);
using std::list;
using boost::shared_ptr;
+using namespace dcpomatic;
void
PlayerText::add_fonts (list<shared_ptr<Font> > fonts_)
#include "dcpomatic_time.h"
#include "string_text.h"
-class Font;
+namespace dcpomatic {
+ class Font;
+}
/** A set of text (subtitle/CCAP) which span the same time period */
class PlayerText
{
public:
- void add_fonts (std::list<boost::shared_ptr<Font> > fonts_);
- std::list<boost::shared_ptr<Font> > fonts;
+ void add_fonts (std::list<boost::shared_ptr<dcpomatic::Font> > fonts_);
+ std::list<boost::shared_ptr<dcpomatic::Font> > fonts;
/** BitmapTexts, with their rectangles transformed as specified by their content */
std::list<BitmapText> bitmap;
#include <dcp/picture_asset_writer.h>
#include <boost/shared_ptr.hpp>
+namespace dcpomatic {
+ class Font;
+}
+
class Film;
class Job;
-class Font;
class AudioBuffers;
namespace dcp {
void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period);
void finish ();
- boost::shared_ptr<dcp::Reel> create_reel (std::list<ReferencedReelAsset> const & refs, std::list<boost::shared_ptr<Font> > const & fonts);
+ boost::shared_ptr<dcp::Reel> create_reel (std::list<ReferencedReelAsset> const & refs, std::list<boost::shared_ptr<dcpomatic::Font> > const & fonts);
void calculate_digests (boost::function<void (float)> set_progress);
Frame start () const;
#include "string_text.h"
#include <dcp/util.h>
-class Font;
+namespace dcpomatic {
+ class Font;
+}
std::string marked_up (std::list<StringText> subtitles, int target_height, float fade_factor);
std::list<PositionImage> render_text (
- std::list<StringText>, std::list<boost::shared_ptr<Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
+ std::list<StringText>, std::list<boost::shared_ptr<dcpomatic::Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
);
using std::string;
using std::vector;
+using namespace dcpomatic;
Screen::Screen (cxml::ConstNodePtr node)
: name (node->string_child("Name"))
boost::optional<std::string> _thumbprint;
};
+namespace dcpomatic {
+
/** @class Screen
* @brief A representation of a Screen for KDM generation.
*
std::vector<TrustedDevice> trusted_devices;
};
+}
+
#endif
#include <dcp/name_format.h>
#include <boost/shared_ptr.hpp>
-class Screen;
+namespace dcpomatic {
+ class Screen;
+}
/** Simple class to collect a screen and an encrypted KDM */
class ScreenKDM
{
public:
- ScreenKDM (boost::shared_ptr<Screen> s, dcp::EncryptedKDM k)
+ ScreenKDM (boost::shared_ptr<dcpomatic::Screen> s, dcp::EncryptedKDM k)
: screen (s)
, kdm (k)
{}
boost::function<bool (boost::filesystem::path)> confirm_overwrite
);
- boost::shared_ptr<Screen> screen;
+ boost::shared_ptr<dcpomatic::Screen> screen;
dcp::EncryptedKDM kdm;
};
#include <dcp/name_format.h>
#include <boost/filesystem.hpp>
-class Screen;
+namespace dcpomatic {
+ class Screen;
+}
+
class CinemaKDMs;
class Log;
#include <dcp/types.h>
#include <boost/signals2.hpp>
-class Font;
+namespace dcpomatic {
+ class Font;
+}
class TextContentProperty
{
std::string identifier () const;
void take_settings_from (boost::shared_ptr<const TextContent> c);
- void add_font (boost::shared_ptr<Font> font);
+ void add_font (boost::shared_ptr<dcpomatic::Font> font);
void set_use (bool);
void set_burn (bool);
return _y_scale;
}
- std::list<boost::shared_ptr<Font> > fonts () const {
+ std::list<boost::shared_ptr<dcpomatic::Font> > fonts () const {
boost::mutex::scoped_lock lm (_mutex);
return _fonts;
}
double _x_scale;
/** y scale factor to apply to subtitles */
double _y_scale;
- std::list<boost::shared_ptr<Font> > _fonts;
+ std::list<boost::shared_ptr<dcpomatic::Font> > _fonts;
boost::optional<dcp::Colour> _colour;
boost::optional<dcp::Effect> _effect;
boost::optional<dcp::Colour> _effect_colour;
class Data;
}
+namespace dcpomatic {
+ class Font;
+}
+
class Film;
class AudioBuffers;
class Job;
-class Font;
class ReferencedReelAsset;
class ReelWriter;
void repeat (Frame, Eyes);
void write (boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime time);
void write (PlayerText text, TextType type, boost::optional<DCPTextTrack>, dcpomatic::DCPTimePeriod period);
- void write (std::list<boost::shared_ptr<Font> > fonts);
+ void write (std::list<boost::shared_ptr<dcpomatic::Font> > fonts);
void write (ReferencedReelAsset asset);
void finish ();
std::list<ReferencedReelAsset> _reel_assets;
- std::list<boost::shared_ptr<Font> > _fonts;
+ std::list<boost::shared_ptr<dcpomatic::Font> > _fonts;
};
JobManagerView* job_manager_view = new JobManagerView (overall_panel, false);
wxBoxSizer* right_sizer = new wxBoxSizer (wxVERTICAL);
- right_sizer->Add (_film_viewer->panel(), 2, wxEXPAND | wxALL, 6);
+ right_sizer->Add (_film_viewer->window(), 2, wxEXPAND | wxALL, 6);
right_sizer->Add (_controls, 0, wxEXPAND | wxALL, 6);
right_sizer->Add (job_manager_view, 1, wxEXPAND | wxALL, 6);
using boost::optional;
using boost::ref;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
enum {
ID_help_report_a_problem = 1,
using boost::optional;
using boost::bind;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
static void
help ()
{
wxSizer* main_sizer = new wxBoxSizer (wxVERTICAL);
if (mode != Config::PLAYER_MODE_DUAL) {
- main_sizer->Add (_viewer->panel(), 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
+ main_sizer->Add (_viewer->window(), 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
}
main_sizer->Add (_controls, mode == Config::PLAYER_MODE_DUAL ? 1 : 0, wxEXPAND | wxALL, 6);
main_sizer->Add (_info, 0, wxEXPAND | wxALL, 6);
_dual_screen = new wxFrame (this, wxID_ANY, wxT(""));
_dual_screen->SetBackgroundColour (wxColour(0, 0, 0));
_dual_screen->ShowFullScreen (true);
- _viewer->panel()->Reparent (_dual_screen);
+ _viewer->window()->Reparent (_dual_screen);
_dual_screen->Show ();
if (wxDisplay::GetCount() > 1) {
switch (Config::instance()->image_display()) {
}
} else {
if (_dual_screen) {
- _viewer->panel()->Reparent (_overall_panel);
+ _viewer->window()->Reparent (_overall_panel);
_dual_screen->Destroy ();
_dual_screen = 0;
}
}
FilmViewer::FilmViewer (wxWindow* p)
- : _panel (new wxPanel (p))
+ : _gl_view (new GLView (p))
, _coalesce_player_changes (false)
, _audio (DCPOMATIC_RTAUDIO_API)
, _audio_channels (0)
, _state_timer ("viewer")
, _gets (0)
{
-#ifndef __WXOSX__
- _panel->SetDoubleBuffered (true);
-#endif
-
- _panel->SetBackgroundStyle (wxBG_STYLE_PAINT);
- _panel->SetBackgroundColour (*wxBLACK);
-
- _panel->Bind (wxEVT_PAINT, boost::bind (&FilmViewer::paint_panel, this));
- _panel->Bind (wxEVT_SIZE, boost::bind (&FilmViewer::panel_sized, this, _1));
_timer.Bind (wxEVT_TIMER, boost::bind (&FilmViewer::timer, this));
set_film (shared_ptr<Film> ());
if (_dcp_decode_reduction) {
_player->set_dcp_decode_reduction (_dcp_decode_reduction);
}
- } catch (bad_alloc &) {
- error_dialog (_panel, _("There is not enough free memory to do that."));
+ } catch (bad_alloc) {
+ error_dialog (_gl_view, _("There is not enough free memory to do that."));
_film.reset ();
return;
}
void
FilmViewer::refresh_panel ()
{
- _state_timer.set ("refresh-panel");
- _panel->Refresh ();
- _panel->Update ();
- _state_timer.unset ();
+ /* XXX */
}
void
#ifdef DCPOMATIC_VARIANT_SWAROOP
FilmViewer::maybe_draw_background_image (wxPaintDC& dc)
{
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+ XXX
optional<boost::filesystem::path> bg = Config::instance()->player_background_image();
if (bg) {
wxImage image (std_to_wx(bg->string()));
}
#endif
+#if 0
+XXX
void
FilmViewer::paint_panel ()
{
_state_timer.unset ();
}
+#endif
void
FilmViewer::set_outline_content (bool o)
slow_refresh ();
}
+#if 0
+XXX
void
FilmViewer::panel_sized (wxSizeEvent& ev)
{
}
PositionChanged ();
}
+#endif
void
FilmViewer::calculate_sizes ()
Ratio const * container = _film->container ();
- float const panel_ratio = _panel_size.ratio ();
+ float const view_ratio = float(_gl_view->GetSize().x) / _gl_view->GetSize().y;
float const film_ratio = container ? container->ratio () : 1.78;
- if (panel_ratio < film_ratio) {
+ if (view_ratio < film_ratio) {
/* panel is less widscreen than the film; clamp width */
- _out_size.width = _panel_size.width;
+ _out_size.width = _gl_view->GetSize().x;
_out_size.height = lrintf (_out_size.width / film_ratio);
} else {
/* panel is more widescreen than the film; clamp height */
- _out_size.height = _panel_size.height;
+ _out_size.height = _gl_view->GetSize().y;
_out_size.width = lrintf (_out_size.height * film_ratio);
}
} catch (RtAudioError& e) {
#endif
error_dialog (
- _panel,
+ _gl_view,
_("Could not set up audio output. There will be no audio during the preview."), std_to_wx(e.what())
);
}
* @brief FilmViewer class.
*/
+#include "gl_view.h"
#include "lib/film.h"
#include "lib/config.h"
#include "lib/player_text.h"
FilmViewer (wxWindow *);
~FilmViewer ();
- /** @return the panel showing the film's video */
- wxPanel* panel () const {
- return _panel;
+ /** @return the window showing the film's video */
+ wxWindow* window () const {
+ return _gl_view;
}
void show_closed_captions ();
boost::signals2::signal<bool ()> PlaybackPermitted;
private:
- void paint_panel ();
- void panel_sized (wxSizeEvent &);
+// void paint_panel ();
+// void panel_sized (wxSizeEvent &);
void timer ();
void calculate_sizes ();
void player_change (ChangeType type, int, bool);
boost::shared_ptr<Film> _film;
boost::shared_ptr<Player> _player;
- /** The area that we put our image in */
- wxPanel* _panel;
+ GLView* _gl_view;
wxTimer _timer;
bool _coalesce_player_changes;
std::list<int> _pending_player_changes;
/** Size of our output (including padding if we have any) */
dcp::Size _out_size;
- /** Size of the panel that we have available */
- dcp::Size _panel_size;
RtAudio _audio;
int _audio_channels;
using std::string;
using std::cout;
using boost::shared_ptr;
+using namespace dcpomatic;
FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<TextContent> caption)
: wxDialog (parent, wxID_ANY, _("Fonts"))
#include <boost/date_time/posix_time/posix_time.hpp>
#include <map>
+namespace dcpomatic {
+ class Screen;
+}
+
class Cinema;
-class Screen;
class Film;
class ScreensPanel;
class KDMTimingPanel;
using std::make_pair;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
ScreensPanel::ScreensPanel (wxWindow* parent)
: wxPanel (parent, wxID_ANY)
#include <map>
class Cinema;
-class Screen;
+
+namespace dcpomatic {
+ class Screen;
+}
class ScreensPanel : public wxPanel
{
explicit ScreensPanel (wxWindow* parent);
~ScreensPanel ();
- std::list<boost::shared_ptr<Screen> > screens () const;
+ std::list<boost::shared_ptr<dcpomatic::Screen> > screens () const;
void setup_sensitivity ();
boost::signals2::signal<void ()> ScreensChanged;
private:
void add_cinemas ();
void add_cinema (boost::shared_ptr<Cinema>);
- boost::optional<wxTreeItemId> add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);
+ boost::optional<wxTreeItemId> add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<dcpomatic::Screen>);
void add_cinema_clicked ();
void edit_cinema_clicked ();
void remove_cinema_clicked ();
wxTreeItemId _root;
typedef std::map<wxTreeItemId, boost::shared_ptr<Cinema> > CinemaMap;
- typedef std::map<wxTreeItemId, boost::shared_ptr<Screen> > ScreenMap;
+ typedef std::map<wxTreeItemId, boost::shared_ptr<dcpomatic::Screen> > ScreenMap;
CinemaMap _cinemas;
ScreenMap _screens;
full_config_dialog.cc
gain_calculator_dialog.cc
gdc_certificate_panel.cc
+ gl_view.cc
hints_dialog.cc
html_dialog.cc
initial_setup_dialog.cc
conf.check_cfg(msg='Checking for wxWidgets using gtk2-unicode-3.0',
package='',
path=wx_config,
- args='--cppflags --cxxflags --libs %s' % wx_libs,
+ args='--cppflags --cxxflags --libs %s --gl-libs' % wx_libs,
uselib_store='WXWIDGETS',
mandatory=True)
except:
conf.check_cfg(msg='Checking for wxWidgets using wx-config-3.0-gtk2',
package='',
path=wx_config,
- args='--cppflags --cxxflags --libs %s' % wx_libs,
+ args='--cppflags --cxxflags --libs %s --gl-libs' % wx_libs,
uselib_store='WXWIDGETS',
mandatory=True)
except:
conf.check_cfg(msg='Checking for wxWidgets using wx-config',
package='',
path=wx_config,
- args='--cppflags --cxxflags --libs %s' % wx_libs,
+ args='--cppflags --cxxflags --libs %s --gl-libs' % wx_libs,
uselib_store='WXWIDGETS',
mandatory=True)