X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_factory.cc;h=bab22b8eb19e14b6179fd27696710c6b630df70c;hb=f87a0f16f8cee026ee33c3a46b93b43d4b3cf5ff;hp=d42491f7f58c16f40b4542a11699edbf041bc107;hpb=080da912e04d156d9260a3a5eead9034d2a72af3;p=dcpomatic.git diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index d42491f7f..bab22b8eb 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -19,8 +19,7 @@ #include #include "ffmpeg_content.h" -#include "still_image_content.h" -#include "moving_image_content.h" +#include "image_content.h" #include "sndfile_content.h" #include "util.h" @@ -28,20 +27,18 @@ using std::string; using boost::shared_ptr; shared_ptr -content_factory (shared_ptr film, shared_ptr node) +content_factory (shared_ptr film, cxml::NodePtr node, int version) { string const type = node->string_child ("Type"); boost::shared_ptr content; if (type == "FFmpeg") { - content.reset (new FFmpegContent (film, node)); - } else if (type == "StillImage") { - content.reset (new StillImageContent (film, node)); - } else if (type == "MovingImage") { - content.reset (new MovingImageContent (film, node)); + content.reset (new FFmpegContent (film, node, version)); + } else if (type == "Image") { + content.reset (new ImageContent (film, node, version)); } else if (type == "Sndfile") { - content.reset (new SndfileContent (film, node)); + content.reset (new SndfileContent (film, node, version)); } return content; @@ -53,7 +50,7 @@ content_factory (shared_ptr film, boost::filesystem::path path) shared_ptr content; if (valid_image_file (path)) { - content.reset (new StillImageContent (film, path)); + content.reset (new ImageContent (film, path)); } else if (SndfileContent::valid_file (path)) { content.reset (new SndfileContent (film, path)); } else {