Merge master; specify libdcp-1.0.
[dcpomatic.git] / src / wx / video_panel.cc
index 4605abae72626f9b3cbcb013f03ac1e2a6bea8c1..6a6e694cbe0423a7431cd0636d6f1805a55420d3 100644 (file)
@@ -199,6 +199,7 @@ VideoPanel::VideoPanel (FilmEditor* e)
 
        _frame_type->wrapped()->Append (_("2D"));
        _frame_type->wrapped()->Append (_("3D left/right"));
+       _frame_type->wrapped()->Append (_("3D top/bottom"));
 
        _filters_button->Bind           (wxEVT_COMMAND_BUTTON_CLICKED,   boost::bind (&VideoPanel::edit_filters_clicked, this));
        _colour_conversion_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED,   boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
@@ -210,6 +211,7 @@ VideoPanel::film_changed (Film::Property property)
        switch (property) {
        case Film::CONTAINER:
        case Film::VIDEO_FRAME_RATE:
+       case Film::RESOLUTION:
                setup_description ();
                break;
        default:
@@ -271,7 +273,7 @@ VideoPanel::edit_filters_clicked ()
 void
 VideoPanel::setup_description ()
 {
-       FFmpegContentList vc = _editor->selected_ffmpeg_content ();
+       VideoContentList vc = _editor->selected_video_content ();
        if (vc.empty ()) {
                _description->SetLabel ("");
                return;
@@ -280,7 +282,7 @@ VideoPanel::setup_description ()
                return;
        }
 
-       shared_ptr<FFmpegContent> vcs = vc.front ();
+       shared_ptr<VideoContent> vcs = vc.front ();
 
        wxString d;
 
@@ -297,8 +299,8 @@ VideoPanel::setup_description ()
        }
 
        Crop const crop = vcs->crop ();
-       if ((crop.left || crop.right || crop.top || crop.bottom) && vcs->video_size() != libdcp::Size (0, 0)) {
-               libdcp::Size cropped = vcs->video_size_after_crop ();
+       if ((crop.left || crop.right || crop.top || crop.bottom) && vcs->video_size() != dcp::Size (0, 0)) {
+               dcp::Size cropped = vcs->video_size_after_crop ();
                d << wxString::Format (
                        _("Cropped to %dx%d (%.2f:1)\n"),
                        cropped.width, cropped.height,
@@ -308,11 +310,11 @@ VideoPanel::setup_description ()
        }
 
        Ratio const * ratio = vcs->ratio ();
-       libdcp::Size container_size = fit_ratio_within (_editor->film()->container()->ratio (), _editor->film()->full_frame ());
+       dcp::Size container_size = fit_ratio_within (_editor->film()->container()->ratio (), _editor->film()->full_frame ());
        float const ratio_value = ratio ? ratio->ratio() : vcs->video_size_after_crop().ratio ();
 
        /* We have a specified ratio to scale to */
-       libdcp::Size const scaled = fit_ratio_within (ratio_value, container_size);
+       dcp::Size const scaled = fit_ratio_within (ratio_value, container_size);
        
        d << wxString::Format (
                _("Scaled to %dx%d (%.2f:1)\n"),
@@ -333,7 +335,7 @@ VideoPanel::setup_description ()
        d << wxString::Format (_("Content frame rate %.4f\n"), vcs->video_frame_rate ());
        ++lines;
        FrameRateChange frc (vcs->video_frame_rate(), _editor->film()->video_frame_rate ());
-       d << frc.description << "\n";
+       d << std_to_wx (frc.description) << "\n";
        ++lines;
 
        for (int i = lines; i < 6; ++i) {