bool CodecList::operator== (const CodecList & c) const { CodecList::const_iterator it2 = c.begin (); if (codecs.size () != c.codecs.size ()) return false; for (const_iterator it = begin (); it != end (); it++) { if ((*it) != (*it2)) return false; it2++; } return true; }
//---------- map<string, Codec> getCodecList(bool returnOnlyValid) { ofxSquash::initialize(); CodecList codecs; squash_foreach_codec(populateCodecListCallback, &codecs); if (returnOnlyValid) { //erase invalid codecs for (auto it = codecs.begin(); it != codecs.end(); ) { if (it->second.isValid()) { it++; } else { it = codecs.erase(it); } } } return codecs; }
void CodecList::append (CodecList& other) { codecs.insert (end (), other.begin (), other.end ()); }