home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v6.zip / MMPM2TK / TK / INC / SHDD.INC < prev    next >
Text File  |  1993-04-23  |  10KB  |  184 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. ;  DDCMD's:                                                                  
  18. DDCMD_SETUP    EQU    0 
  19. DDCMD_READ    EQU    1 
  20. DDCMD_WRITE    EQU    2 
  21. DDCMD_STATUS    EQU    3 
  22. DDCMD_CONTROL    EQU    4 
  23. DDCMD_REG_STREAM    EQU    5 
  24. DDCMD_DEREG_STREAM    EQU    6 
  25. ;  SHD's:                                                                     
  26. SHD_REPORT_INT    EQU    0       ;  PDD reports interrupt has arrived  
  27. SHD_REPORT_EVENT    EQU    1       ;  PDD reports cuetime has arrived    
  28. ;***************************************************************************  
  29. ;                        S T R U C T U R E S                                  
  30. ;***************************************************************************  
  31. ;*************************************  
  32. ;****   DDCMD's                      *  
  33. ;*************************************  
  34.  
  35. ddcmd_common_parm    STRUC
  36. comm_ulFunction    DD    ?     ;  Function requested by SH   
  37. comm_hStream    DD    ?        ;  data stream instance       
  38. ddcmd_common_parm    ENDS
  39.  
  40. ddcmd_setup_parm    STRUC
  41. setu_ulFunction    DD    ?     ;  Function requested by SH   
  42. setu_hStream    DD    ?
  43. setu_pSetupParm    DD    ?      ;  see SETUP_PARM struct     
  44. setu_ulSetupParmSize    DD    ? ;  see SETUP_PARM struct     
  45. ddcmd_setup_parm    ENDS
  46.                 ;*********************************************  
  47.                 ;  SETUP_PARM structure                         
  48.                 ;*********************************************  
  49.  
  50. SETUP_PARM    STRUC
  51. setu_parm_ulStreamTime    DD    ? ;  stream time in milliseconds   
  52. setu_parm_ulFlags    DD    ?      ;  various flags (input/output)  
  53.                         ;  NOTE: new fields will be added here                 
  54. SETUP_PARM    ENDS
  55.                 ;*********************************************  
  56.                 ;  ulFlag defines                               
  57.                 ;*********************************************  
  58. SETUP_RECURRING_EVENTS    EQU    00000001H 
  59.                 ;  the device driver sets this flag on return from the       
  60.                 ;  DDCMD_SETUP command if the device driver assumes events   
  61.                 ;  are recurring events---in this case, the stream handler   
  62.                 ;  will not have to re-enable a recurring event each time    
  63.                 ;  the event occurs by sending a DDCMD_CONTROL command to    
  64.                 ;  the device driver.  this is useful when CUE_TIME or       
  65.                 ;  DATA_CUE events are expected to be used as RECURRING      
  66.  
  67. ddcmd_readwrite_parm    STRUC
  68. read_ulFunction    DD    ?     ;  Function requested by SH   
  69. read_hStream    DD    ?
  70. read_pBuffer    DD    ?
  71. read_ulBufferSize    DD    ?
  72. ddcmd_readwrite_parm    ENDS
  73.  
  74. ddcmd_status_parm    STRUC
  75. stat_ulFunction    DD    ?     ;  Function requested by SH   
  76. stat_hStream    DD    ?
  77. stat_pStatus    DD    ?        ;  (output)ptr to current position time   
  78. stat_ulStatusSize    DD    ?   ;  (output)size of position time          
  79. ddcmd_status_parm    ENDS
  80.                 ;*********************************************  
  81.                 ;  STATUS_PARM structure                        
  82.                 ;*********************************************  
  83.  
  84. STATUS_PARM    STRUC
  85. stat_parm_ulTime    DD    ?       ;  current position time in milliseconds       
  86.                         ;  NOTE: new fields will be added here                               
  87. STATUS_PARM    ENDS
  88.  
  89. ddcmd_control_parm    STRUC
  90. cont_ulFunction    DD    ?     ;  Function requested by SH   
  91. cont_hStream    DD    ?
  92. cont_hEvent    DD    ?         ;  used for EVENTS only                   
  93. cont_ulCmd    DD    ?
  94. cont_pParm    DD    ?          ;  see CONTROL_PARM structure    
  95. cont_ulParmSize    DD    ?     ;  see CONTROL_PARM structure   
  96. ddcmd_control_parm    ENDS
  97.                 ;*********************************************  
  98.                 ;  ulCmd defines                                
  99.                 ;*********************************************  
  100.                                           ;  CHANGE and WAIT not implemented                     
  101. DDCMD_START    EQU    1                ;  start device                                        
  102. DDCMD_STOP    EQU    2                ;  stop device and return current position in pParm    
  103. DDCMD_PAUSE    EQU    3                ;  pause device and return current position in pParm   
  104. DDCMD_RESUME    EQU    4                ;  resume device                                       
  105. DDCMD_ENABLE_EVENT    EQU    5              ;  ask PDD to create this event                        
  106. DDCMD_DISABLE_EVENT    EQU    6              ;  ask PDD to purge this event                         
  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.                         ;  NOTE: new fields will be added here                                
  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. ddcmd_register_parm    ENDS
  131.                 ;****************************  
  132.                 ;  ulStreamOperation  defines  
  133.                 ;****************************  
  134. STREAM_OPERATION_MASK    EQU    0C000H 
  135. STREAM_OPERATION_CONSUME    EQU    8000H 
  136. STREAM_OPERATION_PRODUCE    EQU    0C000H 
  137.                 ;******************************************************************************  
  138.                 ;  ulAddressType  defines                                                        
  139.                 ;  The PDD will tell the SH what type of address ptr it expects the data buffer  
  140.                 ;  to be.  The SH will then request this address type to the SSM, so that the    
  141.                 ;  SSM will send the correct type of each buffer request.                        
  142.                 ;******************************************************************************  
  143. ADDRESS_TYPE_VIRTUAL    EQU    0 
  144. ADDRESS_TYPE_PHYSICAL    EQU    1               ; default                    
  145. ADDRESS_TYPE_LINEAR    EQU    2 
  146.  
  147. ddcmd_deregister_parm    STRUC
  148. dere_ulFunction    DD    ?     ;  Function requested by SH   
  149. dere_hStream    DD    ?        ;  Stream handle needed @ interrupt time   
  150. ddcmd_deregister_parm    ENDS
  151. ;*************************************  
  152. ;****   SHD's                        *  
  153. ;*************************************  
  154.  
  155. shd_common_parm    STRUC
  156. shdc_ulFunction    DD    ?     ;  Function requested by PDD                 
  157. shdc_hStream    DD    ?        ;  Stream handle needed @ interrupt time     
  158. shd_common_parm    ENDS
  159.  
  160. shd_reportint_parm    STRUC
  161. repi_ulFunction    DD    ?     ;  Function requested by PDD  
  162. repi_hStream    DD    ?        ;  so SH knows which stream to process       
  163. repi_pBuffer    DD    ?        ;  return ptr to last used buffer            
  164. repi_ulFlag    DD    ?         ;  reason for interrupt       
  165. repi_ulStatus    DD    ?       ;  rc or bytes read/written   
  166. repi_ulStreamTime    DD    ?   ;  time in milliseconds of stream position    
  167. shd_reportint_parm    ENDS
  168.                 ;******************  
  169.                 ;  ulFlag settings   
  170.                 ;******************  
  171. ERROR    EQU    80H 
  172. SHD_READ_COMPLETE    EQU    1 
  173. SHD_WRITE_COMPLETE    EQU    2 
  174.  
  175. shd_reportevent_parm    STRUC
  176. repe_ulFunction    DD    ?     ;  Function requested by PDD  
  177. repe_hStream    DD    ?        ;  so SH knows which stream to process       
  178. repe_hEvent    DD    ?         ;  event handle pass back to stream handler  
  179. repe_ulStreamTime    DD    ?   ;  time in milliseconds of stream position    
  180. shd_reportevent_parm    ENDS
  181. ;***************************************************************************  
  182. ;               F U N C T I O N   P R O T O T Y P E S                         
  183. ;***************************************************************************  
  184.