Added transcoding information function.
git-svn-id: http://voip.null.ro/svn/yate@1239 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
da3eb4470d
commit
65cb88d817
|
@ -36,6 +36,10 @@
|
|||
; $(index,N,ITEM1,ITEM2,...) = N-th (modulo length of list) item in list
|
||||
; $(rotate,N,ITEM1,ITEM2,...) = list rotated N (modulo length of list) times
|
||||
; $(runid) = the current Engine run identifier
|
||||
; $(transcode,FLAGS,FORMAT1,FORMAT2,...) = list of formats the input can be transcoded into
|
||||
; e - exclude initial formats form generated list
|
||||
; r - allow rate conversion (for use with wideband)
|
||||
; c - allow changing channels number
|
||||
; Note that functions ++, --, index and rotate will automatically update N
|
||||
; if it is a variable in the $varname format.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <yatengine.h>
|
||||
#include <yatephone.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -213,6 +213,17 @@ static void evalFunc(String& str)
|
|||
str.clear();
|
||||
str << Engine::runId();
|
||||
}
|
||||
else if ((sep >= 0) && (str == "transcode")) {
|
||||
str = par.substr(0,sep);
|
||||
par = par.substr(sep+1).trimBlanks();
|
||||
ObjList* fmts = DataTranslator::allFormats(par,
|
||||
(str.find('e') < 0),
|
||||
(str.find('r') < 0),
|
||||
(str.find('c') < 0));
|
||||
str.clear();
|
||||
str.append(fmts,",");
|
||||
delete fmts;
|
||||
}
|
||||
else if ((sep < 0) && str.trimBlanks())
|
||||
str = s_vars.getValue(str);
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue