+void
+ContentAdvancedDialog::setup_filters ()
+{
+ auto fcs = dynamic_pointer_cast<FFmpegContent>(_content);
+ if (!fcs) {
+ checked_set (_filters, _("None"));
+ _filters->Enable (false);
+ _filters_button->Enable (false);
+ return;
+ }
+
+ auto p = Filter::ffmpeg_string (fcs->filters());
+ if (p.empty()) {
+ checked_set (_filters, _("None"));
+ } else {
+ if (p.length() > 25) {
+ p = p.substr(0, 25) + "...";
+ }
+ checked_set (_filters, p);
+ }
+}
+
+
+void
+ContentAdvancedDialog::edit_filters ()
+{
+ auto fcs = dynamic_pointer_cast<FFmpegContent>(_content);
+ if (!fcs) {
+ return;
+ }
+
+ auto d = new FilterDialog (this, fcs->filters());
+ d->ActiveChanged.connect (bind(&ContentAdvancedDialog::filters_changed, this, _1));
+ d->ShowModal ();
+ d->Destroy ();
+}
+
+
+void
+ContentAdvancedDialog::filters_changed (vector<Filter const *> filters)
+{
+ auto fcs = dynamic_pointer_cast<FFmpegContent>(_content);
+ if (!fcs) {
+ return;
+ }
+
+ fcs->set_filters (filters);
+ setup_filters ();
+}
+
+
+void
+ContentAdvancedDialog::set_video_frame_rate ()
+{
+ 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 ();
+ }
+
+ _set_video_frame_rate->Enable (false);
+}
+
+
+void
+ContentAdvancedDialog::video_frame_rate_changed ()
+{
+ bool enable = true;
+ /* If the user clicks "set" now, with no frame rate entered, it would unset the video
+ frame rate in the selected content. This can't be allowed for some content types.
+ */
+ if (_video_frame_rate->GetValue() == wxT("") && (dynamic_pointer_cast<DCPContent>(_content) || dynamic_pointer_cast<FFmpegContent>(_content))) {
+ enable = false;
+ }
+
+ _set_video_frame_rate->Enable (enable);
+}
+
+
+void
+ContentAdvancedDialog::setup_sensitivity ()
+{
+ _burnt_subtitle->Enable (static_cast<bool>(_content->video));
+ _burnt_subtitle_language->enable (_content->video && _burnt_subtitle->GetValue());
+}
+
+
+void
+ContentAdvancedDialog::burnt_subtitle_changed ()
+{
+ setup_sensitivity ();
+}
+
+
+void
+ContentAdvancedDialog::burnt_subtitle_language_changed ()
+{
+ DCPOMATIC_ASSERT (_content->video);
+ _content->video->set_burnt_subtitle_language (_burnt_subtitle_language->get());
+}
+