pseudo-algorythmic part 1

This commit is contained in:
Vincent Riquer 2012-02-28 01:01:14 +01:00
parent bd086ada54
commit 194c707172

93
atom Normal file
View File

@ -0,0 +1,93 @@
#!/bin/bash
#parse arguments
#parse config
#check sanity
getFiles() {
:
}
getType() {
:
}
getInfos::MP3() {
:
}
getInfos::Ogg() {
:
}
getInfos::FLAC() {
:
}
getInfos::MPC() {
:
}
getTags() {
#getType
#getInfos::<type>
:
}
encodeFile::MP3() {
#lame
:
}
encodeFile::Ogg() {
#oggenc
:
}
transcodeFile() {
#sox -> wav
for format in $targets["format"]
do
#encodeFile::$format
:
done
#signal and of encoding to parent
}
checkFinished() {
#retrieve info from finished transcodeFile()
#update counters / metadata
:
}
checkLoad() {
#if load > threshold
# decrease concurrency
#elif load < threshold
# increase concurrency
#fi
:
}
readUserInput() {
#read + / - / q(uit) / p(ause)
#initiate shutdown / check load threshold / SIGSTOP all children / SIGCONT all children
:
}
transcodeLauncher() {
checkLoad
checkFinished
#until running processes < max processes
#do
checkLoad
checkFinished
readUserInput
#done
transcodeFile &
#update counter / metadata
}
#UI
# vim:set ts=8,sw=8: