home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / amiiprog.zip / MCIDRV.H < prev    next >
Text File  |  1992-07-08  |  10KB  |  185 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* Module Name: MCIDRV.H                                                    */
  4. /*                                                                          */
  5. /* This is the multimedia include file that has the typedefs, defines and   */
  6. /* function prototyes for MCI drivers.                                      */
  7. /*                                                                          */
  8. /* Copyright (c) International Business Machines Corporation 1991, 1992     */
  9. /*                        All Rights Reserved                               */
  10. /*                                                                          */
  11. /****************************************************************************/
  12.  
  13. typedef    USHORT   GID;
  14.  
  15. /****************************************************************************/
  16. /*             MCI Driver  message identifiers                              */
  17. /****************************************************************************/
  18. #define MCIDRV_SAVE                 900
  19. #define MCIDRV_RESTORE              901
  20. #define MCIDRV_SYNC                 902
  21. #define MCIDRV_CHANGERESOURCE       903
  22.  
  23. /*********************************************************************/
  24. /* The following range of message ID's are reserved for internal use */
  25. /*  by MCI drivers                                                   */
  26. /*********************************************************************/
  27. #define MCI_INTERNAL_MESSAGES_START    1000
  28. #define MCI_INTERNAL_MESSAGES_END      1999
  29.  
  30. /*********************************************************************/
  31. /* Flags used by the string parser for command tables                */
  32. /* NOTE: All flags must have an "L" suffix in order to be parsed as  */
  33. /* DWORDs by the resource compiler                                   */
  34. /*********************************************************************/
  35. #define MCI_COMMAND_HEAD                 0x00000001L
  36. #define MCI_END_COMMAND                  0x00000002L
  37. #define MCI_END_COMMAND_LIST             0x00000003L
  38. #define MCI_RETURN                       0x00000004L
  39. #define MCI_STRING                       0x00000005L
  40. #define MCI_FLAG                         0x00000006L
  41. #define MCI_INTEGER                      0x00000007L
  42. #define MCI_CONSTANT                     0x00000008L
  43. #define MCI_CONSTANT_INTEGER             0x00000009L
  44. #define MCI_CONSTANT_STRING              0x0000000AL
  45. #define MCI_END_CONSTANT                 0x0000000BL
  46. #define MCI_DEFAULT_STRING               0x0000000CL
  47. #define MCI_DEFAULT_INTEGER              0x0000000DL
  48. #define MCI_RETURN_TYPE                  0x0000000EL
  49. #define MCI_RETURN_TYPE_STRING           0x0000000FL
  50. #define MCI_END_RETURN_TYPE              0x00000010L
  51. #define MCI_CONSTANT_2                   0x00000011L
  52. #define MCI_END_CONSTANT_2               0x00000012L
  53. #define MCI_CONSTANT_PAIR                0x00000013L
  54. #define MCI_END_CONSTANT_PAIR            0x00000014L
  55. #define MCI_CONSTANT_INTEGER_PAIR        0x00000015L
  56. #define MCI_CONSTANT_STRING_PAIR         0x00000016L
  57.  
  58. /*********************************************************************/
  59. /* Return types supported by mciSendString                           */
  60. /*********************************************************************/
  61. #define MCI_INTEGER_RETURNED                     0x1000
  62. #define MCI_COLONIZED2_RETURN                    0x2000
  63. #define MCI_COLONIZED3_RETURN                    0x3000
  64. #define MCI_COLONIZED4_RETURN                    0x4000
  65. #define MCI_TRUE_FALSE_RETURN                    0x5000
  66. #define MCI_ON_OFF_RETURN                        0x6000
  67. #define MCI_DEVICENAME_RETURN                    0x7000
  68. #define MCI_TIME_FORMAT_RETURN                   0x8000
  69. #define MCI_SPEED_FORMAT_RETURN                  0x9000
  70. #define MCI_MODE_RETURN                          0xA000
  71. #define MCI_MEDIA_TYPE_RETURN                    0xB000
  72. #define MCI_TRACK_TYPE_RETURN                    0xC000
  73. #define MCI_CONNECTOR_TYPE_RETURN                0xD000
  74. #define MCI_CDXA_CHANNEL_DESTINATION_RETURN      0xE000
  75. #define MCI_PREROLL_TYPE_RETURN                  0xF000
  76. #define MCI_FORMAT_TAG_RETURN                    0xF100
  77. #define MCI_SEQ_SYNCHRONIZATION_RETURN           0xF200
  78. #define MCI_VIDEO_QUALITY_RETURN                 0xF300
  79. #define MCI_AUDIO_QUALITY_RETURN                 0xF400
  80. #define MCI_IMAGE_QUALITY_RETURN                 0xF500
  81. #define MCI_VIDEO_COMPRESSION_RETURN             0xF600
  82. #define MCI_AUDIO_COMPRESSION_RETURN             0xF700
  83. #define MCI_IMAGE_COMPRESSION_RETURN             0xF800
  84.  
  85. /*********************************************************************/
  86. /* End of msg text used by mciGetErrorString                         */
  87. /*********************************************************************/
  88. #define MCIERR_MSG_TABLE_END    MCIERR_BASE + 7000
  89.  
  90. /*********************************************************************/
  91. /*                                                                   */
  92. /*  MCI DEVICE shareability categories                               */
  93. /*                                                                   */
  94. /*********************************************************************/
  95. #define FIXEDSINGLECONTEXT            0x0001
  96. #define DYNAMICSINGLECONTEXT          0x0002
  97. #define LIMITEDMULTIPLECONTEXT        0x0003
  98. #define UNLIMITEDMULTIPLECONTEXT      0x0004
  99.  
  100. /*********************************************************************/
  101. /* MCI driver flag for close during exit list processing             */
  102. /*********************************************************************/
  103. #define MCI_CLOSE_EXIT                 0x10000000L
  104.  
  105. /*********************************************************************/
  106. /* MCI driver specific error table resource number base              */
  107. /*********************************************************************/
  108. #define MMERROR_TABLE_BASE      500
  109.  
  110. /*********************************************************************/
  111. /*                                                                   */
  112. /*  MCIDRV_CHANGERESOURCE  message flags                             */
  113. /*                                                                   */
  114. /*********************************************************************/
  115. #pragma pack(1)
  116.  
  117. typedef struct {
  118.    PVOID      pInstance;             /* pointer to device instance   */
  119.    USHORT     usResourceUnits;       /* required resource units      */
  120.    USHORT     usResourceClass;       /* resource class               */
  121.    USHORT     usResourcePriority;    /* resource priority            */
  122. } MCIDRV_CHANGERESOURCE_PARMS;
  123. typedef MCIDRV_CHANGERESOURCE_PARMS  *PMCIDRV_CHANGERESOURCE_PARMS;
  124.  
  125. /*********************************************************************/
  126. /*                                                                   */
  127. /*  MCIDRV_SYNC  message flags                                       */
  128. /*                                                                   */
  129. /*********************************************************************/
  130. #define MCIDRV_SYNC_ENABLE           0x00000100L
  131. #define MCIDRV_SYNC_DISABLE          0x00000200L
  132. #define MCIDRV_SYNC_REC_PULSE        0x00000400L
  133. #define MCIDRV_SYNC_MASTER           0x00000800L
  134.  
  135. typedef struct {
  136.     PVOID   pInstance;       /* pointer to the instance structure    */
  137.     GID     GroupID;         /* pointer to the instance structure    */
  138.     MMTIME  mmTime;          /* Synch pulse time                     */
  139.     HSTREAM hStream;         /* Stream handle                        */
  140. } MCIDRV_SYNC_PARMS;
  141. typedef MCIDRV_SYNC_PARMS *PMCIDRV_SYNC_PARMS;
  142.  
  143.  
  144. /*********************************************************************/
  145. /* contains information for open message for MCI drivers             */
  146. /*********************************************************************/
  147. typedef struct {
  148.     DWORD   dwCallback;    /* call back handle                       */
  149.     WORD    wDeviceID;     /* The device ID assigned to this instance*/
  150.     USHORT  usDeviceType;  /* The device type number                 */
  151.     USHORT  usDeviceOrd;   /* The device ordinal number              */
  152.     PVOID   pInstance;     /* pointer to the instance structure allocated */
  153.                            /* initialized by the driver. The MCI driver   */
  154.                            /* will fill in this parameter.                */
  155.     CHAR    szDevDLLName[260]; /* Character string containing the device  */
  156.                                /* specific DLL name to call for the open. */
  157.                                /* (ie. ACPA.DLL)                          */
  158.     LPSTR   lpstrElementName;/* typically a file name or NULL             */
  159.     USHORT  usDevParmLen;  /* Device parameters data block length.        */
  160.     PVOID   pDevParm;      /* Device parameters data block. This data     */
  161.                            /* block is unique to each type of device.     */
  162.                            /* (ie. LVD "COM1 9600 N 7 1").                */
  163.     PVOID   Reserved0;
  164.     USHORT  usResourceUnitsRequired;  /* number of resource units this instance */
  165.                                       /* requires.                              */
  166.     USHORT  usResourceClass;          /* resource class this instance belongs to*/
  167.     USHORT  usResourcePriority;       /* resource priority for this instance    */
  168.     DWORD   dwParam2;                 /* Pointer to MCI_OPEN structure          */
  169. } MMDRV_OPEN_PARMS;
  170. typedef MMDRV_OPEN_PARMS  *PMMDRV_OPEN_PARMS;
  171.  
  172.  
  173. #pragma pack()
  174. DWORD APIENTRY mdmDriverNotify (WORD    wDeviceID,
  175.                                 HWND    hwnd,
  176.                                 WORD    wMsgType,
  177.                                 WORD    wUserParm,
  178.                                 DWORD   dwMsgParm);
  179.  
  180. DWORD APIENTRY mdmSyncNotify   (PVOID  pInstance,
  181.                                 GID    GroupID,
  182.                                 ULONG  ulSyncTime,
  183.                                 DWORD  dwSyncFlags);
  184.  
  185.