#include "lib/film.h"
#include "lib/transcode_job.h"
#include "lib/exceptions.h"
-#include "lib/ab_transcode_job.h"
#include "lib/job_manager.h"
#include "lib/filter.h"
#include "lib/ratio.h"
break;
case Film::CONTENT:
setup_content ();
- setup_ratios ();
-// setup_ratio ();
setup_subtitle_control_sensitivity ();
setup_show_audio_sensitivity ();
break;
++i;
++n;
}
-
+
if (i == ratios.end()) {
checked_set (_ratio, -1);
} else {
FileChanged ("");
}
- if (_audio_dialog) {
- _audio_dialog->set_film (_film);
- }
-
film_changed (Film::NAME);
film_changed (Film::USE_DCI_NAME);
film_changed (Film::CONTENT);
film_changed (Film::DCI_METADATA);
film_changed (Film::DCP_VIDEO_FRAME_RATE);
- film_content_changed (boost::shared_ptr<Content> (), ContentProperty::START);
- film_content_changed (boost::shared_ptr<Content> (), ContentProperty::LENGTH);
- film_content_changed (boost::shared_ptr<Content> (), VideoContentProperty::VIDEO_CROP);
- film_content_changed (boost::shared_ptr<Content> (), VideoContentProperty::VIDEO_RATIO);
- film_content_changed (boost::shared_ptr<Content> (), AudioContentProperty::AUDIO_GAIN);
- film_content_changed (boost::shared_ptr<Content> (), AudioContentProperty::AUDIO_DELAY);
- film_content_changed (boost::shared_ptr<Content> (), AudioContentProperty::AUDIO_MAPPING);
- film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::SUBTITLE_STREAMS);
- film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::SUBTITLE_STREAM);
- film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::AUDIO_STREAMS);
- film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::AUDIO_STREAM);
- film_content_changed (boost::shared_ptr<Content> (), FFmpegContentProperty::FILTERS);
+ wxListEvent ev;
+ content_selection_changed (ev);
}
/** Updates the sensitivity of lots of widgets to a given value.
_audio_gain_calculate_button->Enable (s);
_show_audio->Enable (s);
_audio_delay->Enable (s);
+ _container->Enable (s);
+ _loop_content->Enable (s);
+ _loop_count->Enable (s);
setup_subtitle_control_sensitivity ();
setup_show_audio_sensitivity ();
_audio_dialog->Destroy ();
_audio_dialog = 0;
}
+
+ shared_ptr<Content> c = selected_content ();
+ if (!c) {
+ return;
+ }
+
+ shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (c);
+ if (!ac) {
+ return;
+ }
_audio_dialog = new AudioDialog (this);
_audio_dialog->Show ();
- _audio_dialog->set_film (_film);
+ _audio_dialog->set_content (ac);
}
void
}
if (selected_summary.empty () && !content.empty ()) {
- /* Select the item of content if non was selected before */
+ /* Select the item of content if none was selected before */
_content->SetItemState (0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
}
{
setup_content_sensitivity ();
shared_ptr<Content> s = selected_content ();
+
+ if (_audio_dialog && s && dynamic_pointer_cast<AudioContent> (s)) {
+ _audio_dialog->set_content (dynamic_pointer_cast<AudioContent> (s));
+ }
+
film_content_changed (s, ContentProperty::START);
film_content_changed (s, ContentProperty::LENGTH);
film_content_changed (s, VideoContentProperty::VIDEO_CROP);
_video_panel->Enable (selection && dynamic_pointer_cast<VideoContent> (selection) && _generally_sensitive);
_audio_panel->Enable (selection && dynamic_pointer_cast<AudioContent> (selection) && _generally_sensitive);
_subtitle_panel->Enable (selection && dynamic_pointer_cast<FFmpegContent> (selection) && _generally_sensitive);
+ _timing_panel->Enable (selection && _generally_sensitive);
}
shared_ptr<Content>