* @brief Methods to create content objects.
*/
-#include <libcxml/cxml.h>
#include "ffmpeg_content.h"
#include "image_content.h"
#include "sndfile_content.h"
#include "dcp_content.h"
#include "dcp_subtitle_content.h"
#include "util.h"
+#include <libcxml/cxml.h>
+#include <dcp/smpte_subtitle_content.h>
using std::string;
using std::list;
string ext = path.extension().string ();
transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
-
+
if (valid_image_file (path)) {
content.reset (new ImageContent (film, path));
} else if (SndfileContent::valid_file (path)) {
content.reset (new SubRipContent (film, path));
} else if (ext == ".xml") {
content.reset (new DCPSubtitleContent (film, path));
- } else {
+ } else if (ext == ".mxf" && dcp::SMPTESubtitleContent::valid_mxf (path)) {
+ content.reset (new DCPSubtitleContent (film, path));
+ }
+
+ if (!content) {
content.reset (new FFmpegContent (film, path));
}