29.07.2011 - fundamental new

This commit is contained in:
peri4
2011-07-29 08:17:24 +04:00
parent b21a0496cd
commit 29190ea465
49 changed files with 4704 additions and 1052 deletions

22
picodec.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include "picodec.h"
PIStringList PICodec::availableCodecs() {
exec("iconv", "-l");
waitForFinish();
PIString str(readOutput());
str.cutLeft(str.find("\n "));
str.replaceAll("\n", "");
return str.split("//");
}
PIByteArray PICodec::exec_iconv(const PIString & from, const PIString & to, const PIByteArray & str) {
tf.open();
tf.clear();
tf << str;
tf.close();
exec("iconv", ("-f=" + from), ("-t=" + to), tf.path());
waitForFinish();
return readOutput();
}