TLIB documentation
 

tlSourceVideoFile.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
00013 //
00014 /////////////////////////////////////////////////////////////////////////////////
00015 
00016 
00017 #ifndef __TLSOURCEVIDEOFILE_H__
00018 #define __TLSOURCEVIDEOFILE_H__
00019 
00020 
00021 
00022 #include "tlVision.h"
00023 #include "tlSource.h"
00024 
00025 // DirectX headers
00026 #ifndef __TLDIRECTXH__
00027 #define __TLDIRECTXH__
00028 #include <atlbase.h>
00029 #include <qedit.h>
00030 #include <streams.h>
00031 #include <dshow.h>
00032 
00033 #endif
00034 
00035 
00036 
00037 // interface
00038 class tlSourceVideoFile : tlSource
00039 {
00040 private:
00041   char *filename;
00042 
00043   IGraphBuilder  *pGraph;
00044   IMediaControl  *pControl;
00045   IMediaEvent    *pEvent;
00046   ISampleGrabber *pGrabber;
00047   IMediaSeeking  *pSeek;
00048   char           *buffer;
00049   long           evCode;
00050   long           size;
00051   LONGLONG       length;
00052   LONGLONG       current;
00053   
00054 
00055 public:
00056   tlSourceVideoFile  (char *filename);
00057 
00058   int getLength () { return (int)length;  };
00059   int getIndex  () { return (int)current; };
00060 
00061   int open     (char *filename);
00062   int close    ();
00063   int setFrame (int frame);
00064 
00065   virtual int grab        (tlImage *image);
00066   virtual int grab        (tlImage *image, tlRect *rect);
00067   virtual int grabQueued  (tlImage *image);
00068   virtual int grabQueued  (tlImage *image, tlRect *rect);
00069 };
00070 
00071 #endif
00072 


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.