Take Film pointer out of Content.
[dcpomatic.git] / src / wx / video_panel.cc
index 80aac66ea749c3fe01d6648c5e4ad4036a75529e..55c0984a35b65e947ca839d4e9ae5ea9814bb6e5 100644 (file)
@@ -75,7 +75,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        : ContentSubPanel (p, _("Video"))
 {
        _reference = new wxCheckBox (this, wxID_ANY, _("Use this DCP's video as OV and make VF"));
-       _reference_note = new wxStaticText (this, wxID_ANY, _(""));
+       _reference_note = new wxStaticText (this, wxID_ANY, wxT(""));
        _reference_note->Wrap (200);
        wxFont font = _reference_note->GetFont();
        font.SetStyle(wxFONTSTYLE_ITALIC);
@@ -174,10 +174,10 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _description = new wxStaticText (this, wxID_ANY, wxT ("\n \n \n \n \n"), wxDefaultPosition, wxDefaultSize);
        _description->SetFont(font);
 
-       _left_crop->wrapped()->SetRange (0, 1024);
-       _top_crop->wrapped()->SetRange (0, 1024);
-       _right_crop->wrapped()->SetRange (0, 1024);
-       _bottom_crop->wrapped()->SetRange (0, 1024);
+       _left_crop->wrapped()->SetRange (0, 4096);
+       _top_crop->wrapped()->SetRange (0, 4096);
+       _right_crop->wrapped()->SetRange (0, 4096);
+       _bottom_crop->wrapped()->SetRange (0, 4096);
 
        _scale->wrapped()->Clear ();
        BOOST_FOREACH (VideoContentScale const & i, VideoContentScale::all ()) {
@@ -297,11 +297,9 @@ VideoPanel::film_changed (Film::Property property)
        switch (property) {
        case Film::VIDEO_FRAME_RATE:
        case Film::CONTAINER:
-               setup_description ();
-               setup_sensitivity ();
-               break;
        case Film::RESOLUTION:
                setup_description ();
+               setup_sensitivity ();
                break;
        case Film::REEL_TYPE:
        case Film::INTEROP:
@@ -363,8 +361,8 @@ VideoPanel::film_content_changed (int property)
 
                if (check.size() == 1) {
                        _fade_in->set (
-                               ContentTime::from_frames (vc.front()->video->fade_in (), vc.front()->active_video_frame_rate ()),
-                               vc.front()->active_video_frame_rate ()
+                               ContentTime::from_frames (vc.front()->video->fade_in(), vc.front()->active_video_frame_rate(_parent->film())),
+                               vc.front()->active_video_frame_rate(_parent->film())
                                );
                } else {
                        _fade_in->clear ();
@@ -377,8 +375,8 @@ VideoPanel::film_content_changed (int property)
 
                if (check.size() == 1) {
                        _fade_out->set (
-                               ContentTime::from_frames (vc.front()->video->fade_out (), vc.front()->active_video_frame_rate ()),
-                               vc.front()->active_video_frame_rate ()
+                               ContentTime::from_frames (vc.front()->video->fade_out(), vc.front()->active_video_frame_rate(_parent->film())),
+                               vc.front()->active_video_frame_rate(_parent->film())
                                );
                } else {
                        _fade_out->clear ();
@@ -422,7 +420,7 @@ VideoPanel::setup_description ()
                return;
        }
 
-       string d = vc.front()->video->processing_description ();
+       string d = vc.front()->video->processing_description (_parent->film());
        size_t lines = count (d.begin(), d.end(), '\n');
 
        for (int i = lines; i < 6; ++i) {
@@ -506,7 +504,7 @@ VideoPanel::setup_sensitivity ()
        }
 
        string why_not;
-       bool const can_reference = dcp && dcp->can_reference_video (why_not);
+       bool const can_reference = dcp && dcp->can_reference_video (_parent->film(), why_not);
        setup_refer_button (_reference, _reference_note, dcp, can_reference, why_not);
 
        if (_reference->GetValue ()) {