home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / INC / SHDD.INC < prev    next >
Text File  |  1995-08-30  |  12KB  |  223 lines

  1. ;****************************************************************************
  2. ; Module Name: SHDD.H
  3. ;
  4. ; OS/2 2.0 Multimedia Extensions Stream Handler Device Driver Interfaces
  5. ; Block defintions.
  6. ;
  7. ; Copyright (c) International Business Machines Corporation 1990,1991
  8. ;                         All Rights Reserved
  9. ;
  10. ;**************************************************************************  
  11. ;***************************************************************************  
  12. ;                          D E F I N E S                                      
  13. ;***************************************************************************  
  14. ifdef XXXXX                                 ;  Picked up by H2INC only      
  15.                                              ;  when parsed by H2INC.        
  16. endif                                       ;                               
  17. ;***************************************************************************  
  18. ;                        S T R U C T U R E S                                  
  19. ;***************************************************************************  
  20. ;***************************************************************************  
  21. ;****   DDCMD Interface                                                    *  
  22. ;***************************************************************************  
  23. ;  DDCMD Defines   
  24. DDCMD_SETUP    EQU    0 
  25. DDCMD_READ    EQU    1 
  26. DDCMD_WRITE    EQU    2 
  27. DDCMD_STATUS    EQU    3 
  28. DDCMD_CONTROL    EQU    4 
  29. DDCMD_REG_STREAM    EQU    5 
  30. DDCMD_DEREG_STREAM    EQU    6 
  31.  
  32. ddcmd_common_parm    STRUC
  33. comm_ulFunction    DD    ?     ;  Function requested by SH   
  34. comm_hStream    DD    ?        ;  data stream instance       
  35. ddcmd_common_parm    ENDS
  36.  
  37. ddcmd_setup_parm    STRUC
  38. setu_ulFunction    DD    ?     ;  Function requested by SH   
  39. setu_hStream    DD    ?
  40. setu_pSetupParm    DD    ?      ;  see SETUP_PARM struct     
  41. setu_ulSetupParmSize    DD    ? ;  see SETUP_PARM struct     
  42. ddcmd_setup_parm    ENDS
  43.                 ;*********************************************  
  44.                 ;  SETUP_PARM structure                         
  45.                 ;*********************************************  
  46.  
  47. SETUP_PARM    STRUC
  48. setu_parm_ulStreamTime    DD    ? ;  stream time in milliseconds   
  49. setu_parm_ulFlags    DD    ?      ;  various flags (input/output)  
  50.                         ;  NOTE: new fields will be added here                 
  51. SETUP_PARM    ENDS
  52.                 ;*********************************************  
  53.                 ;  ulFlag defines                               
  54.                 ;*********************************************  
  55. SETUP_RECURRING_EVENTS    EQU    00000001H 
  56.                 ;  the device driver sets this flag on return from the       
  57.                 ;  DDCMD_SETUP command if the device driver assumes events   
  58.                 ;  are recurring events---in this case, the stream handler   
  59.                 ;  will not have to re-enable a recurring event each time    
  60.                 ;  the event occurs by sending a DDCMD_CONTROL command to    
  61.                 ;  the device driver.  this is useful when CUE_TIME or       
  62.                 ;  DATA_CUE events are expected to be used as RECURRING      
  63.  
  64. ddcmd_readwrite_parm    STRUC
  65. read_ulFunction    DD    ?     ;  Function requested by SH   
  66. read_hStream    DD    ?
  67. read_pBuffer    DD    ?
  68. read_ulBufferSize    DD    ?
  69. read_pProcessLin    DD    ?
  70. ddcmd_readwrite_parm    ENDS
  71.  
  72. ddcmd_status_parm    STRUC
  73. stat_ulFunction    DD    ?     ;  Function requested by SH   
  74. stat_hStream    DD    ?
  75. stat_pStatus    DD    ?        ;  (output)ptr to current position time   
  76. stat_ulStatusSize    DD    ?   ;  (output)size of position time          
  77. ddcmd_status_parm    ENDS
  78.                 ;*********************************************  
  79.                 ;  STATUS_PARM structure                        
  80.                 ;*********************************************  
  81.  
  82. STATUS_PARM    STRUC
  83. stat_parm_ulTime    DD    ?       ;  current position time in milliseconds       
  84.                         ;  NOTE: new fields will be added here                               
  85. STATUS_PARM    ENDS
  86.  
  87. ddcmd_control_parm    STRUC
  88. cont_ulFunction    DD    ?     ;  Function requested by SH   
  89. cont_hStream    DD    ?
  90. cont_hEvent    DD    ?         ;  used for EVENTS only                   
  91. cont_ulCmd    DD    ?
  92. cont_pParm    DD    ?          ;  see CONTROL_PARM structure    
  93. cont_ulParmSize    DD    ?     ;  see CONTROL_PARM structure   
  94. ddcmd_control_parm    ENDS
  95.                 ;*********************************************  
  96.                 ;  ulCmd defines                                
  97.                 ;*********************************************  
  98.                                           ;  CHANGE and WAIT not implemented                     
  99. DDCMD_START    EQU    1              ;  start device                                        
  100. DDCMD_STOP    EQU    2              ;  stop device and return current position in pParm    
  101. DDCMD_PAUSE    EQU    3              ;  pause device and return current position in pParm   
  102. DDCMD_RESUME    EQU    4              ;  resume device                                       
  103. DDCMD_ENABLE_EVENT    EQU    5              ;  ask PDD to create this event                        
  104. DDCMD_DISABLE_EVENT    EQU    6              ;  ask PDD to purge this event                         
  105. DDCMD_PAUSE_TIME    EQU    7              ;  pause time keeping, but not the stream              
  106. DDCMD_RESUME_TIME    EQU    8              ;  resume time keeping.                                
  107.                 ;*********************************************  
  108.                 ;  CONTROL_PARM structure                       
  109.                 ;*********************************************  
  110.  
  111. CONTROL_PARM    STRUC
  112. cont_parm_ulTime    DD    ?       ;  time in milliseconds                         
  113.                                               ;  SH sets cuetime when ulCmd is ENABLE_EVENT   
  114.                                               ;  PDD returns current time for STOP, PAUSE     
  115. cont_parm_evcb    DB    SIZE TIME_EVCB DUP (?)
  116. CONTROL_PARM    ENDS
  117.  
  118. ddcmd_register_parm    STRUC
  119. regi_ulFunction    DD    ?     ;  Function requested by SH                      
  120. regi_hStream    DD    ?        ;  Stream handle needed @ interrupt time         
  121. regi_ulSysFileNum    DD    ?   ;  Device Handle so pdd can map device instance to hstream   
  122. regi_pSHDEntryPoint    DD    ? ;  Stream handler entry point                    
  123. regi_ulStreamOperation    DD    ? ;  SH input Record or play                    
  124. regi_spcbkey    DB    SIZE SPCBKEY DUP (?)
  125. regi_ulBufSize    DD    ?      ;  PDD output (optional) buffer size in bytes for SPCB   
  126. regi_ulNumBufs    DD    ?      ;  PDD output (optional) # of buffers for SPCB           
  127. regi_ulAddressType    DD    ?  ;  PDD output (required) addr ptr type to data buffer    
  128. regi_ulBytesPerUnit    DD    ? ; PDD output (required)                                  
  129. regi_mmtimePerUnit    DD    ?  ; PDD output (required)                                  
  130. regi_dcbAudio    DB    SIZE E_DCB DUP (?)       ;  SH input Device Control Block   
  131. regi_hid    DD    ?            ;  SH input stream handler id   
  132. ddcmd_register_parm    ENDS
  133.                 ;****************************  
  134.                 ;  ulStreamOperation  defines  
  135.                 ;****************************  
  136. STREAM_OPERATION_MASK    EQU    0C000H 
  137. STREAM_OPERATION_CONSUME    EQU    8000H 
  138. STREAM_OPERATION_PRODUCE    EQU    0C000H 
  139.                 ;******************************************************************************  
  140.                 ;  ulAddressType  defines                                                        
  141.                 ;  The PDD will tell the SH what type of address ptr it expects the data buffer  
  142.                 ;  to be.  The SH will then request this address type to the SSM, so that the    
  143.                 ;  SSM will send the correct type of each buffer request.                        
  144.                 ;******************************************************************************  
  145. ADDRESS_TYPE_VIRTUAL    EQU    0 
  146. ADDRESS_TYPE_PHYSICAL    EQU    1               ; default                    
  147. ADDRESS_TYPE_LINEAR    EQU    2 
  148.  
  149. ddcmd_deregister_parm    STRUC
  150. dere_ulFunction    DD    ?     ;  Function requested by SH   
  151. dere_hStream    DD    ?        ;  Stream handle needed @ interrupt time   
  152. ddcmd_deregister_parm    ENDS
  153. ;***************************************************************************  
  154. ;**** RING 0 Stream Handler SHD Interfaces                                **  
  155. ;***************************************************************************  
  156. ;  RING 0 Stream Handler  SHD's:                                              
  157. SHD_REPORT_INT    EQU    0       ;  PDD reports interrupt has arrived  
  158. SHD_REPORT_EVENT    EQU    1       ;  PDD reports cuetime has arrived    
  159.  
  160. shd_common_parm    STRUC
  161. shdc_ulFunction    DD    ?     ;  Function requested by PDD                 
  162. shdc_hStream    DD    ?        ;  Stream handle needed @ interrupt time     
  163. shd_common_parm    ENDS
  164.  
  165. shd_reportint_parm    STRUC
  166. repi_ulFunction    DD    ?     ;  Function requested by PDD  
  167. repi_hStream    DD    ?        ;  so SH knows which stream to process       
  168. repi_pBuffer    DD    ?        ;  return ptr to last used buffer            
  169. repi_ulFlag    DD    ?         ;  reason for interrupt       
  170. repi_ulStatus    DD    ?       ;  rc or bytes read/written   
  171. repi_ulStreamTime    DD    ?   ;  time in milliseconds of stream position    
  172. shd_reportint_parm    ENDS
  173.                 ;******************  
  174.                 ;  ulFlag settings   
  175.                 ;******************  
  176. ERROR    EQU    80H 
  177. STREAM_STOP_NOW    EQU    40H 
  178. SHD_READ_COMPLETE    EQU    1 
  179. SHD_WRITE_COMPLETE    EQU    2 
  180.  
  181. shd_reportevent_parm    STRUC
  182. repe_ulFunction    DD    ?     ;  Function requested by PDD  
  183. repe_hStream    DD    ?        ;  so SH knows which stream to process       
  184. repe_hEvent    DD    ?         ;  event handle pass back to stream handler  
  185. repe_ulStreamTime    DD    ?   ;  time in milliseconds of stream position    
  186. shd_reportevent_parm    ENDS
  187. ;***************************************************************************  
  188. ;**** RING 3 Stream Handler SHD Interfaces                                **  
  189. ;***************************************************************************  
  190. ;  RING 3 Stream Handler  SHD's: (Uses SpiSendMsg as interface)   
  191. SHC_REPORT_INT    EQU    80000000H    ;  ulMsgType for SHD_REPORT_INT   
  192. SHC_REPORT_EVENT    EQU    80000001H    ;  ulMsgType for SHD_REPORT_EVENT   
  193. ;**********************************************
  194. ;*
  195. ;* MSG_REPORTINT Control Block.
  196. ;*  pMsg field of SpiSendMsg api
  197. ;*
  198. ;*********************************************  
  199.  
  200. MSG_REPORTINT    STRUC
  201. msgrepi_ulMsgLen    DD    ?       ;  Length of structure                       
  202. msgrepi_pBuffer    DD    ?        ;  return ptr to last used buffer            
  203. msgrepi_ulFlag    DD    ?         ;  reason for interrupt                      
  204. msgrepi_ulStatus    DD    ?       ;  rc or bytes read/written                  
  205. msgrepi_ulStreamTime    DD    ?   ;  time in milliseconds of stream position   
  206. MSG_REPORTINT    ENDS
  207.    ;  For ulFlag defines, refer to the _shd_reportint_parm structure   
  208. ;**********************************************
  209. ;*
  210. ;* MSG_REPORTEVENT Control Block.
  211. ;*  pMsg field of SpiSendMsg api
  212. ;*
  213. ;*********************************************  
  214.  
  215. MSG_REPORTEVENT    STRUC
  216. msgrepe_ulMsgLen    DD    ?       ;  Length of structure                        
  217. msgrepe_hevent    DD    ?         ;  event handle pass back to stream handler   
  218. msgrepe_ulStreamTime    DD    ?   ;  time in milliseconds of stream position    
  219. MSG_REPORTEVENT    ENDS
  220. ;***************************************************************************  
  221. ;               F U N C T I O N   P R O T O T Y P E S                         
  222. ;***************************************************************************  
  223.