22ffmpegkit::MediaInformation::MediaInformation(std::shared_ptr<rapidjson::Value> mediaInformationValue, std::shared_ptr<std::vector<std::shared_ptr<ffmpegkit::StreamInformation>>> streams, std::shared_ptr<std::vector<std::shared_ptr<ffmpegkit::Chapter>>> chapters) :
23 _mediaInformationValue{mediaInformationValue}, _streams{streams}, _chapters{chapters} {
27 return getStringFormatProperty(KeyFilename);
31 return getStringFormatProperty(KeyFormat);
35 return getStringFormatProperty(KeyFormatLong);
39 return getStringFormatProperty(KeyStartTime);
43 return getStringFormatProperty(KeyDuration);
47 return getStringFormatProperty(KeySize);
51 return getStringFormatProperty(KeyBitRate);
55 auto formatProperties = getFormatProperties();
56 if (formatProperties->HasMember(KeyTags)) {
57 auto tags = std::make_shared<rapidjson::Value>();
58 *tags = (*formatProperties)[KeyTags];
74 auto allProperties = getAllProperties();
75 if (allProperties->HasMember(key)) {
76 return std::make_shared<std::string>((*allProperties)[key].GetString());
83 auto allProperties = getAllProperties();
84 if (allProperties->HasMember(key)) {
85 return std::make_shared<int64_t>((*allProperties)[key].GetInt64());
92 auto allProperties = getAllProperties();
93 if (allProperties->HasMember(key)) {
94 auto value = std::make_shared<rapidjson::Value>();
95 *value = (*allProperties)[key];
103 auto formatProperties = getFormatProperties();
104 if (formatProperties->HasMember(key)) {
105 return std::make_shared<std::string>((*formatProperties)[key].GetString());
112 auto formatProperties = getFormatProperties();
113 if (formatProperties->HasMember(key)) {
114 return std::make_shared<int64_t>((*formatProperties)[key].GetInt64());
121 auto formatProperties = getFormatProperties();
122 if (formatProperties->HasMember(key)) {
123 auto value = std::make_shared<rapidjson::Value>();
124 *value = (*formatProperties)[key];
132 if (_mediaInformationValue->HasMember(KeyFormatProperties)) {
133 auto mediaProperties = std::make_shared<rapidjson::Value>();
134 *mediaProperties = (*_mediaInformationValue)[KeyFormatProperties];
135 return mediaProperties;
142 if (_mediaInformationValue !=
nullptr) {
143 auto all = std::make_shared<rapidjson::Value>();
144 *all = (*_mediaInformationValue);