}
-void
-ContentAdvancedDialog::set_video_frame_rate ()
+optional<double>
+ContentAdvancedDialog::video_frame_rate() const
{
- if (_video_frame_rate->GetValue() != wxT("")) {
- _content->set_video_frame_rate (locale_convert<double>(wx_to_std(_video_frame_rate->GetValue())));
- } else {
- _content->unset_video_frame_rate ();
+ if (_video_frame_rate->GetValue() == wxT("")) {
+ return {};
}
+ return locale_convert<double>(wx_to_std(_video_frame_rate->GetValue()));
+}
+
+
+void
+ContentAdvancedDialog::set_video_frame_rate ()
+{
_set_video_frame_rate->Enable (false);
}
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
LIBDCP_ENABLE_WARNINGS
+#include <boost/optional.hpp>
#include <memory>
#include <vector>
ContentAdvancedDialog (wxWindow* parent, std::shared_ptr<Content> content);
bool ignore_video() const;
+
std::vector<Filter const*> filters() {
return _filters_list;
}
+ boost::optional<double> video_frame_rate() const;
+
private:
void edit_filters ();
void filters_changed (std::vector<Filter const *> filters);
if (ffmpeg) {
ffmpeg->set_filters(dialog->filters());
}
+
+ if (dialog->video_frame_rate()) {
+ content->set_video_frame_rate(*dialog->video_frame_rate());
+ } else {
+ content->unset_video_frame_rate();
+ }
}