4 #include <libavutil/avutil.h>
19 if(value == (
size_t)AV_NOPTS_VALUE)
23 add(propertyVector, key, ss.str());
30 if(value <= AV_NOPTS_VALUE || value >= -(
float)AV_NOPTS_VALUE)
34 add(propertyVector, key, ss.str());
40 propertyVector.push_back(std::make_pair(key, value));
46 add(propertyVector, key, value ?
"True" :
"False");
52 add(propertyVector, key, value.num / (
double)value.den);
57 AVDictionaryEntry* tag = NULL;
58 while((tag = av_dict_get(avdictionnary,
"", tag, AV_DICT_IGNORE_SUFFIX)))
60 metadata.push_back(std::make_pair(tag->key, tag->value));
std::vector< std::pair< std::string, std::string > > PropertyVector
PropertyVector is a vector of pair, because the order of properties matters to us.
void add(PropertyVector &propertyVector, const std::string &key, const size_t &value)
void fillMetadataDictionnary(AVDictionary *avdictionnary, PropertyVector &metadata)
Fill metadata parameter with the given AVDictionary.