X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilm_viewer.h;h=1fa85a621c9fb85e30e8fa20fe71cf13a505d54d;hb=3d2154bfb513bc6afbedbbe03bfd791d251e25c0;hp=5e5bb791660c0ebfe4d295adf03cfb0c1508908b;hpb=7245e46453a82886739a45bd78fcdf9e8401367c;p=dcpomatic.git diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index 5e5bb7916..1fa85a621 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -25,27 +25,27 @@ #include "video_view.h" -#include "lib/film.h" #include "lib/config.h" +#include "lib/film.h" #include "lib/player_text.h" -#include "lib/timer.h" #include "lib/signaller.h" -#include "lib/warnings.h" +#include "lib/timer.h" +#include +LIBDCP_DISABLE_WARNINGS #include -DCPOMATIC_DISABLE_WARNINGS #include -DCPOMATIC_ENABLE_WARNINGS +LIBDCP_ENABLE_WARNINGS #include -class wxToggleButton; +class Butler; +class ClosedCaptionsDialog; class FFmpegPlayer; class Image; -class RGBPlusAlphaImage; -class PlayerVideo; class Player; -class Butler; -class ClosedCaptionsDialog; +class PlayerVideo; +class RGBPlusAlphaImage; +class wxToggleButton; /** @class FilmViewer @@ -80,6 +80,7 @@ public: dcpomatic::DCPTime position () const { return _video_view->position(); } + boost::optional position_in_content (std::shared_ptr content) const; dcpomatic::DCPTime one_video_frame () const; void start (); @@ -99,6 +100,8 @@ public: void set_eyes (Eyes e); void set_pad_black (bool p); void set_optimise_for_j2k (bool o); + void set_crop_guess (dcpomatic::Rect crop); + void unset_crop_guess (); void slow_refresh (); @@ -133,14 +136,17 @@ public: } void finished (); void image_changed (std::shared_ptr video); + boost::optional> crop_guess () const { + return _crop_guess; + } bool pending_idle_get () const { return _idle_get; } boost::signals2::signal)> ImageChanged; - boost::signals2::signal Started; - boost::signals2::signal Stopped; + boost::signals2::signal Started; + boost::signals2::signal Stopped; /** While playing back we reached the end of the film (emitted from GUI thread) */ boost::signals2::signal Finished; /** Emitted from the GUI thread when a lot of frames are being dropped */ @@ -161,6 +167,7 @@ private: void config_changed (Config::Property); void film_length_change (); void ui_finished (); + void start_audio_stream_if_open (); dcpomatic::DCPTime uncorrected_time () const; Frame average_latency () const; @@ -205,5 +212,7 @@ private: /** true if an get() is required next time we are idle */ bool _idle_get = false; + boost::optional> _crop_guess; + boost::signals2::scoped_connection _config_changed_connection; };