home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / inc / evcb.inc < prev    next >
Text File  |  1999-04-30  |  13KB  |  212 lines

  1. ;***************************************************************************  
  2. ;                                                                             
  3. ;  Module Name: EVCB.H                                                        
  4. ;                                                                             
  5. ;  OS/2 2.0 Multimedia Extensions Sync/Stream Manager Event Control           
  6. ;  Block defintitions.                                                        
  7. ;                                                                             
  8. ;  Copyright (c) International Business Machines Corporation 1991, 1992       
  9. ;                         All Rights Reserved                                 
  10. ;                                                                             
  11. ;***************************************************************************  
  12. ;**********************************************
  13. ;* List of Implicit events:
  14. ;*    EVENT_EOS                 - Use IMPL_EVCB
  15. ;*    EVENT_ERROR               - Use IMPL_EVCB
  16. ;*    EVENT_STREAM_STOPPED      - Use IMPL_EVCB
  17. ;*    EVENT_SYNC_PREROLLED      - Use IMPL_EVCB
  18. ;*    EVENT_PLAYLISTMESSAGE     - Use PLAYL_EVCB
  19. ;*    EVENT_PLAYLISTCUEPOINT    - Use PLAYL_EVCB
  20. ;*    EVENT_QUEUE_OVERFLOW      - Use IMPL_EVCB
  21. ;*********************************************  
  22. ;**********************************************
  23. ;* List of Explicit events:
  24. ;*    EVENT_SYNCOVERRUN         - Use OVRU_EVCB
  25. ;*    EVENT_CUE_TIME            - Use TIME_EVCB
  26. ;*    EVENT_CUE_DATA            - Use DATA_EVCB
  27. ;*    EVENT_DATAUNDERRUN        - Use EVCB
  28. ;*    EVENT_DATAOVERRUN         - Use EVCB
  29. ;*    EVENT_CUE_TIME_PAUSE      - Use TIME_EVCB
  30. ;*********************************************  
  31. EVENT_SYNCOVERRUN    EQU    4 
  32. EVENT_CUE_TIME    EQU    5        ;  Cue point in terms of stream time  
  33. EVENT_CUE_DATA    EQU    6        ;  Cue point in terms of data items   
  34. EVENT_DATAUNDERRUN    EQU    7        ;  data underrun event from SH      
  35. EVENT_DATAOVERRUN    EQU    8        ;  data underrun event from SH      
  36. EVENT_CUE_TIME_PAUSE    EQU    9        ;  Pause when cue-point reached.    
  37. EVENT_STATUS_LEVEL    EQU    10       ;  Report status level              
  38. ;**********************************************
  39. ;* SYNC_EVCB - Sync Pulse Event Control Block
  40. ;*             (This event is only seen by
  41. ;*              stream handlers)
  42. ;*********************************************  
  43. EVENT_SYNC    EQU    1      ;  Synchronization point in stream    
  44.  
  45. SYNC_EVCB    STRUC
  46. syevcb_ulType    DD    ?                     ;  EVENT_SYNC                         
  47. syevcb_ulSubType    DD    ?                  ;  Not used                           
  48. syevcb_ulSyncFlags    DD    ?                ;  0 (input),status (output)          
  49. syevcb_hstream    DD    ?                    ;  handle to stream for this event    
  50. syevcb_hid    DD    ?                        ;  Handler id                         
  51. syevcb_ulStatus    DD    ?                   ;  Event status (output)              
  52. syevcb_mmtimeStart    DD    ?                ;  Filled in by Sync/Stream manager   
  53.                                        ;   at SpiEnableSync time. (input)    
  54. syevcb_mmtimeMaster    DD    ?               ;  Filled in by Master SH (input)     
  55. syevcb_mmtimeSlave    DD    ?                ;  Filled in by slave SH. (output)    
  56. SYNC_EVCB    ENDS
  57. ;  ulSyncFlags:                                                              
  58. SYNCOVERRUN    EQU    0001H     ;  Set by SSM if sync pulse comes in before      
  59.                                        ;   a has processed the current sync pulse.      
  60. SYNCPOLLING    EQU    0002H     ;  SSM set this after filling the handler EVCB.  
  61.                                        ;   Handler resets it after it processes the     
  62.                                        ;   contents of EVCB. The SSM must check this    
  63.                                        ;   bit before modifying EVCB. If bit already    
  64.                                        ;   set, set the SYNC overrun bit.               
  65. EVENT_RESERVED    EQU    2      ;  RESERVED                           
  66. ;**********************************************
  67. ;* IMPL_EVCB - Implicit Event Control Block
  68. ;*             (This is a parameter on the
  69. ;*              SpiCreatStrem API)
  70. ;*********************************************  
  71. EVENT_IMPLICIT_TYPE    EQU    3      ;  These events are always supported  
  72.  
  73. IMPL_EVCB    STRUC
  74. imevcb_ulType    DD    ?                     ;  EVENT_IMPLICIT_TYPE                
  75. imevcb_ulSubType    DD    ?                  ;  One of the implicit events (input)   
  76. imevcb_ulFlags    DD    ?                    ;  0 (Input), status (Output)           
  77. imevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)   
  78. imevcb_hid    DD    ?                        ;  0 (input), handler Id (output)       
  79. imevcb_ulStatus    DD    ?                   ;  Event status/error return code (output)   
  80. imevcb_unused1    DD    ?                    ;  0 (input)                          
  81. imevcb_unused2    DD    ?                    ;  0 (input)                          
  82. imevcb_unused3    DD    ?                    ;  0 (input)                          
  83. IMPL_EVCB    ENDS
  84. ;  ulSubtype:                                                                
  85. EVENT_EOS    EQU    1      ;  End of Stream                      
  86. EVENT_ERROR    EQU    2      ;  Error in Stream handler or device driver          
  87. EVENT_STREAM_STOPPED    EQU    3      ;  Stream is in a stopped state (Discard or Flush)   
  88. EVENT_SYNC_PREROLLED    EQU    4      ;  All streams are prerolled (buffers     
  89.                                        ;   have been filled by the Source SH's.  
  90. EVENT_PLAYLISTMESSAGE    EQU    5      ;  Memory SH playlist message event       
  91. EVENT_PLAYLISTCUEPOINT    EQU    6      ;  Memory SH playlist cue point           
  92. EVENT_QUEUE_OVERFLOW    EQU    7      ;  Event Queue overflow. Indicates lost   
  93.                                        ;   events. Application must use this     
  94.                                        ;   to clear any waiting conditions.      
  95. EVENT_START    EQU    8      ;  Start stream                           
  96. ;**********************************************
  97. ;* PLAYL_EVCB - Playlist Message Event Control Block
  98. ;*********************************************  
  99. ;  (IMPLICIT EVENT)                                                          
  100.  
  101. PLAYL_EVCB    STRUC
  102. plevcb_ulType    DD    ?                     ;  EVENT_IMPLICIT_TYPE                
  103. plevcb_ulSubType    DD    ?                  ;  EVENT_PLAYLISTMESSAGE or EVENT_PLAYLISTCUEPOINT   
  104. plevcb_ulFlags    DD    ?                    ;  0 (input), status (output)                        
  105. plevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)    
  106. plevcb_hid    DD    ?                        ;  0 (input), handler Id (output)                    
  107. plevcb_ulStatus    DD    ?                   ;  Playlist Instruction number (output)              
  108. plevcb_ulMessageParm    DD    ?              ;  0 (input), Message from playlist (output)         
  109. plevcb_unused1    DD    ?                    ;  0 (input)                          
  110. plevcb_unused2    DD    ?                    ;  0 (input)                          
  111. PLAYL_EVCB    ENDS
  112. ;**********************************************
  113. ;* OVRU_EVCB - Sync Overrun Event Control Block
  114. ;*             (Applications can request to be
  115. ;*              notified whenever a Sync overrun
  116. ;*              occurs.
  117. ;*********************************************  
  118.  
  119. OVRU_EVCB    STRUC
  120. ovevcb_ulType    DD    ?                     ;  EVENT_SYNCOVERRUN                  
  121. ovevcb_ulSubType    DD    ?                  ;  Not used                           
  122. ovevcb_ulFlags    DD    ?                    ;  0 (input), status (output)         
  123. ovevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)   
  124. ovevcb_hid    DD    ?                        ;  handler Id (input/output)          
  125. ovevcb_ulStatus    DD    ?                   ;  Event status/error return code (output)   
  126. ovevcb_mmtimeSlave    DD    ?                ;  0 (input), Slave stream time (output)     
  127. ovevcb_mmtimeStart    DD    ?                ;  0 (input), Slave start offset (offset)    
  128. ovevcb_mmtimeMaster    DD    ?               ;  0 (input), Master stream time (output)    
  129. OVRU_EVCB    ENDS
  130. ;**********************************************
  131. ;* TIME_EVCB - Cue Time Event Control Block
  132. ;*             (Applications can request to be
  133. ;*              notified for a time cue point)
  134. ;*********************************************  
  135.  
  136. TIME_EVCB    STRUC
  137. tievcb_ulType    DD    ?                     ;  EVENT_CUE_TIME                     
  138. tievcb_ulSubType    DD    ?                  ;  Not used                           
  139. tievcb_ulFlags    DD    ?                    ;  Single/Recurring(input/output)     
  140. tievcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)  
  141. tievcb_hid    DD    ?                        ;  handler Id (input/output)                       
  142. tievcb_ulStatus    DD    ?                   ;  Event status/error return code (output)         
  143. tievcb_mmtimeStream    DD    ?               ;  Stream time (input/output)         
  144. tievcb_unused1    DD    ?                    ;  0 (input)                          
  145. tievcb_unused2    DD    ?                    ;  0 (input)                          
  146. TIME_EVCB    ENDS
  147. ;                                                                            
  148. ;  ulFlags:                                                                  
  149. EVENT_SINGLE    EQU    0      ;  This is single one time event      
  150. EVENT_RECURRING    EQU    1      ;  This is recurring event            
  151. ;**********************************************
  152. ;* DATA_EVCB - Cue Data Event Control Block
  153. ;*             (Applications can request to be
  154. ;*              notified for a data cue point)
  155. ;*********************************************  
  156.  
  157. DATA_EVCB    STRUC
  158. daevcb_ulType    DD    ?                     ;  EVENT_CUE_DATA                     
  159. daevcb_ulSubType    DD    ?                  ;  Event SubType                      
  160. daevcb_ulFlags    DD    ?                    ;  Single/Recurring(input/output)     
  161. daevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)   
  162. daevcb_hid    DD    ?                        ;  handler Id (input/output)                        
  163. daevcb_ulStatus    DD    ?                   ;  Event status/error return code (output)          
  164. daevcb_mmtimeStream    DD    ?               ;  Stream time (input/output)                       
  165. daevcb_ulEventParm1    DD    ?               ;  Data to Cue on (input/output)                    
  166.                                        ;   This is interpreted by the stream handler       
  167. daevcb_ulEventParm2    DD    ?               ;  Length of data cue buffer (input/output)         
  168. DATA_EVCB    ENDS
  169. ;  ulFlags:                                                                  
  170. ; #define EVENT_SINGLE          0L        This is single one time event      
  171. ; #define EVENT_RECURRING       1L        This is recurring event            
  172. EVENT_DATAPTR    EQU    2      ;  ulEventParm1 if ptr to buffer and  
  173.                                        ;   ulEventParm2 is a length of buffer,   
  174.                                        ;   else ulEventParm1 is data.            
  175. ;******************
  176. ;* EVCB_ulType:  (Stream Handler defined types)
  177. ;*****************  
  178. SH_TYPE    EQU    80000000H   ;  Stream Handler defined types must   
  179.                                        ;  have the high order bit set in the  
  180.                                        ;  ulType field.                       
  181.                                        ;  events: 0H - 7FFFFFFFH are reserved!  
  182. ;**********************************************
  183. ;* EVCB - Generic Event Control Block (Use the
  184. ;*        specific one in the SSM.H if possible)
  185. ;*********************************************  
  186.  
  187. EVCB    STRUC
  188. evcb_ulType    DD    ?                     ;  Event type (input)                 
  189. evcb_ulSubType    DD    ?                  ;  Event SubType (input)              
  190. evcb_ulFlags    DD    ?                    ;  0 (Input), status (Output)         
  191. evcb_hstream    DD    ?                    ;  handle to stream for this event    
  192. evcb_hid    DD    ?                        ;  handler Id (input/output)          
  193. evcb_ulStatus    DD    ?                   ;  Event status (output)              
  194. evcb_ulEventParm1    DD    ?               ;  Event parameters (input), HID if implicit event   
  195. evcb_ulEventParm2    DD    ?               ;  Event parameters (input)           
  196. evcb_ulEventParm3    DD    ?               ;  Event parameters (input)           
  197. EVCB    ENDS
  198. ;**********************************************
  199. ;* STATUS_LEVEL_EVCB - Status Level Event Control Block
  200. ;*********************************************  
  201.  
  202. STATUS_LEVEL_EVCB    STRUC
  203.    ;  standard part   
  204. stevcb_ulType    DD    ?                     ;  Event type (input)                 
  205. stevcb_ulSubType    DD    ?                  ;  Event SubType (input)              
  206. stevcb_pMCDInstance    DD    ?               ;  for MCD use   
  207. stevcb_hstream    DD    ?                    ;  handle to stream for this event    
  208. stevcb_hid    DD    ?                        ;  handler Id (input/output)          
  209.    ;  custom part   
  210. stevcb_ulSample    DD    4 DUP (?)                ;  Samples   
  211. STATUS_LEVEL_EVCB    ENDS
  212.