#include "content_text.h"
#include "content_video.h"
#include "empty.h"
+#include "enum_indexed_vector.h"
#include "film.h"
#include "image.h"
#include "player_text.h"
boost::optional<dcpomatic::DCPTime> content_time_to_dcp (std::shared_ptr<const Content> content, dcpomatic::ContentTime t) const;
boost::optional<dcpomatic::ContentTime> dcp_to_content_time (std::shared_ptr<const Content> content, dcpomatic::DCPTime t) const;
+ void signal_change(ChangeType type, int property);
+
+ /** First parameter is PENDING, DONE or CANCELLED.
+ * Second parameter is the property.
+ * Third parameter is true if these signals are currently likely to be frequent.
+ */
boost::signals2::signal<void (ChangeType, int, bool)> Change;
/** Emitted when a video frame is ready. These emissions happen in the correct order. */
void emit_audio (std::shared_ptr<AudioBuffers> data, dcpomatic::DCPTime time);
std::shared_ptr<const Playlist> playlist () const;
- /** Mutex to protect the whole Player state. When it's used for the preview we have
+ /** Mutex to protect the most of the Player state. When it's used for the preview we have
seek() and pass() called from the Butler thread and lots of other stuff called
from the GUI thread.
*/
* the size of preview in a window.
*/
boost::atomic<dcp::Size> _video_container_size;
+
+ mutable boost::mutex _black_image_mutex;
std::shared_ptr<Image> _black_image;
/** true if the player should ignore all video; i.e. never produce any */
Empty _black;
Empty _silent;
- ActiveText _active_texts[static_cast<int>(TextType::COUNT)];
+ EnumIndexedVector<ActiveText, TextType> _active_texts;
std::shared_ptr<AudioProcessor> _audio_processor;
- dcpomatic::DCPTime _playback_length;
+ boost::atomic<dcpomatic::DCPTime> _playback_length;
/** Alignment for subtitle images that we create */
Image::Alignment const _subtitle_alignment = Image::Alignment::PADDED;