Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vidl2_ffmpeg_istream.h

Go to the documentation of this file.
00001 // This is brl/bbas/vidl2/vidl2_ffmpeg_istream.h
00002 #ifndef vidl2_ffmpeg_istream_h_
00003 #define vidl2_ffmpeg_istream_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief A video input stream using FFMPEG to decoded files
00010 //
00011 // \author Matt Leotta
00012 // \date 21 Dec 2005
00013 //
00014 // \verbatim
00015 //  Modifications
00016 //    Matt Leotta   21 Dec 2005   Adapted from code by Amitha Perera
00017 // \endverbatim
00018 
00019 #include "vidl2_istream.h"
00020 #include <vcl_string.h>
00021 
00022 
00023 //: A video input stream using FFMPEG to decoded files
00024 class vidl2_ffmpeg_istream
00025   : public vidl2_istream
00026 {
00027  public:
00028   //: Constructor - default
00029   vidl2_ffmpeg_istream();
00030 
00031   //: Constructor - from a filename
00032   vidl2_ffmpeg_istream(const vcl_string& filename);
00033 
00034   //: Destructor
00035   virtual ~vidl2_ffmpeg_istream();
00036 
00037   //: Open a new stream using a filename
00038   virtual bool open(const vcl_string& filename);
00039 
00040   //: Close the stream
00041   virtual void close();
00042 
00043   //: Return true if the stream is open for reading
00044   virtual bool is_open() const;
00045 
00046   //: Return true if the stream is in a valid state
00047   virtual bool is_valid() const;
00048 
00049   //: Return true if the stream support seeking
00050   virtual bool is_seekable() const;
00051 
00052   //: Return the current frame number
00053   virtual unsigned int frame_number() const;
00054 
00055   //: Advance to the next frame (but don't acquire an image)
00056   virtual bool advance();
00057 
00058   //: Read the next frame from the stream (advance and acquire)
00059   virtual vidl2_frame_sptr read_frame();
00060 
00061   //: Return the current frame in the stream
00062   virtual vidl2_frame_sptr current_frame();
00063 
00064   //: Seek to the given frame number
00065   // \returns true if successful
00066   virtual bool seek_frame(unsigned int frame_number);
00067 
00068  private:
00069   //: The private implementation (PIMPL) details.
00070   //  This isolates the clients from the ffmpeg details
00071   struct pimpl;
00072   pimpl* is_;
00073 };
00074 
00075 #endif // vidl2_ffmpeg_istream_h_

Generated on Thu Jan 10 14:51:31 2008 for contrib/brl/bbas/vidl2 by  doxygen 1.4.4