Catch exceptions from RtAudio::startStream() in all cases.
[dcpomatic.git] / src / wx / film_viewer.h
index c467eedc1645d806495ea0d01cf1ddbd59cfed6b..64ac885e37bdcbe73b0637332c8a2007c28534be 100644 (file)
@@ -98,6 +98,7 @@ public:
        void set_outline_subtitles (boost::optional<dcpomatic::Rect<double>>);
        void set_eyes (Eyes e);
        void set_pad_black (bool p);
+       void set_optimise_for_j2k (bool o);
 
        void slow_refresh ();
 
@@ -138,8 +139,8 @@ public:
        }
 
        boost::signals2::signal<void (std::shared_ptr<PlayerVideo>)> ImageChanged;
-       boost::signals2::signal<void (dcpomatic::DCPTime)> Started;
-       boost::signals2::signal<void (dcpomatic::DCPTime)> Stopped;
+       boost::signals2::signal<void ()> Started;
+       boost::signals2::signal<void ()> Stopped;
        /** While playing back we reached the end of the film (emitted from GUI thread) */
        boost::signals2::signal<void ()> Finished;
        /** Emitted from the GUI thread when a lot of frames are being dropped */
@@ -160,6 +161,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;
@@ -187,6 +189,11 @@ private:
 
        boost::optional<int> _dcp_decode_reduction;
 
+       /** true to assume that this viewer is only being used for JPEG2000 sources
+        *  so it can optimise accordingly.
+        */
+       bool _optimise_for_j2k = false;
+
        ClosedCaptionsDialog* _closed_captions_dialog = nullptr;
 
        bool _outline_content = false;