using std::max;
using std::pair;
using boost::shared_ptr;
+using boost::optional;
using dcp::raw_convert;
using dcp::locale_convert;
signal_changed (ContentProperty::VIDEO_FRAME_RATE);
}
+void
+Content::unset_video_frame_rate ()
+{
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _video_frame_rate = optional<double>();
+ }
+
+ signal_changed (ContentProperty::VIDEO_FRAME_RATE);
+}
+
double
Content::active_video_frame_rate () const
{
void
TimingPanel::set_video_frame_rate ()
{
- double const fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ optional<double> fr;
+ if (_video_frame_rate->GetValue() != wxT("")) {
+ fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ }
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
- i->set_video_frame_rate (fr);
+ if (fr) {
+ i->set_video_frame_rate (*fr);
+ } else {
+ i->unset_video_frame_rate ();
+ }
}
_set_video_frame_rate->Enable (false);