94 lines
1.0 KiB
Bash
94 lines
1.0 KiB
Bash
#!/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:
|