#include "lib/compose.hpp"
#include "lib/string_text_file_content.h"
#include "lib/string_text_file.h"
+#include "lib/dcpomatic_log.h"
#include <wx/wx.h>
#include <wx/notebook.h>
#include <wx/listctrl.h>
using boost::dynamic_pointer_cast;
using boost::optional;
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
-
-ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmViewer* viewer)
+ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> viewer)
: _video_panel (0)
, _audio_panel (0)
, _timeline_dialog (0)
}
if (go_to && Config::instance()->jump_to_selected() && signal_manager) {
- signal_manager->when_idle(boost::bind(&FilmViewer::set_position, _film_viewer, go_to.get().ceil(_film->video_frame_rate())));
+ shared_ptr<FilmViewer> fv = _film_viewer.lock ();
+ DCPOMATIC_ASSERT (fv);
+ signal_manager->when_idle(boost::bind(&FilmViewer::seek, fv.get(), go_to.get().ceil(_film->video_frame_rate()), true));
}
if (_timeline_dialog) {
list<shared_ptr<Content> > content;
try {
- content = content_factory (_film, path);
+ content = content_factory (path);
} catch (exception& e) {
error_dialog (_parent, e.what());
return;
}
try {
- _film->examine_and_add_content (shared_ptr<Content> (new DCPContent (_film, path)));
+ _film->examine_and_add_content (shared_ptr<Content> (new DCPContent (path)));
} catch (exception& e) {
error_dialog (_parent, e.what());
}
try {
BOOST_FOREACH (boost::filesystem::path i, paths) {
- BOOST_FOREACH (shared_ptr<Content> j, content_factory (_film, i)) {
+ BOOST_FOREACH (shared_ptr<Content> j, content_factory(i)) {
_film->examine_and_add_content (j);
}
}