00001 00006 #ifndef __Stream_hpp__ 00007 #define __Stream_hpp__ 00008 00009 #include "global.hpp" 00010 00011 class Frame; 00012 class GOP; 00013 00014 class Stream { 00015 00016 public: 00017 00018 int getWidth(); 00019 int getHeight(); 00020 00024 unsigned int getMasterGOPCount(); 00025 00029 unsigned int getFrameCount(); 00030 00036 GOP *getMasterGOP(unsigned int patNo); 00037 00042 int fillBuffer(Frame *f); 00043 00048 int freeBuffer(Frame *f); 00049 00054 int fillBuffer(GOP *p); 00055 00060 int freeBuffer(GOP *p); 00061 00067 Frame* getFrame(uint i); 00068 00072 QString getFileName(); 00073 00074 virtual ~Stream(); 00075 00079 virtual GOP* addNextGOP(uint numframes) = 0; 00080 virtual long getFileSize() = 0; 00081 00082 00083 00084 protected: 00085 Stream(const QString &fName, bool preRead = true); 00086 QFile file; 00087 QPtrList <GOP> gopList; 00088 int width; 00089 int height; 00090 unsigned int noFrames; 00091 long fileSize; 00092 }; 00093 00094 00095 #endif /* __Stream_hpp__ */