Show audio bit depth in content properties (#559).
[dcpomatic.git] / src / lib / content_factory.cc
index b64c1b9a3d6f383fed236e6e79cf4f8622d86f29..b23a088b4d0cb0d4ac51def352a72ac0b32cad46 100644 (file)
@@ -50,6 +50,7 @@ using std::list;
 using std::make_shared;
 using std::shared_ptr;
 using std::string;
+using std::vector;
 
 
 /** Create a Content object from an XML node.
@@ -66,9 +67,6 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
        std::shared_ptr<Content> content;
 
        if (type == "FFmpeg") {
-               /* SndfileContent is now handled by the FFmpeg code rather than by
-                  separate libsndfile-based code.
-               */
                content = make_shared<FFmpegContent>(node, version, notes);
        } else if (type == "Image") {
                content = make_shared<ImageContent>(node, version);
@@ -83,7 +81,8 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
                                "Stream", 0,
                                node->number_child<int> ("AudioFrameRate"),
                                node->number_child<Frame> ("AudioLength"),
-                               AudioMapping (node->node_child ("AudioMapping"), version)
+                               AudioMapping(node->node_child("AudioMapping"), version),
+                               16
                                )
                        );
 
@@ -107,10 +106,10 @@ content_factory (cxml::ConstNodePtr node, int version, list<string>& notes)
  *  @param path File or directory.
  *  @return Content objects.
  */
-list<shared_ptr<Content>>
+vector<shared_ptr<Content>>
 content_factory (boost::filesystem::path path)
 {
-       list<shared_ptr<Content>> content;
+       vector<shared_ptr<Content>> content;
 
        if (boost::filesystem::is_directory (path)) {
 
@@ -169,7 +168,7 @@ content_factory (boost::filesystem::path path)
 
                if (valid_image_file (path)) {
                        single = make_shared<ImageContent>(path);
-               } else if (ext == ".srt" || ext == ".ssa" || ext == ".ass" || ext == ".stl") {
+               } else if (ext == ".srt" || ext == ".ssa" || ext == ".ass" || ext == ".stl" || ext == ".vtt") {
                        single = make_shared<StringTextFileContent>(path);
                } else if (ext == ".xml") {
                        cxml::Document doc;