home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / INC / EVCB.INC < prev    next >
Text File  |  1995-08-30  |  13KB  |  211 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. ;**********************************************
  96. ;* PLAYL_EVCB - Playlist Message Event Control Block
  97. ;*********************************************  
  98. ;  (IMPLICIT EVENT)                                                          
  99.  
  100. PLAYL_EVCB    STRUC
  101. plevcb_ulType    DD    ?                     ;  EVENT_IMPLICIT_TYPE                
  102. plevcb_ulSubType    DD    ?                  ;  EVENT_PLAYLISTMESSAGE or EVENT_PLAYLISTCUEPOINT   
  103. plevcb_ulFlags    DD    ?                    ;  0 (input), status (output)                        
  104. plevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)    
  105. plevcb_hid    DD    ?                        ;  0 (input), handler Id (output)                    
  106. plevcb_ulStatus    DD    ?                   ;  Playlist Instruction number (output)              
  107. plevcb_ulMessageParm    DD    ?              ;  0 (input), Message from playlist (output)         
  108. plevcb_unused1    DD    ?                    ;  0 (input)                          
  109. plevcb_unused2    DD    ?                    ;  0 (input)                          
  110. PLAYL_EVCB    ENDS
  111. ;**********************************************
  112. ;* OVRU_EVCB - Sync Overrun Event Control Block
  113. ;*             (Applications can request to be
  114. ;*              notified whenever a Sync overrun
  115. ;*              occurs.
  116. ;*********************************************  
  117.  
  118. OVRU_EVCB    STRUC
  119. ovevcb_ulType    DD    ?                     ;  EVENT_SYNCOVERRUN                  
  120. ovevcb_ulSubType    DD    ?                  ;  Not used                           
  121. ovevcb_ulFlags    DD    ?                    ;  0 (input), status (output)         
  122. ovevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)   
  123. ovevcb_hid    DD    ?                        ;  handler Id (input/output)          
  124. ovevcb_ulStatus    DD    ?                   ;  Event status/error return code (output)   
  125. ovevcb_mmtimeSlave    DD    ?                ;  0 (input), Slave stream time (output)     
  126. ovevcb_mmtimeStart    DD    ?                ;  0 (input), Slave start offset (offset)    
  127. ovevcb_mmtimeMaster    DD    ?               ;  0 (input), Master stream time (output)    
  128. OVRU_EVCB    ENDS
  129. ;**********************************************
  130. ;* TIME_EVCB - Cue Time Event Control Block
  131. ;*             (Applications can request to be
  132. ;*              notified for a time cue point)
  133. ;*********************************************  
  134.  
  135. TIME_EVCB    STRUC
  136. tievcb_ulType    DD    ?                     ;  EVENT_CUE_TIME                     
  137. tievcb_ulSubType    DD    ?                  ;  Not used                           
  138. tievcb_ulFlags    DD    ?                    ;  Single/Recurring(input/output)     
  139. tievcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)  
  140. tievcb_hid    DD    ?                        ;  handler Id (input/output)                       
  141. tievcb_ulStatus    DD    ?                   ;  Event status/error return code (output)         
  142. tievcb_mmtimeStream    DD    ?               ;  Stream time (input/output)         
  143. tievcb_unused1    DD    ?                    ;  0 (input)                          
  144. tievcb_unused2    DD    ?                    ;  0 (input)                          
  145. TIME_EVCB    ENDS
  146. ;                                                                            
  147. ;  ulFlags:                                                                  
  148. EVENT_SINGLE    EQU    0      ;  This is single one time event      
  149. EVENT_RECURRING    EQU    1      ;  This is recurring event            
  150. ;**********************************************
  151. ;* DATA_EVCB - Cue Data Event Control Block
  152. ;*             (Applications can request to be
  153. ;*              notified for a data cue point)
  154. ;*********************************************  
  155.  
  156. DATA_EVCB    STRUC
  157. daevcb_ulType    DD    ?                     ;  EVENT_CUE_DATA                     
  158. daevcb_ulSubType    DD    ?                  ;  Event SubType                      
  159. daevcb_ulFlags    DD    ?                    ;  Single/Recurring(input/output)     
  160. daevcb_hstream    DD    ?                    ;  handle to stream for this event (input/output)   
  161. daevcb_hid    DD    ?                        ;  handler Id (input/output)                        
  162. daevcb_ulStatus    DD    ?                   ;  Event status/error return code (output)          
  163. daevcb_mmtimeStream    DD    ?               ;  Stream time (input/output)                       
  164. daevcb_ulEventParm1    DD    ?               ;  Data to Cue on (input/output)                    
  165.                                        ;   This is interpreted by the stream handler       
  166. daevcb_ulEventParm2    DD    ?               ;  Length of data cue buffer (input/output)         
  167. DATA_EVCB    ENDS
  168. ;  ulFlags:                                                                  
  169. ; #define EVENT_SINGLE          0L        This is single one time event      
  170. ; #define EVENT_RECURRING       1L        This is recurring event            
  171. EVENT_DATAPTR    EQU    2      ;  ulEventParm1 if ptr to buffer and  
  172.                                        ;   ulEventParm2 is a length of buffer,   
  173.                                        ;   else ulEventParm1 is data.            
  174. ;******************
  175. ;* EVCB_ulType:  (Stream Handler defined types)
  176. ;*****************  
  177. SH_TYPE    EQU    80000000H   ;  Stream Handler defined types must   
  178.                                        ;  have the high order bit set in the  
  179.                                        ;  ulType field.                       
  180.                                        ;  events: 0H - 7FFFFFFFH are reserved!  
  181. ;**********************************************
  182. ;* EVCB - Generic Event Control Block (Use the
  183. ;*        specific one in the SSM.H if possible)
  184. ;*********************************************  
  185.  
  186. EVCB    STRUC
  187. evcb_ulType    DD    ?                     ;  Event type (input)                 
  188. evcb_ulSubType    DD    ?                  ;  Event SubType (input)              
  189. evcb_ulFlags    DD    ?                    ;  0 (Input), status (Output)         
  190. evcb_hstream    DD    ?                    ;  handle to stream for this event    
  191. evcb_hid    DD    ?                        ;  handler Id (input/output)          
  192. evcb_ulStatus    DD    ?                   ;  Event status (output)              
  193. evcb_ulEventParm1    DD    ?               ;  Event parameters (input), HID if implicit event   
  194. evcb_ulEventParm2    DD    ?               ;  Event parameters (input)           
  195. evcb_ulEventParm3    DD    ?               ;  Event parameters (input)           
  196. EVCB    ENDS
  197. ;**********************************************
  198. ;* STATUS_LEVEL_EVCB - Status Level Event Control Block
  199. ;*********************************************  
  200.  
  201. STATUS_LEVEL_EVCB    STRUC
  202.    ;  standard part   
  203. stevcb_ulType    DD    ?                     ;  Event type (input)                 
  204. stevcb_ulSubType    DD    ?                  ;  Event SubType (input)              
  205. stevcb_pMCDInstance    DD    ?               ;  for MCD use   
  206. stevcb_hstream    DD    ?                    ;  handle to stream for this event    
  207. stevcb_hid    DD    ?                        ;  handler Id (input/output)          
  208.    ;  custom part   
  209. stevcb_ulSample    DD    4 DUP (?)                ;  Samples   
  210. STATUS_LEVEL_EVCB    ENDS
  211.