2 Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 #include "check_box.h"
23 #include "content_colour_conversion_dialog.h"
24 #include "content_panel.h"
25 #include "content_widget.h"
26 #include "custom_scale_dialog.h"
27 #include "dcpomatic_button.h"
28 #include "filter_dialog.h"
29 #include "static_text.h"
30 #include "video_panel.h"
32 #include "lib/colour_conversion.h"
33 #include "lib/config.h"
34 #include "lib/dcp_content.h"
35 #include "lib/ffmpeg_content.h"
37 #include "lib/filter.h"
38 #include "lib/frame_rate_change.h"
39 #include "lib/ratio.h"
41 #include "lib/video_content.h"
42 #include <dcp/warnings.h>
43 LIBDCP_DISABLE_WARNINGS
44 #include <wx/spinctrl.h>
45 #include <wx/tglbtn.h>
46 LIBDCP_ENABLE_WARNINGS
47 #include <boost/functional/hash.hpp>
48 #include <boost/unordered_set.hpp>
59 using std::shared_ptr;
60 using std::dynamic_pointer_cast;
62 using boost::optional;
63 using namespace dcpomatic;
64 #if BOOST_VERSION >= 106100
65 using namespace boost::placeholders;
69 VideoPanel::VideoPanel (ContentPanel* p)
70 : ContentSubPanel (p, _("Video"))
79 _type_label = create_label (this, _("Type"), true);
80 _frame_type = new ContentChoice<VideoContent, VideoFrameType> (
82 new wxChoice (this, wxID_ANY),
83 VideoContentProperty::FRAME_TYPE,
85 boost::mem_fn (&VideoContent::frame_type),
86 boost::mem_fn (&VideoContent::set_frame_type),
87 &caster<int, VideoFrameType>,
88 &caster<VideoFrameType, int>
91 _crop_label = create_label (this, _("Crop"), true);
93 #if defined(__WXGTK3__)
94 int const crop_width = 128;
95 int const link_width = 32;
96 int const link_height = 64;
97 #elif defined(__WXGTK20__)
98 int const crop_width = 56;
99 int const link_width = 24;
100 int const link_height = 32;
101 #elif defined(DCPOMATIC_OSX)
102 int const crop_width = 56;
103 int const link_width = 23;
104 int const link_height = 28;
106 int const crop_width = 56;
107 int const link_width = 22;
108 int const link_height = 28;
111 _left_crop_label = create_label (this, _("Left"), true);
112 _left_crop = new ContentSpinCtrl<VideoContent> (
114 new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
115 VideoContentProperty::CROP,
117 boost::mem_fn (&VideoContent::requested_left_crop),
118 boost::mem_fn (&VideoContent::set_left_crop),
119 boost::bind (&VideoPanel::left_crop_changed, this)
122 _left_right_link = new wxToggleButton (this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(link_width, link_height));
123 _left_right_link->SetBitmap (wxBitmap(bitmap_path("link.png"), wxBITMAP_TYPE_PNG));
125 _right_crop_label = create_label (this, _("Right"), true);
126 _right_crop = new ContentSpinCtrl<VideoContent> (
128 new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
129 VideoContentProperty::CROP,
131 boost::mem_fn (&VideoContent::requested_right_crop),
132 boost::mem_fn (&VideoContent::set_right_crop),
133 boost::bind (&VideoPanel::right_crop_changed, this)
136 _top_crop_label = create_label (this, _("Top"), true);
137 _top_crop = new ContentSpinCtrl<VideoContent> (
139 new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
140 VideoContentProperty::CROP,
142 boost::mem_fn (&VideoContent::requested_top_crop),
143 boost::mem_fn (&VideoContent::set_top_crop),
144 boost::bind (&VideoPanel::top_crop_changed, this)
147 _top_bottom_link = new wxToggleButton (this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(link_width, link_height));
148 _top_bottom_link->SetBitmap (wxBitmap(bitmap_path("link.png"), wxBITMAP_TYPE_PNG));
150 _bottom_crop_label = create_label (this, _("Bottom"), true);
151 _bottom_crop = new ContentSpinCtrl<VideoContent> (
153 new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(crop_width, -1)),
154 VideoContentProperty::CROP,
156 boost::mem_fn (&VideoContent::requested_bottom_crop),
157 boost::mem_fn (&VideoContent::set_bottom_crop),
158 boost::bind (&VideoPanel::bottom_crop_changed, this)
161 _fade_in_label = create_label (this, _("Fade in"), true);
162 _fade_in = new Timecode<ContentTime> (this);
164 _fade_out_label = create_label (this, _("Fade out"), true);
165 _fade_out = new Timecode<ContentTime> (this);
167 wxClientDC dc (this);
168 auto size = dc.GetTextExtent (wxT ("A quite long name"));
170 size.SetWidth (size.GetWidth() + 64);
174 _scale_label = create_label (this, _("Scale"), true);
175 _scale_fit = new wxRadioButton (this, wxID_ANY, _("to fit DCP"));
176 _scale_custom = new wxRadioButton (this, wxID_ANY, _("custom"));
177 _scale_custom_edit = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
179 _colour_conversion_label = create_label (this, _("Colour"), true);
180 _colour_conversion = new wxChoice (this, wxID_ANY, wxDefaultPosition, size);
181 _colour_conversion->Append (_("None"));
182 for (auto const& i: PresetColourConversion::all()) {
183 _colour_conversion->Append (std_to_wx (i.name));
186 /// TRANSLATORS: translate the word "Custom" here; do not include the "Colour|" prefix
187 _colour_conversion->Append (S_("Colour|Custom"));
188 _edit_colour_conversion_button = new Button (this, _("Edit..."), wxDefaultPosition, small_button_size(this, _("Edit...")));
190 _range_label = create_label (this, _("Range"), true);
191 _range = new wxChoice (this, wxID_ANY);
192 _range->Append (_("Full (JPEG, 0-255)"));
193 _range->Append (_("Video (MPEG, 16-235)"));
195 _description = new StaticText (this, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
196 auto font = _description->GetFont();
197 font.SetStyle(wxFONTSTYLE_ITALIC);
198 font.SetPointSize(font.GetPointSize() - 1);
199 _description->SetFont(font);
201 _left_crop->wrapped()->SetRange (0, 4096);
202 _top_crop->wrapped()->SetRange (0, 4096);
203 _right_crop->wrapped()->SetRange (0, 4096);
204 _bottom_crop->wrapped()->SetRange (0, 4096);
206 _frame_type->wrapped()->Append (_("2D"));
207 _frame_type->wrapped()->Append (_("3D"));
208 _frame_type->wrapped()->Append (_("3D left/right"));
209 _frame_type->wrapped()->Append (_("3D top/bottom"));
210 _frame_type->wrapped()->Append (_("3D alternate"));
211 _frame_type->wrapped()->Append (_("3D left only"));
212 _frame_type->wrapped()->Append (_("3D right only"));
214 content_selection_changed ();
216 _fade_in->Changed.connect (boost::bind (&VideoPanel::fade_in_changed, this));
217 _fade_out->Changed.connect (boost::bind (&VideoPanel::fade_out_changed, this));
219 _scale_fit->Bind (wxEVT_RADIOBUTTON, boost::bind (&VideoPanel::scale_fit_clicked, this));
220 _scale_custom->Bind (wxEVT_RADIOBUTTON, boost::bind (&VideoPanel::scale_custom_clicked, this));
221 _scale_custom_edit->Bind (wxEVT_BUTTON, boost::bind (&VideoPanel::scale_custom_edit_clicked, this));
222 _colour_conversion->Bind (wxEVT_CHOICE, boost::bind (&VideoPanel::colour_conversion_changed, this));
223 _range->Bind (wxEVT_CHOICE, boost::bind (&VideoPanel::range_changed, this));
224 _edit_colour_conversion_button->Bind (wxEVT_BUTTON, boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
225 _left_right_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::left_right_link_clicked, this));
226 _top_bottom_link->Bind (wxEVT_TOGGLEBUTTON, boost::bind(&VideoPanel::top_bottom_link_clicked, this));
235 VideoPanel::add_to_grid ()
239 add_label_to_sizer (_grid, _type_label, true, wxGBPosition(r, 0));
240 _frame_type->add (_grid, wxGBPosition(r, 1), wxGBSpan(1, 2));
244 auto crop = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
246 add_label_to_sizer (crop, _left_crop_label, true, wxGBPosition (cr, 0));
247 _left_crop->add (crop, wxGBPosition(cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
249 crop->Add (_left_right_link, wxGBPosition(cr, 2), wxGBSpan(2, 1));
251 add_label_to_sizer (crop, _right_crop_label, true, wxGBPosition(cr, 0));
252 _right_crop->add (crop, wxGBPosition(cr, 1));
254 crop->Add (_left_right_link, wxGBPosition(cr, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
255 add_label_to_sizer (crop, _right_crop_label, true, wxGBPosition (cr, 3));
256 _right_crop->add (crop, wxGBPosition (cr, 4), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
259 add_label_to_sizer (crop, _top_crop_label, true, wxGBPosition (cr, 0));
260 _top_crop->add (crop, wxGBPosition (cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
262 crop->Add (_top_bottom_link, wxGBPosition(cr, 2), wxGBSpan(2, 1));
264 add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition(cr, 0));
265 _bottom_crop->add (crop, wxGBPosition(cr, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
267 crop->Add (_top_bottom_link, wxGBPosition(cr, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
268 add_label_to_sizer (crop, _bottom_crop_label, true, wxGBPosition (cr, 3));
269 _bottom_crop->add (crop, wxGBPosition (cr, 4), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
271 add_label_to_sizer (_grid, _crop_label, true, wxGBPosition(r, 0));
272 _grid->Add (crop, wxGBPosition(r, 1));
275 add_label_to_sizer (_grid, _fade_in_label, true, wxGBPosition (r, 0));
276 _grid->Add (_fade_in, wxGBPosition (r, 1), wxGBSpan (1, 3));
279 add_label_to_sizer (_grid, _fade_out_label, true, wxGBPosition (r, 0));
280 _grid->Add (_fade_out, wxGBPosition (r, 1), wxGBSpan (1, 3));
283 add_label_to_sizer (_grid, _scale_label, true, wxGBPosition (r, 0));
285 auto v = new wxBoxSizer (wxVERTICAL);
286 v->Add (_scale_fit, 0, wxBOTTOM, 4);
287 auto h = new wxBoxSizer (wxHORIZONTAL);
288 h->Add (_scale_custom, 1, wxRIGHT | wxALIGN_CENTER_VERTICAL, 6);
289 h->Add (_scale_custom_edit, 0, wxALIGN_CENTER_VERTICAL);
291 _grid->Add (v, wxGBPosition(r, 1));
295 add_label_to_sizer (_grid, _colour_conversion_label, true, wxGBPosition(r, 0));
297 auto s = new wxBoxSizer (wxHORIZONTAL);
298 s->Add (_colour_conversion, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM | wxRIGHT, 6);
299 s->Add (_edit_colour_conversion_button, 0, wxALIGN_CENTER_VERTICAL);
300 _grid->Add (s, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
304 add_label_to_sizer (_grid, _range_label, true, wxGBPosition(r, 0));
305 _grid->Add (_range, wxGBPosition(r, 1), wxGBSpan(1, 2), wxALIGN_CENTER_VERTICAL);
308 _grid->Add (_description, wxGBPosition (r, 0), wxGBSpan (1, 4), wxEXPAND | wxALIGN_CENTER_VERTICAL, 6);
314 VideoPanel::range_changed ()
316 auto vc = _parent->selected_video ();
317 if (vc.size() != 1) {
321 switch (_range->GetSelection()) {
323 vc.front()->video->set_range (VideoRange::FULL);
326 vc.front()->video->set_range (VideoRange::VIDEO);
329 DCPOMATIC_ASSERT (false);
335 VideoPanel::film_changed(FilmProperty property)
338 case FilmProperty::VIDEO_FRAME_RATE:
339 case FilmProperty::CONTAINER:
340 case FilmProperty::RESOLUTION:
341 setup_description ();
342 setup_sensitivity ();
344 case FilmProperty::REEL_TYPE:
345 case FilmProperty::INTEROP:
346 setup_sensitivity ();
355 hash_value (boost::optional<ColourConversion> const & c)
357 boost::hash<string> hasher;
359 return hasher ("none");
361 return hasher (c->identifier());
366 VideoPanel::film_content_changed (int property)
368 auto vc = _parent->selected_video ();
369 shared_ptr<Content> vcs;
370 shared_ptr<FFmpegContent> fcs;
373 fcs = dynamic_pointer_cast<FFmpegContent> (vcs);
376 if (property == ContentProperty::VIDEO_FRAME_RATE ||
377 property == VideoContentProperty::FRAME_TYPE ||
378 property == VideoContentProperty::CROP ||
379 property == VideoContentProperty::CUSTOM_RATIO ||
380 property == VideoContentProperty::CUSTOM_SIZE) {
381 setup_description ();
382 } else if (property == VideoContentProperty::COLOUR_CONVERSION) {
383 boost::unordered_set<optional<ColourConversion>> check;
385 check.insert (i->video->colour_conversion());
388 /* Remove any "Many" entry that we might have added previously. There should
389 * be entries for each preset plus one for "None" and one for "Custom".
391 auto cc = PresetColourConversion::all ();
392 if (_colour_conversion->GetCount() > cc.size() + 2) {
393 _colour_conversion->Delete (_colour_conversion->GetCount() - 1);
396 if (check.size() == 1) {
397 if (vcs && vcs->video->colour_conversion ()) {
398 auto preset = vcs->video->colour_conversion().get().preset();
400 checked_set (_colour_conversion, preset.get() + 1);
402 checked_set (_colour_conversion, cc.size() + 1);
405 checked_set (_colour_conversion, 0);
407 } else if (check.size() > 1) {
408 /* Add a "many" entry and select it as an indication that multiple different
409 * colour conversions are present in the selection.
411 _colour_conversion->Append (_("Many"));
412 checked_set (_colour_conversion, _colour_conversion->GetCount() - 1);
415 setup_sensitivity ();
417 } else if (property == VideoContentProperty::USE) {
418 setup_sensitivity ();
419 } else if (property == VideoContentProperty::FADE_IN) {
422 check.insert (i->video->fade_in ());
425 if (check.size() == 1) {
427 ContentTime::from_frames (vc.front()->video->fade_in(), vc.front()->active_video_frame_rate(_parent->film())),
428 vc.front()->active_video_frame_rate(_parent->film())
433 } else if (property == VideoContentProperty::FADE_OUT) {
436 check.insert (i->video->fade_out ());
439 if (check.size() == 1) {
441 ContentTime::from_frames (vc.front()->video->fade_out(), vc.front()->active_video_frame_rate(_parent->film())),
442 vc.front()->active_video_frame_rate(_parent->film())
447 } else if (property == VideoContentProperty::RANGE) {
449 checked_set (_range, vcs->video->range() == VideoRange::FULL ? 0 : 1);
451 checked_set (_range, 0);
454 setup_sensitivity ();
455 } else if (property == VideoContentProperty::CUSTOM_RATIO || property == VideoContentProperty::CUSTOM_SIZE) {
458 check.insert (i->video->custom_ratio() || i->video->custom_size());
461 if (check.size() == 1) {
462 checked_set (_scale_fit, !vc.front()->video->custom_ratio() && !vc.front()->video->custom_size());
463 checked_set (_scale_custom, vc.front()->video->custom_ratio() || vc.front()->video->custom_size());
465 checked_set (_scale_fit, true);
466 checked_set (_scale_custom, false);
468 setup_sensitivity ();
474 VideoPanel::setup_description ()
476 auto vc = _parent->selected_video ();
478 checked_set (_description, wxT (""));
480 } else if (vc.size() > 1) {
481 checked_set (_description, _("Multiple content selected"));
485 auto d = vc.front()->video->processing_description(_parent->film());
486 size_t lines = count (d.begin(), d.end(), '\n');
488 for (int i = lines; i < 6; ++i) {
492 checked_set (_description, d);
498 VideoPanel::colour_conversion_changed ()
500 auto vc = _parent->selected_video ();
502 int const s = _colour_conversion->GetSelection ();
503 auto all = PresetColourConversion::all ();
505 if (s == int(all.size() + 1)) {
506 edit_colour_conversion_clicked ();
508 for (auto i: _parent->selected_video()) {
510 i->video->unset_colour_conversion ();
511 } else if (s != int(all.size() + 2)) {
512 i->video->set_colour_conversion (all[s - 1].conversion);
520 VideoPanel::edit_colour_conversion_clicked ()
522 auto vc = _parent->selected_video ();
524 ContentColourConversionDialog dialog(this, vc.front()->video->yuv());
525 dialog.set(vc.front()->video->colour_conversion().get_value_or(PresetColourConversion::all().front().conversion));
526 if (dialog.ShowModal() == wxID_OK) {
528 i->video->set_colour_conversion(dialog.get());
531 /* Reset the colour conversion choice */
532 film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
538 VideoPanel::content_selection_changed ()
540 auto video_sel = _parent->selected_video ();
542 _frame_type->set_content (video_sel);
543 _left_crop->set_content (video_sel);
544 _right_crop->set_content (video_sel);
545 _top_crop->set_content (video_sel);
546 _bottom_crop->set_content (video_sel);
548 film_content_changed (ContentProperty::VIDEO_FRAME_RATE);
549 film_content_changed (VideoContentProperty::CROP);
550 film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
551 film_content_changed (VideoContentProperty::FADE_IN);
552 film_content_changed (VideoContentProperty::FADE_OUT);
553 film_content_changed (VideoContentProperty::RANGE);
554 film_content_changed (VideoContentProperty::USE);
555 film_content_changed (VideoContentProperty::CUSTOM_RATIO);
556 film_content_changed (VideoContentProperty::CUSTOM_SIZE);
557 film_content_changed (FFmpegContentProperty::FILTERS);
558 film_content_changed (DCPContentProperty::REFERENCE_VIDEO);
560 setup_sensitivity ();
565 VideoPanel::setup_sensitivity ()
567 auto sel = _parent->selected ();
569 shared_ptr<DCPContent> dcp;
570 if (sel.size() == 1) {
571 dcp = dynamic_pointer_cast<DCPContent> (sel.front ());
574 bool const reference = dcp && dcp->reference_video();
576 bool any_use = false;
577 for (auto i: _parent->selected_video()) {
578 if (i->video && i->video->use()) {
583 bool const enable = !reference && any_use;
586 _frame_type->wrapped()->Enable (false);
587 _left_crop->wrapped()->Enable (false);
588 _right_crop->wrapped()->Enable (false);
589 _top_crop->wrapped()->Enable (false);
590 _bottom_crop->wrapped()->Enable (false);
591 _fade_in->Enable (false);
592 _fade_out->Enable (false);
593 _scale_fit->Enable (false);
594 _scale_custom->Enable (false);
595 _scale_custom_edit->Enable (false);
596 _description->Enable (false);
597 _colour_conversion->Enable (false);
598 _range->Enable (false);
600 auto video_sel = _parent->selected_video ();
601 auto ffmpeg_sel = _parent->selected_ffmpeg ();
602 bool const single = video_sel.size() == 1;
604 _frame_type->wrapped()->Enable (true);
605 _left_crop->wrapped()->Enable (true);
606 _right_crop->wrapped()->Enable (true);
607 _top_crop->wrapped()->Enable (true);
608 _bottom_crop->wrapped()->Enable (true);
609 _fade_in->Enable (!video_sel.empty ());
610 _fade_out->Enable (!video_sel.empty ());
611 _scale_fit->Enable (true);
612 _scale_custom->Enable (true);
613 _scale_custom_edit->Enable (_scale_custom->GetValue());
614 _description->Enable (true);
615 _colour_conversion->Enable (!video_sel.empty());
616 _range->Enable (single && !video_sel.empty() && !dcp);
619 auto vc = _parent->selected_video ();
620 shared_ptr<Content> vcs;
625 if (vcs && vcs->video->colour_conversion ()) {
626 _edit_colour_conversion_button->Enable (!vcs->video->colour_conversion().get().preset());
628 _edit_colour_conversion_button->Enable (false);
634 VideoPanel::fade_in_changed ()
636 auto const hmsf = _fade_in->get();
637 for (auto i: _parent->selected_video()) {
638 auto const vfr = i->active_video_frame_rate(_parent->film());
639 i->video->set_fade_in (dcpomatic::ContentTime(hmsf, vfr).frames_round(vfr));
645 VideoPanel::fade_out_changed ()
647 auto const hmsf = _fade_out->get();
648 for (auto i: _parent->selected_video()) {
649 auto const vfr = i->active_video_frame_rate (_parent->film());
650 i->video->set_fade_out (dcpomatic::ContentTime(hmsf, vfr).frames_round(vfr));
656 VideoPanel::scale_fit_clicked ()
658 for (auto i: _parent->selected_video()) {
659 i->video->set_custom_ratio (optional<float>());
660 i->video->set_custom_size (optional<dcp::Size>());
663 setup_sensitivity ();
668 VideoPanel::scale_custom_clicked ()
670 if (!scale_custom_edit_clicked()) {
671 _scale_fit->SetValue (true);
674 setup_sensitivity ();
679 VideoPanel::scale_custom_edit_clicked ()
681 auto vc = _parent->selected_video().front()->video;
682 CustomScaleDialog dialog(this, vc->size(), _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
683 if (dialog.ShowModal() != wxID_OK) {
687 for (auto i: _parent->selected_video()) {
688 i->video->set_custom_ratio(dialog.custom_ratio());
689 i->video->set_custom_size(dialog.custom_size());
697 VideoPanel::left_right_link_clicked ()
699 if (_left_changed_last) {
700 left_crop_changed ();
702 right_crop_changed ();
708 VideoPanel::top_bottom_link_clicked ()
710 if (_top_changed_last) {
713 bottom_crop_changed ();
719 VideoPanel::left_crop_changed ()
721 _left_changed_last = true;
722 if (_left_right_link->GetValue()) {
723 for (auto const& i: _parent->selected_video()) {
724 i->video->set_right_crop (i->video->requested_left_crop());
731 VideoPanel::right_crop_changed ()
733 _left_changed_last = false;
734 if (_left_right_link->GetValue()) {
735 for (auto const& i: _parent->selected_video()) {
736 i->video->set_left_crop (i->video->requested_right_crop());
743 VideoPanel::top_crop_changed ()
745 _top_changed_last = true;
746 if (_top_bottom_link->GetValue()) {
747 for (auto i: _parent->selected_video()) {
748 i->video->set_bottom_crop (i->video->requested_top_crop());
755 VideoPanel::bottom_crop_changed ()
757 _top_changed_last = false;
758 if (_top_bottom_link->GetValue()) {
759 for (auto i: _parent->selected_video()) {
760 i->video->set_top_crop (i->video->requested_bottom_crop());