Merge master.
[dcpomatic.git] / src / wx / film_viewer.h
index 74ab9798c8e64d023885ba03f34d01fe0000c88d..950758f61c9f401cd63e28a4473f013e8ab18785 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ class wxToggleButton;
 class FFmpegPlayer;
 class Image;
 class RGBPlusAlphaImage;
-class Subtitle;
+class PlayerVideoFrame;
 
 /** @class FilmViewer
  *  @brief A wx widget to view a preview of a Film.
@@ -41,44 +41,38 @@ public:
        void set_film (boost::shared_ptr<Film>);
 
 private:
-       void film_changed (Film::Property);
-       void paint_panel (wxPaintEvent &);
+       void paint_panel ();
        void panel_sized (wxSizeEvent &);
-       void slider_moved (wxScrollEvent &);
-       void play_clicked (wxCommandEvent &);
-       void timer (wxTimerEvent &);
-       void process_video (boost::shared_ptr<Image>, bool, boost::shared_ptr<Subtitle>);
+       void slider_moved ();
+       void play_clicked ();
+       void timer ();
        void calculate_sizes ();
        void check_play_state ();
-       void update_from_raw ();
-       void decoder_changed ();
-       void raw_to_display ();
-       void get_frame ();
        void active_jobs_changed (bool);
+       void back_clicked ();
+       void forward_clicked ();
+       void player_changed (bool);
+       void set_position_text ();
+       void get (DCPTime, bool);
 
        boost::shared_ptr<Film> _film;
-       boost::shared_ptr<Playlist> _playlist;
+       boost::shared_ptr<Player> _player;
 
        wxSizer* _v_sizer;
        wxPanel* _panel;
        wxSlider* _slider;
+       wxButton* _back_button;
+       wxButton* _forward_button;
+       wxStaticText* _frame_number;
+       wxStaticText* _timecode;
        wxToggleButton* _play_button;
        wxTimer _timer;
 
-       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;
+       boost::shared_ptr<const Image> _frame;
+       DCPTime _position;
 
        /** 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;
+       dcp::Size _out_size;
        /** Size of the panel that we have available */
-       libdcp::Size _panel_size;
-
-       bool _clear_required;
+       dcp::Size _panel_size;
 };