+void
+ContentMenu::join ()
+{
+ vector<shared_ptr<Content> > fc;
+ BOOST_FOREACH (shared_ptr<Content> i, _content) {
+ shared_ptr<FFmpegContent> f = dynamic_pointer_cast<FFmpegContent> (i);
+ if (f) {
+ fc.push_back (f);
+ }
+ }
+
+ DCPOMATIC_ASSERT (fc.size() > 1);
+
+ shared_ptr<Film> film = _film.lock ();
+ if (!film) {
+ return;
+ }
+
+ try {
+ shared_ptr<FFmpegContent> joined (new FFmpegContent(fc));
+ film->remove_content (_content);
+ film->examine_and_add_content (joined);
+ } catch (JoinError& e) {
+ error_dialog (_parent, std_to_wx (e.what ()));
+ }
+}
+