Add basic content information, and some other bits.
[dcpomatic.git] / src / wx / film_viewer.h
index 6029c04f32a7c02769f715248ae4a25bce774bb6..e28703fdd89ea9e3cbd9981ac39ead1edbbb103f 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <wx/wx.h>
 #include "lib/film.h"
-#include "lib/decoder_factory.h"
 
 class wxToggleButton;
 class FFmpegPlayer;
@@ -43,6 +42,7 @@ public:
 
 private:
        void film_changed (Film::Property);
+       void film_content_changed (int);
        void paint_panel (wxPaintEvent &);
        void panel_sized (wxSizeEvent &);
        void slider_moved (wxScrollEvent &);
@@ -52,31 +52,35 @@ private:
        void calculate_sizes ();
        void check_play_state ();
        void update_from_raw ();
-       void decoder_changed ();
+       void update_from_decoder ();
        void raw_to_display ();
        void get_frame ();
        void active_jobs_changed (bool);
+       void setup_player ();
 
        boost::shared_ptr<Film> _film;
+       boost::shared_ptr<Player> _player;
 
-       wxBoxSizer* _v_sizer;
+       wxSizer* _v_sizer;
        wxPanel* _panel;
        wxSlider* _slider;
        wxToggleButton* _play_button;
        wxTimer _timer;
 
-       Decoders _decoders;
        boost::shared_ptr<Image> _raw_frame;
        boost::shared_ptr<Subtitle> _raw_sub;
        boost::shared_ptr<Image> _display_frame;
+       int _display_frame_x;
        boost::shared_ptr<RGBPlusAlphaImage> _display_sub;
        Position _display_sub_position;
        bool _got_frame;
 
-       int _out_width;
-       int _out_height;
-       int _panel_width;
-       int _panel_height;
+       /** Size of our output (including padding if we have any) */
+       libdcp::Size _out_size;
+       /** Size that we will make our film (equal to _out_size unless we have padding) */
+       libdcp::Size _film_size;
+       /** Size of the panel that we have available */
+       libdcp::Size _panel_size;
 
        bool _clear_required;
 };