{
_playlist->Changed.connect (bind (&Player::playlist_changed, this));
_playlist->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2));
+ _film->Changed.connect (bind (&Player::film_changed, this, _1));
set_video_container_size (_film->container()->size (_film->full_frame ()));
}
}
#ifdef DEBUG_PLAYER
- cout << "= PASS\n";
+ cout << "= PASS " << this << "\n";
#endif
Time earliest_t = TIME_MAX;
Playlist::ContentList content = _playlist->content ();
sort (content.begin(), content.end(), ContentSorter ());
-
+
for (Playlist::ContentList::iterator i = content.begin(); i != content.end(); ++i) {
shared_ptr<Piece> piece (new Piece (*i));
return;
}
- if (p == ContentProperty::START || p == ContentProperty::LENGTH) {
+ if (
+ p == ContentProperty::START || p == ContentProperty::LENGTH ||
+ p == VideoContentProperty::VIDEO_CROP || p == VideoContentProperty::VIDEO_RATIO
+ ) {
+
_have_valid_pieces = false;
+ Changed ();
}
}
Player::playlist_changed ()
{
_have_valid_pieces = false;
+ Changed ();
}
void
_audio_position += _film->audio_frames_to_time (N);
}
-
-
+void
+Player::film_changed (Film::Property p)
+{
+ /* Here we should notice Film properties that affect our output, and
+ alert listeners that our output now would be different to how it was
+ last time we were run.
+ */
+
+ if (
+ p == Film::SCALER || p == Film::WITH_SUBTITLES ||
+ p == Film::SUBTITLE_SCALE || p == Film::SUBTITLE_OFFSET ||
+ p == Film::CONTAINER
+ ) {
+
+ Changed ();
+ }
+}