home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / MUI / MCC_VLab / Developer / c / include / mui / vlab_mcc.h
Encoding:
C/C++ Source or Header  |  1999-05-18  |  4.4 KB  |  179 lines

  1. /*
  2.  
  3.         MCC_VLab © 1999 by Steve Quartly
  4.  
  5.         Registered class of the Magic User Interface.
  6.  
  7.         VLab_mcc.h
  8.  
  9. */
  10.  
  11.  
  12. /*** Include stuff ***/
  13.  
  14. /*** MUI Defines ***/
  15.  
  16. #define MUIC_VLab "VLab.mcc"
  17. #define VLabObject MUI_NewObject(MUIC_VLab
  18.  
  19. #define MUISERIALNR_QUARTLY 31601
  20. #define TAGBASE_QUARTLY ( TAG_USER | ( MUISERIALNR_QUARTLY << 16 ) )
  21. #define TAGBASE_VLAB ( TAGBASE_QUARTLY + 1000 )
  22.  
  23.  
  24. /*** Methods ***/
  25. #define MUIM_VLab_MonitorOn                             ( TAGBASE_VLAB + 2 )
  26. #define MUIM_VLab_MonitorOff                             ( TAGBASE_VLAB + 3 )
  27. #define MUIM_VLab_Grab                                        ( TAGBASE_VLAB + 4 )
  28. #define MUIM_VLab_AllocYUVBuffer                     ( TAGBASE_VLAB + 5 )
  29. #define MUIM_VLab_AllocRGBBuffer                     ( TAGBASE_VLAB + 6 )
  30. #define MUIM_VLab_FreeYUVBuffer                     ( TAGBASE_VLAB + 7 )
  31. #define MUIM_VLab_FreeRGBBuffer                     ( TAGBASE_VLAB + 8 )
  32. #define MUIM_VLab_YUVtoRGB                                 ( TAGBASE_VLAB + 9 )
  33. #define MUIM_VLab_DeInterlace                            ( TAGBASE_VLAB + 10 )
  34.  
  35. #define MUIM_VLabImage_ObtainYUVPointer        ( TAGBASE_VLAB + 11 )
  36. #define MUIM_VLabImage_ReleaseYUVPointer    ( TAGBASE_VLAB + 12 )
  37. #define MUIM_VLabImage_ObtainRGBPointer        ( TAGBASE_VLAB + 13 )
  38. #define MUIM_VLabImage_ReleaseRGBPointer    ( TAGBASE_VLAB + 14 )
  39.  
  40. #define MUIM_VLab_FindHardware                         ( TAGBASE_VLAB + 15 )
  41.  
  42. /*** Method structs ***/
  43. struct MUIP_VLab_Grab
  44. {
  45.     ULONG id; // Method ID.
  46.  
  47.     Object **vlabImage; // Pointer to store the VLab Image Object data.
  48. };
  49.  
  50. struct MUIP_VLab_AllocYUVBuffer
  51. {
  52.     ULONG id; // Method ID.
  53.  
  54.     ULONG **y; // Pointer to store the y data.
  55.     ULONG **u; // Pointer to store the u data.
  56.     ULONG **v; // Pointer to store the v data.
  57.  
  58.     LONG width, height;
  59. };
  60.  
  61. struct MUIP_VLab_FreeYUVBuffer
  62. {
  63.     ULONG id; // Method ID.
  64.  
  65.     ULONG **y; // Pointer to store the y data.
  66.     ULONG **u; // Pointer to store the u data.
  67.     ULONG **v; // Pointer to store the v data.
  68. };
  69.  
  70. struct MUIP_VLab_AllocRGBBuffer
  71. {
  72.     ULONG id; // Method ID.
  73.  
  74.     UBYTE **rgb; // Pointer to store the rgb data.
  75.  
  76.     LONG width, height;
  77. };
  78.  
  79. struct MUIP_VLab_FreeRGBBuffer
  80. {
  81.     ULONG id; // Method ID.
  82.  
  83.     UBYTE **rgb; // Pointer to store the rgb data.
  84. };
  85.  
  86. struct MUIP_VLab_YUVtoRGB
  87. {
  88.     ULONG id; // Method ID.
  89.  
  90.     ULONG *y; // Pointer to store the y data.
  91.     ULONG *u; // Pointer to store the u data.
  92.     ULONG *v; // Pointer to store the v data.
  93.  
  94.     UBYTE *rgb; // Pointer to store the rgb data.
  95.  
  96.     LONG width, height;
  97. };
  98.  
  99. struct MUIP_VLabImage_ObtainYUVPointer
  100. {
  101.     ULONG id; // Method ID.
  102.  
  103.     ULONG **y; // Pointer to store the y data.
  104.     ULONG **u; // Pointer to store the u data.
  105.     ULONG **v; // Pointer to store the v data.
  106. };
  107.  
  108. struct MUIP_VLabImage_ObtainRGBPointer
  109. {
  110.     ULONG id; // Method ID.
  111.  
  112.     ULONG **rgb; // Pointer to store the rgb data.
  113. };
  114.  
  115. struct MUIP_VLab_DeInterlace
  116. {
  117.     ULONG id; // Method ID.
  118.  
  119.     UBYTE *rgb; // Pointer to store the rgb data.
  120.  
  121.     LONG width, height;
  122.  
  123.     LONG modulo;
  124.  
  125.     LONG pixinc;
  126.  
  127.     LONG mode;
  128. };
  129.  
  130. /*** Special method values ***/
  131.  
  132.  
  133. /*** Special method flags ***/
  134.  
  135.  
  136. /*** Attributes ***/
  137. #define MUIA_VLab_Top                                ( TAGBASE_VLAB + 25 )
  138. #define MUIA_VLab_Left                            ( TAGBASE_VLAB + 26 )
  139. #define MUIA_VLab_Width                            ( TAGBASE_VLAB + 27 )
  140. #define MUIA_VLab_Height                        ( TAGBASE_VLAB + 28 )
  141. #define MUIA_VLab_Monitor                     ( TAGBASE_VLAB + 29 )
  142. #define MUIA_VLab_MonitorObject         ( TAGBASE_VLAB + 30 )
  143.  
  144. #define MUIA_VLabImage_Width                ( TAGBASE_VLAB + 31 )
  145. #define MUIA_VLabImage_Height                ( TAGBASE_VLAB + 32 )
  146. #define MUIA_VLabImage_VMemName            ( TAGBASE_VLAB + 33 )
  147.  
  148.  
  149. /*** Special attribute values ***/
  150. #define MUIV_VLab_MonitorStop         0
  151. #define MUIV_VLab_MonitorRun             1
  152.  
  153.  
  154. /*** Structures, Flags & Values ***/
  155.  
  156.  
  157. /*** Configs ***/
  158.  
  159. /*** Errors ***/
  160. #define VLABERR_OK                        0            /* no error, everything OK */
  161. #define VLABERR_ADDRESS                1            /* you passed an illegal buffer-address to VLab_Scan() */
  162. #define VLABERR_NOHARD                2            /* hardware not found           (*) */
  163. #define VLABERR_CLIP                    3            /* you passed an illegal clip-definition to VLab_Scan() */
  164. #define VLABERR_NOVIDEO                4            /* no video signal found        (*) */
  165. #define VLABERR_SCAN                    5            /* error during scan            (*) */
  166. #define VLABERR_CUSTOM                6            /* illegal register or value */
  167. #define VLABERR_INIT                    7            /* error while sending the new value to the hardware */
  168. #define VLABERR_NOMEM                    8            /* not enough memory available  (*)  (v6) */
  169. #define VLABERR_NOIMAGEOBJ        9            /* couldn't create the image object.*/
  170. #define VLABERR_NOWINDOW            10        /* couldn't open the window.*/
  171. #define VLABERR_VMEMFAILURE        11        /* couldn't open the window.*/
  172.  
  173. /* DeInterlace modes.*/
  174. #define DIM_EVEN 0
  175. #define DIM_ODD  1
  176. #define DIM_MIX  2
  177. #define DIM_SET  3
  178.  
  179.