00001 // This is oxl/oxp/SGIMovieFilePrivates.h 00002 #ifndef SGIMovieFilePrivates_h_ 00003 #define SGIMovieFilePrivates_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // SGIMovieFilePrivates is deliberately undocumented. 00010 // 00011 // \author 00012 // Andrew W. Fitzgibbon, Oxford RRG, 31 Dec 98 00013 // 00014 //----------------------------------------------------------------------------- 00015 00016 #include <vcl_functional.h> 00017 #include <vcl_string.h> 00018 #include <vcl_vector.h> 00019 #include <vcl_map.h> 00020 00021 #include <vcl_iosfwd.h> 00022 00023 struct SGIMV_Variables 00024 { 00025 typedef vcl_map<vcl_string, vcl_string, vcl_less<vcl_string> > VarData; 00026 VarData data; 00027 00028 SGIMV_Variables(vcl_istream& f) { 00029 read(f); 00030 } 00031 SGIMV_Variables() {} 00032 00033 int get_int(char const* s) { return get_int(vcl_string(s)); } 00034 int get_int(vcl_string const& s); 00035 00036 double get_double(char const* s) { return get_double(vcl_string(s)); } 00037 double get_double(vcl_string const& s); 00038 00039 void read(vcl_istream& f); 00040 vcl_ostream& print(vcl_ostream& s) const; 00041 }; 00042 00043 struct SGIMV_FrameIndex 00044 { 00045 int offset; 00046 int size; 00047 }; 00048 00049 struct SGIMV_FrameIndexArray : public vcl_vector<SGIMV_FrameIndex> 00050 { 00051 SGIMV_FrameIndexArray(vcl_istream& f, int n); 00052 SGIMV_FrameIndexArray() {} 00053 }; 00054 00055 struct SGIMovieFilePrivates 00056 { 00057 SGIMovieFilePrivates(char const* f); 00058 ~SGIMovieFilePrivates() { 00059 delete glob; 00060 } 00061 00062 vcl_string filename; 00063 00064 int version; 00065 int width; 00066 int height; 00067 int interlaced; 00068 vcl_string compression; 00069 00070 SGIMV_Variables* glob; 00071 vcl_vector<SGIMV_Variables> audio; 00072 vcl_vector<SGIMV_Variables> video; 00073 00074 vcl_vector<SGIMV_FrameIndexArray> video_indices; 00075 vcl_vector<SGIMV_FrameIndexArray> audio_indices; 00076 vcl_vector<vcl_vector<int> > field_indices; 00077 }; 00078 00079 #endif // SGIMovieFilePrivates_h_
1.5.1