std::shared_ptr<VideoContent> video;
std::shared_ptr<AudioContent> audio;
- std::list<std::shared_ptr<TextContent>> text;
+ std::vector<std::shared_ptr<TextContent>> text;
std::shared_ptr<AtmosContent> atmos;
std::shared_ptr<TextContent> only_text () const;
atmos->set_length (examiner->atmos_length());
}
- list<shared_ptr<TextContent>> new_text;
+ vector<shared_ptr<TextContent>> new_text;
for (int i = 0; i < examiner->text_count(TextType::OPEN_SUBTITLE); ++i) {
auto c = make_shared<TextContent>(this, TextType::OPEN_SUBTITLE, TextType::OPEN_SUBTITLE);
}
/** @return TextContents from node or <Text> nodes under node (according to version).
- * The list could be empty if no TextContents are found.
+ * The vector could be empty if no TextContents are found.
*/
-list<shared_ptr<TextContent>>
+vector<shared_ptr<TextContent>>
TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
{
if (version < 34) {
return { make_shared<TextContent>(parent, node, version, notes) };
}
- list<shared_ptr<TextContent>> c;
+ vector<shared_ptr<TextContent>> content;
for (auto i: node->node_children("Text")) {
- c.push_back (make_shared<TextContent>(parent, i, version, notes));
+ content.push_back(make_shared<TextContent>(parent, i, version, notes));
}
- return c;
+ return content;
}
+
TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes)
: ContentPart (parent)
, _use (false)
return _language_is_additional;
}
- static std::list<std::shared_ptr<TextContent>> from_xml (Content* parent, cxml::ConstNodePtr, int version, std::list<std::string>& notes);
+ static std::vector<std::shared_ptr<TextContent>> from_xml(Content* parent, cxml::ConstNodePtr, int version, std::list<std::string>& notes);
private:
friend struct ffmpeg_pts_offset_test;