X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fdb%2Futils%2Fframekey.C;fp=cinelerra-5.1%2Fdb%2Futils%2Fframekey.C;h=cfaa8a0691e5bb7ee8e0a44e0d6de6d3571a23cd;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=0000000000000000000000000000000000000000;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/db/utils/framekey.C b/cinelerra-5.1/db/utils/framekey.C new file mode 100644 index 00000000..cfaa8a06 --- /dev/null +++ b/cinelerra-5.1/db/utils/framekey.C @@ -0,0 +1,29 @@ +#include +#include +#include + +#include "tdb.h" +#include "s.C" + +int main(int ac, char **av) +{ + int ret; setbuf(stdout,0); + theDb db; + db.open(av[1]); + //db.access(av[1], 34543, 0); + if( !db.opened() || db.error() ) exit(1); + + unsigned int id = atoi(av[2]); + if( (ret=db.video_frame.FindId(id)) ) { +printf("id(%d) not found, ret = %d\n", id, ret); + return 1; + } + printf("%6d %f %f %f %f %f\n", db.video_frame.id(), + db.video_frame.Frame_mean(), db.video_frame.Frame_std_dev(), + db.video_frame.Frame_cx(), db.video_frame.Frame_cy(), + db.video_frame.Frame_moment()); + + db.close(); + return 0; +} +