X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilm_viewer.h;h=04f8b9f7abcb2bfae7910d1d0ac6efbfe58ce62f;hb=2153a1dab6c49632eec922083773f30a2130ee52;hp=c1c087a14d5d75c93a460585297c9619d1033968;hpb=74fe68e5895654e27a7cf8097917c1e95fa89519;p=dcpomatic.git diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index c1c087a14..04f8b9f7a 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2016 Carl Hetherington 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 PlayerVideoFrame; +class PlayerVideo; /** @class FilmViewer * @brief A wx widget to view a preview of a Film. @@ -36,10 +36,21 @@ class PlayerVideoFrame; class FilmViewer : public wxPanel { public: - FilmViewer (boost::shared_ptr, wxWindow *); + FilmViewer (wxWindow *); void set_film (boost::shared_ptr); + DCPTime position () const { + return _position; + } + + void set_position (DCPTime p); + void set_coalesce_player_changes (bool c); + + void refresh (); + + boost::signals2::signal)> ImageChanged; + private: void paint_panel (); void panel_sized (wxSizeEvent &); @@ -48,18 +59,25 @@ private: void timer (); void calculate_sizes (); void check_play_state (); - void active_jobs_changed (bool); + void active_jobs_changed (boost::optional); void back_clicked (); void forward_clicked (); void player_changed (bool); - void set_position_text (); + void update_position_label (); + void update_position_slider (); void get (DCPTime, bool); + void refresh_panel (); + void setup_sensitivity (); + void film_changed (Film::Property); boost::shared_ptr _film; boost::shared_ptr _player; wxSizer* _v_sizer; wxPanel* _panel; + wxCheckBox* _outline_content; + wxRadioButton* _left_eye; + wxRadioButton* _right_eye; wxSlider* _slider; wxButton* _back_button; wxButton* _forward_button; @@ -67,9 +85,13 @@ private: wxStaticText* _timecode; wxToggleButton* _play_button; wxTimer _timer; + bool _coalesce_player_changes; + bool _pending_player_change; boost::shared_ptr _frame; DCPTime _position; + Position _inter_position; + dcp::Size _inter_size; /** Size of our output (including padding if we have any) */ dcp::Size _out_size; @@ -80,4 +102,7 @@ private: * can get the same one that we got last time. */ bool _last_get_accurate; + + boost::signals2::scoped_connection _film_connection; + boost::signals2::scoped_connection _player_connection; };