Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

RgbDataDstWin.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Stream_RgbDataDstWin_h
00002 #define Impala_Core_Stream_RgbDataDstWin_h
00003 
00004 #include "Core/Stream/RgbDataDst.h"
00005 #include "Link/DXMedia/HxAVIMedia.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Stream
00012 {
00013 
00014 
00015 class RgbDataDstWin : public RgbDataDst
00016 {
00017 public:
00018 
00019     RgbDataDstWin(int dst, std::string dstName, int imageWidth, int imageHeight) :
00020         RgbDataDst(dst, dstName, imageWidth, imageHeight)
00021     {
00022         mWinHandle = 0;
00023         Init();
00024     }
00025 
00026     bool
00027     Valid()
00028     {
00029         if (mWinHandle == 0)
00030             return false;
00031         return true;
00032     }
00033 
00034     void
00035     NextFrame(unsigned char* dataPtr)
00036     {
00037         if (! dataPtr)
00038         {
00039             std::cout << "RgbDataDstWin::nextFrame : dataPtr is null" << std::endl;
00040             return;
00041         }
00042         HxShowDisplay(mWinHandle, dataPtr);
00043     }
00044 
00045     int
00046     WindowManage(int done = 0, char* statusBuf = 0)
00047     {
00048         if (statusBuf)
00049             HxSetCaption(mWinHandle, statusBuf);
00050         done = ! MessagePump();
00051         return done;
00052     }
00053 
00054 private:
00055 
00056     void
00057     Init()
00058     {
00059         if (!(mWinHandle = HxOpenDisplay(mImageWidth, mImageHeight)))
00060             std::cout << "HxOpenDisplay failed" << std::endl;
00061     }
00062 
00063     void* mWinHandle;
00064 };
00065 
00066 } // namespace Stream
00067 } // namespace Core
00068 } // namespace Impala
00069 
00070 #endif

Generated on Fri Mar 19 09:31:18 2010 for ImpalaSrc by  doxygen 1.5.1