Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

VideoWriterControler.h

00001 /*
00002  *  Copyright (c) 2000, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Marc Navarro            (mnavarro@wins.uva.nl)
00007  */
00008 
00009 #ifndef VideoWriterControler_h
00010 #define VideoWriterControler_h
00011 
00012 #include <windows.h>
00013 #include <streams.h>
00014 #include <dvdmedia.h>
00015 
00016 #include "IVideoWriterControler.h"
00017 
00018 
00019 class VideoWriterControler : public CUnknown, IVideoWriterControler
00020 {
00021 public:
00022     virtual STDMETHODIMP    SetFrameSizes(int w, int h);
00023     virtual STDMETHODIMP    SetFilterGraph(IFilterGraph* iGraph);
00024     virtual STDMETHODIMP    PutFrame(BYTE *sample);
00025     virtual STDMETHODIMP    StopWriting();
00026 
00027     virtual STDMETHODIMP    GetNextData(BYTE **sample);
00028     virtual STDMETHODIMP    GetDataSizes(int* width, int* height);
00029 
00030     DECLARE_IUNKNOWN;
00031 
00032     static CUnknown * WINAPI CreateInstance(LPUNKNOWN unk, HRESULT *hr);
00033 
00034                     ~VideoWriterControler();
00035 
00036 private:
00037                     VideoWriterControler(LPUNKNOWN unk, HRESULT *hr);
00038 
00039                     // Overriden to say what interfaces we support where
00040     STDMETHODIMP    NonDelegatingQueryInterface(REFIID riid, void ** ppv);
00041 
00042     CCritSec*       _putLock; // put-get synchronization
00043     CCritSec*       _getLock;
00044     CCritSec*       _nextPutLock;
00045     CCritSec*       _nextGetLock;
00046 
00047     BYTE*           _data;
00048     int             _width;
00049     int             _height;
00050 
00051     IMediaControl*  _imCtrl;
00052     IMediaEvent*    _imEvent;
00053     IMediaEventSink* _imEvSink;
00054     int             _stopping;
00055 
00056 };
00057 
00058 #endif

Generated on Tue Jan 8 13:59:18 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001