123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- #pragma once
- #include <cstring>
- #include <cstdint>
- using UINT = uint32_t;
- enum PIPELINE_MAINKEY
- {
- PIPELINE_MKEY_MEMMORY,
- PIPELINE_MKEY_IMAGE,
- PIPELINE_MKEY_LIST,
- PIPELINE_MKEY_END,
- };
- enum PIPELINE_MEMMORY_SUBKEY
- {
- PIPELINE_SKEY_MEMMORY_DEFAULT,
- };
- enum PIPELINE_IMAGE_SUBKEY
- {
- PIPELINE_SKEY_IMAGE_2D_GRAY,
- PIPELINE_SKEY_IMAGE_2D_RGB,
- PIPELINE_MKEY_IMAGE_END,
- };
- enum PIPELINE_LIST_SUBKEY
- {
- PIPELINE_SKEY_LIST_INT,
- PIPELINE_SKEY_LIST_FLOAT,
- PIPELINE_SKEY_LIST_DOUBLE,
- PIPELINE_SKEY_LIST_POINT,
- PIPELINE_MKEY_LIST_END,
- };
- //PIPELINE_SKEY_MEMORY
- typedef struct _PLMemory
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_MEMMORY_SUBKEY nSubKey;
- UINT nElementSize;
- UINT nElementCount;
- _PLMemory()
- {
- memset(this, 0, sizeof(_PLMemory));
- nMainKey = PIPELINE_MKEY_MEMMORY;
- nSubKey = PIPELINE_SKEY_MEMMORY_DEFAULT;
- }
- _PLMemory& operator=(const _PLMemory& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLMemory));
- return *this;
- }
- }
- PIPELINE_MEMORYINFO;
- //PIPELINE_SKEY_2D_GRAY
- typedef struct _PLImage2DGrayInfo
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_IMAGE_SUBKEY nSubKey;
- UINT nWidth;
- UINT nHeight;
- UINT nBits;
- UINT nFrameId;
- _PLImage2DGrayInfo()
- {
- memset(this, 0, sizeof(_PLImage2DGrayInfo));
- nMainKey = PIPELINE_MKEY_IMAGE;
- nSubKey = PIPELINE_SKEY_IMAGE_2D_GRAY;
- }
- _PLImage2DGrayInfo& operator=(const _PLImage2DGrayInfo& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLImage2DGrayInfo));
- return *this;
- }
- }
- PIPELINE_2DGRAYIMGINFO;
- //PIPELINE_SKEY_2D_GRAY
- typedef struct _PLImage2DRGBInfo
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_IMAGE_SUBKEY nSubKey;
- unsigned int nWidth;
- unsigned int nHeight;
- unsigned int nBitsperSample;
- unsigned int nSamplesperPixel;
- unsigned int nPlanarConfiguration;
- unsigned int nFrameId;
- _PLImage2DRGBInfo()
- {
- memset(this, 0, sizeof(_PLImage2DRGBInfo));
- nMainKey = PIPELINE_MKEY_IMAGE;
- nSubKey = PIPELINE_SKEY_IMAGE_2D_RGB;
- }
- _PLImage2DRGBInfo& operator=(const _PLImage2DRGBInfo& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLImage2DRGBInfo));
- return *this;
- }
- }
- PIPELINE_2DRGBIMGINFO;
- //PIPELINE_SKEY_FLOATLIST
- typedef struct _PLFloatList
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_LIST_SUBKEY nSubKey;
- UINT nCount;
- _PLFloatList()
- {
- memset(this, 0, sizeof(_PLFloatList));
- nMainKey = PIPELINE_MKEY_LIST;
- nSubKey = PIPELINE_SKEY_LIST_FLOAT;
- }
- _PLFloatList& operator=(const _PLFloatList& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLFloatList));
- return *this;
- }
- }
- PIPELINE_FLOATLISTINFO;
- //PIPELINE_SKEY_INTLIST
- typedef struct _PLIntParam
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_LIST_SUBKEY nSubKey;
- UINT nCount;
- _PLIntParam()
- {
- memset(this, 0, sizeof(_PLIntParam));
- nMainKey = PIPELINE_MKEY_LIST;
- nSubKey = PIPELINE_SKEY_LIST_INT;
- }
- _PLIntParam& operator=(const _PLIntParam& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLIntParam));
- return *this;
- }
- }
- PIPELINE_INTLISTINFO;
- //PIPELINE_SKEY_POINTLIST
- typedef struct _PLPointList
- {
- PIPELINE_MAINKEY nMainKey;
- PIPELINE_LIST_SUBKEY nSubKey;
- UINT nCount;
- _PLPointList()
- {
- memset(this, 0, sizeof(_PLPointList));
- nMainKey = PIPELINE_MKEY_LIST;
- nSubKey = PIPELINE_SKEY_LIST_POINT;
- }
- _PLPointList& operator=(const _PLPointList& fhd)
- {
- memcpy(this, &fhd, sizeof(_PLPointList));
- return *this;
- }
- }
- PIPELINE_POINTLISTINFO;
|