PipelineDataCommon.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #pragma once
  2. #include <cstring>
  3. #include <cstdint>
  4. using UINT = uint32_t;
  5. enum PIPELINE_MAINKEY
  6. {
  7. PIPELINE_MKEY_MEMMORY,
  8. PIPELINE_MKEY_IMAGE,
  9. PIPELINE_MKEY_LIST,
  10. PIPELINE_MKEY_END,
  11. };
  12. enum PIPELINE_MEMMORY_SUBKEY
  13. {
  14. PIPELINE_SKEY_MEMMORY_DEFAULT,
  15. };
  16. enum PIPELINE_IMAGE_SUBKEY
  17. {
  18. PIPELINE_SKEY_IMAGE_2D_GRAY,
  19. PIPELINE_SKEY_IMAGE_2D_RGB,
  20. PIPELINE_MKEY_IMAGE_END,
  21. };
  22. enum PIPELINE_LIST_SUBKEY
  23. {
  24. PIPELINE_SKEY_LIST_INT,
  25. PIPELINE_SKEY_LIST_FLOAT,
  26. PIPELINE_SKEY_LIST_DOUBLE,
  27. PIPELINE_SKEY_LIST_POINT,
  28. PIPELINE_MKEY_LIST_END,
  29. };
  30. //PIPELINE_SKEY_MEMORY
  31. typedef struct _PLMemory
  32. {
  33. PIPELINE_MAINKEY nMainKey;
  34. PIPELINE_MEMMORY_SUBKEY nSubKey;
  35. UINT nElementSize;
  36. UINT nElementCount;
  37. _PLMemory()
  38. {
  39. memset(this, 0, sizeof(_PLMemory));
  40. nMainKey = PIPELINE_MKEY_MEMMORY;
  41. nSubKey = PIPELINE_SKEY_MEMMORY_DEFAULT;
  42. }
  43. _PLMemory& operator=(const _PLMemory& fhd)
  44. {
  45. memcpy(this, &fhd, sizeof(_PLMemory));
  46. return *this;
  47. }
  48. }
  49. PIPELINE_MEMORYINFO;
  50. //PIPELINE_SKEY_2D_GRAY
  51. typedef struct _PLImage2DGrayInfo
  52. {
  53. PIPELINE_MAINKEY nMainKey;
  54. PIPELINE_IMAGE_SUBKEY nSubKey;
  55. UINT nWidth;
  56. UINT nHeight;
  57. UINT nBits;
  58. UINT nFrameId;
  59. _PLImage2DGrayInfo()
  60. {
  61. memset(this, 0, sizeof(_PLImage2DGrayInfo));
  62. nMainKey = PIPELINE_MKEY_IMAGE;
  63. nSubKey = PIPELINE_SKEY_IMAGE_2D_GRAY;
  64. }
  65. _PLImage2DGrayInfo& operator=(const _PLImage2DGrayInfo& fhd)
  66. {
  67. memcpy(this, &fhd, sizeof(_PLImage2DGrayInfo));
  68. return *this;
  69. }
  70. }
  71. PIPELINE_2DGRAYIMGINFO;
  72. //PIPELINE_SKEY_2D_GRAY
  73. typedef struct _PLImage2DRGBInfo
  74. {
  75. PIPELINE_MAINKEY nMainKey;
  76. PIPELINE_IMAGE_SUBKEY nSubKey;
  77. unsigned int nWidth;
  78. unsigned int nHeight;
  79. unsigned int nBitsperSample;
  80. unsigned int nSamplesperPixel;
  81. unsigned int nPlanarConfiguration;
  82. unsigned int nFrameId;
  83. _PLImage2DRGBInfo()
  84. {
  85. memset(this, 0, sizeof(_PLImage2DRGBInfo));
  86. nMainKey = PIPELINE_MKEY_IMAGE;
  87. nSubKey = PIPELINE_SKEY_IMAGE_2D_RGB;
  88. }
  89. _PLImage2DRGBInfo& operator=(const _PLImage2DRGBInfo& fhd)
  90. {
  91. memcpy(this, &fhd, sizeof(_PLImage2DRGBInfo));
  92. return *this;
  93. }
  94. }
  95. PIPELINE_2DRGBIMGINFO;
  96. //PIPELINE_SKEY_FLOATLIST
  97. typedef struct _PLFloatList
  98. {
  99. PIPELINE_MAINKEY nMainKey;
  100. PIPELINE_LIST_SUBKEY nSubKey;
  101. UINT nCount;
  102. _PLFloatList()
  103. {
  104. memset(this, 0, sizeof(_PLFloatList));
  105. nMainKey = PIPELINE_MKEY_LIST;
  106. nSubKey = PIPELINE_SKEY_LIST_FLOAT;
  107. }
  108. _PLFloatList& operator=(const _PLFloatList& fhd)
  109. {
  110. memcpy(this, &fhd, sizeof(_PLFloatList));
  111. return *this;
  112. }
  113. }
  114. PIPELINE_FLOATLISTINFO;
  115. //PIPELINE_SKEY_INTLIST
  116. typedef struct _PLIntParam
  117. {
  118. PIPELINE_MAINKEY nMainKey;
  119. PIPELINE_LIST_SUBKEY nSubKey;
  120. UINT nCount;
  121. _PLIntParam()
  122. {
  123. memset(this, 0, sizeof(_PLIntParam));
  124. nMainKey = PIPELINE_MKEY_LIST;
  125. nSubKey = PIPELINE_SKEY_LIST_INT;
  126. }
  127. _PLIntParam& operator=(const _PLIntParam& fhd)
  128. {
  129. memcpy(this, &fhd, sizeof(_PLIntParam));
  130. return *this;
  131. }
  132. }
  133. PIPELINE_INTLISTINFO;
  134. //PIPELINE_SKEY_POINTLIST
  135. typedef struct _PLPointList
  136. {
  137. PIPELINE_MAINKEY nMainKey;
  138. PIPELINE_LIST_SUBKEY nSubKey;
  139. UINT nCount;
  140. _PLPointList()
  141. {
  142. memset(this, 0, sizeof(_PLPointList));
  143. nMainKey = PIPELINE_MKEY_LIST;
  144. nSubKey = PIPELINE_SKEY_LIST_POINT;
  145. }
  146. _PLPointList& operator=(const _PLPointList& fhd)
  147. {
  148. memcpy(this, &fhd, sizeof(_PLPointList));
  149. return *this;
  150. }
  151. }
  152. PIPELINE_POINTLISTINFO;