~ubuntu-branches/ubuntu/hardy/avidemux/hardy

« back to all changes in this revision

Viewing changes to autononreg/utils/trytoreadall.js

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Jones
  • Date: 2006-04-17 11:54:34 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060417115434-k9fh4wppu080fo9b
Tags: 1:2.1.2-0.0ubuntu1
* New upstream release.
* Sync with Marillat. Ubuntu patches preserved.
* UVF Exception: Malone #39819
* build and install addons/ffv1rec (on i386 only)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//AD  <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
2
 
/************************/
3
 
var basedir="/work/samples/";
4
 
 
5
 
var extension="avi";
6
 
/************************/
7
 
var app = new Avidemux();
8
 
var count;
9
 
var file;
10
 
var reg;
11
 
/* Load file
12
 
*/
13
 
print("DirRead Test Start");
14
 
count=allFilesFrom(basedir);
15
 
reg=new RegExp("\."+extension+"$");
16
 
print("Nb "+count);
17
 
print("Match "+reg);
18
 
for(i=0;i<count;i++)
19
 
{
20
 
        file=nextFile();
21
 
        if(!file.match(reg))
22
 
        {
23
 
                print(file+":does not match");
24
 
                continue;
25
 
        }
26
 
        print(file+":match");
27
 
        //displayInfo(file);
28
 
        /* Process it */
29
 
        app.forceUnpack(); // automatic unpack
30
 
        if(!app.load(file))
31
 
        {
32
 
                displayInfo("Faild to load "+file);
33
 
                continue;
34
 
        }
35
 
}
36
 
print("DirRead Test End");
37
 
 
38
 
/* End of test
39
 
*/