update ffmpeg to 4.1, add sketcher plugin, crikey tweaks, titler colorpicker, keyfram...
[goodguy/cinelerra.git] / cinelerra-5.1 / db / utils / timelinechk.C
1 #include<stdio.h>
2 #include<stdarg.h>
3 #include<time.h>
4
5 #include "tdb.h"
6 #include "s.C"
7
8
9 int main(int ac, char **av)
10 {
11   int ret;  setbuf(stdout,0);
12   theDb db;
13   db.open(av[1]);
14   //db.access(av[1], 34543, 0);
15   if( !db.opened() || db.error() ) exit(1);
16
17   TimelineLoc::rkey_Sequences key(db.timeline);
18   if( !(ret=key.First()) ) {
19     int clip_id = db.timeline.Clip_id();
20     int n = 1;
21     while( !(ret=key.Next()) ) {
22 printf("(%d,%d,%d),",db.timeline.Clip_id(),db.timeline.Sequence_no(),db.timeline.Frame_id());
23       if( clip_id != (int)db.timeline.Clip_id() ) {
24         if( db.clip_set.FindId(clip_id) ) {
25           printf(" broken clip %d\n",clip_id);  exit(1);
26         }
27         printf("clip %d has %d frames\n",clip_id,n);
28         n = 0;
29         clip_id = db.timeline.Clip_id();
30       }
31       ++n;
32     }
33     if( db.clip_set.FindId(clip_id) ) {
34       printf(" broken last %d\n",clip_id);  exit(1);
35     }
36     printf("last %d has %d frames\n",clip_id,n);
37   }
38
39   db.close();
40   return 0;
41 }
42