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

RgbDataDstDX.h

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

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