예제 #1
0
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;
}
예제 #2
0
	//----------
	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;
	}
예제 #3
0
void
CodecList::append (CodecList& other)
{
  codecs.insert (end (), other.begin (), other.end ());
}