using std::string;
using std::pair;
+using std::min;
using std::max;
using std::cout;
using std::list;
case Film::WITH_SUBTITLES:
case Film::SUBTITLE_OFFSET:
case Film::SUBTITLE_SCALE:
+ update_from_decoder ();
raw_to_display ();
_panel->Refresh ();
_panel->Update ();
_player = f->player ();
_player->disable_audio ();
- /* Don't disable subtitles here as we may need them, and it's nice to be able to turn them
- on and off without needing obtain a new Player.
- */
-
_player->Video.connect (bind (&FilmViewer::process_video, this, _1, _2, _3));
_film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
return;
}
- _player->seek (_player->position() - _film->video_frames_to_time (1));
+ _player->seek (_player->video_position() - _film->video_frames_to_time (1));
get_frame ();
_panel->Refresh ();
_panel->Update ();
get_frame ();
if (_film->length()) {
- int const new_slider_position = 4096 * _player->position() / _film->length();
+ int const new_slider_position = 4096 * _player->video_position() / _film->length();
if (new_slider_position != _slider->GetValue()) {
_slider->SetValue (new_slider_position);
}
}
/* Catch silly values */
- if (_out_size.width < 64) {
- _out_size.width = 64;
- }
+ _out_size.width = max (64, _out_size.width);
+ _out_size.height = max (64, _out_size.height);
_player->set_video_container_size (_out_size);
+ update_from_decoder ();
}
void
/* Force an update to our frame */
wxScrollEvent ev;
slider_moved (ev);
- } else if (p == VideoContentProperty::VIDEO_CROP) {
+ } else if (p == VideoContentProperty::VIDEO_CROP || p == VideoContentProperty::VIDEO_RATIO) {
update_from_decoder ();
}
}
return;
}
- _player->seek_forward ();
get_frame ();
_panel->Refresh ();
_panel->Update ();