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 / mainwindow.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  3KB  |  103 lines

  1. #ifndef MWINDOW_H
  2. #define MWINDOW_H
  3.  
  4. #include "arraylist.h"
  5. #include "settings.inc"
  6. #include "asset.inc"
  7. #include "defaults.inc"
  8. #include "file.inc"
  9. #include "mainmenu.inc"
  10. #include "mainwindow.inc"
  11. #include "mutex.h"
  12. #include "mwindowgui.inc"
  13. #include "playbackengine.inc"
  14. #include "playlist.inc"
  15. #include "theme.inc"
  16. #include "thread.h"
  17. #include "vframe.inc"
  18.  
  19. class Load;
  20. class LoadPrevious;
  21. class LoadThread;
  22.  
  23.  
  24. class MainWindow
  25. {
  26. public:
  27.     MainWindow(ArrayList<char*> *init_playlist);
  28.     ~MainWindow();
  29.  
  30.     void load_defaults();
  31.     void save_defaults();
  32.     int create_objects();
  33.     int run_program();
  34.     int exit_cleanly();
  35.     int reset_parameters();
  36.     int get_canvas_sizes(int width_given);
  37.     int get_full_size(int &full_w, int &full_h);
  38.     int get_yuv_cropping(int &x, int &y, int &w, int &h);
  39.     int set_audio_stream(int stream_number);
  40.     int set_video_stream(int stream_number);
  41.     float get_aspect_ratio();
  42.  
  43. // =================== all operations start here
  44.     int load_file(char *path, int use_locking);
  45.     int close_file();
  46.     int start_playback();
  47.     int stop_playback();
  48.     int frame_forward();
  49.     int frame_backward();
  50.     int original_size(float percent);
  51.  
  52. // Display frame when paused
  53.     int flash_frame(double percentage);
  54.  
  55. // Playback
  56.     int arm_frame();
  57.     int flash_armed_frame();
  58.  
  59.     long samplerate;
  60.     float frame_rate;
  61.     double current_percentage;
  62.     double current_time;
  63.     int every_frame;
  64.     int smp;
  65.     int use_mmx;
  66.     int software_sync;
  67.     long prebuffer_size;
  68. // Streams to read from a multi-stream file
  69.     int video_stream;
  70.     int audio_stream;
  71.  
  72.     ErrorThread *error_thread;
  73.     Defaults *defaults;
  74.     ArrayList<char*> *init_playlist;
  75.     MWindowGUI *gui;
  76.     Asset *asset;   // description of file or 0 if no file loaded
  77. // 0 when no file loaded otherwise pointer to open file
  78.     File *video_file;
  79.     File *audio_file;
  80.     Playlist *playlist;
  81.     PlaybackEngine *engine;
  82.     SettingsMenu *settingsmenu;
  83.     char default_path[1024];
  84.     float aspect_w, aspect_h;   // Aspect ratio of display
  85.     float letter_w, letter_h;   // Letterbox aspect ratio
  86.     int canvas_w, canvas_h;     // Canvas size
  87.     int input_w, input_h;     // Size of source to read
  88. // The frame is expanded to the size of the display aspect ratio
  89. // then cropped to the size of the letterbox aspect ratio.
  90.     int square_pixels; // Ignore aspect ratio if 1
  91.     int crop_letterbox;   // Crop letterbox if 1
  92.     int convert_601;     // Convert luminance
  93.     int audio_priority;
  94.     float actual_framerate; // Actual framerate being achieved.
  95.     Theme *theme;
  96.  
  97. private:
  98. // Default buffer for frame flashes
  99.     VFrame *frame;
  100. };
  101.  
  102. #endif
  103.