Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

MPEGSource.h

Go to the documentation of this file.
00001 /*************************************************************************
00008  *
00009  * Source code for Real Time Image Library (libRTImage) 
00010  *
00011  * Leeds Vision Group give permission for this code to be copied, modified 
00012  * and distributed within the University of Leeds subject to the following
00013  * conditions:-
00014  *
00015  * - The code is not to be used for commercial gain.
00016  * - The code and use thereof will be attributed to the authors where
00017  *   appropriate (including demonstrations which rely on it's use).
00018  * - All modified, distributions of the source files will retain this header.
00019  *
00020  ****************************************************************************/
00021 
00022 #ifndef MPEG_SOURCE_H
00023 #define MPEG_SOURCE_H
00024 
00025 #include "Image.h"
00026 #include "ImageSource.h"
00027 #include "libmpeg3.h"
00028 
00029 
00030 class MPEGSource : public ImageSource
00040 {
00041 protected:
00042 /* Protected Members */
00043 
00044         mpeg3_t*        file;           
00045 
00046         unsigned char** buff;           
00047 
00048         char            *Y ;            
00049         char            *U ;            
00050         char            *V ;            
00051         
00052         unsigned int    width;          
00053         unsigned int    height;         
00054         long            frames;         
00055         float           framerate;      
00056 public:
00057 /* Public Methods */
00058 
00060         MPEGSource(char* path);
00061 
00062         ~MPEGSource();
00063 
00064         /* Extraction operators */
00065         
00066         virtual ImageSource& operator >> (ImageRGB&);
00067         virtual ImageSource& operator >> (ImageGrey&);
00068         virtual ImageSource& operator >> (Image&);
00069 
00071         void get_size(unsigned int&, unsigned int&);
00072 
00074         int get_no_frames() ;
00075 
00077         int set_frame(long frame_no) ;
00079         void get_framerate(float&);
00080 
00082         bool eof(void) const;
00083 };
00084 
00085 #endif  // MPEG_SOURCE_H

Generated at Fri Aug 13 17:29:21 2004 for libRTImage by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001