home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / linux / video / xmovie-1.5.3.tar.gz / xmovie-1.5.3.tar / xmovie-1.5.3 / xmovie / xmovie.C < prev   
C/C++ Source or Header  |  2000-11-29  |  855b  |  41 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "arraylist.h"
  4. #include "filesystem.h"
  5. #include "mainwindow.h"
  6.  
  7. int usage()
  8. {
  9.     printf("XMovie (c) 2000 Adam Williams\n");
  10.     return 0;
  11. }
  12.  
  13. int main(int argc, char *argv[])
  14. {
  15.     ArrayList<char*> init_playlist;
  16.     char *string;
  17.     FileSystem fs;
  18.  
  19.     usage();
  20.     for(int i = 1, j = 0; i < argc; i++, j++)
  21.     {
  22.         init_playlist.append(string = new char[1024]);
  23.         strcpy(string, argv[i]);
  24.         fs.complete_path(string);
  25.     }
  26.  
  27.     {
  28.         MainWindow mwindow(&init_playlist);
  29.         mwindow.create_objects();
  30.  
  31. // only loading the first movie on the command line now
  32. // Possibly load an audio file for merge later.
  33.         if(init_playlist.total) mwindow.load_file(init_playlist.values[0], 0);
  34.         mwindow.run_program();
  35.     }
  36.  
  37.     for(int i = 0; i < init_playlist.total; i++) delete init_playlist.values[i];
  38.     init_playlist.remove_all();
  39.     return 0;
  40. }
  41.