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

  1. ;***************************************************************************  
  2. ;                                                                             
  3. ;  Module Name: SPCB.H                                                        
  4. ;                                                                             
  5. ;  OS/2 2.0 Multimedia Extensions Sync/Stream Manager Stream Protocol         
  6. ;  Control Block Definitions.                                                 
  7. ;                                                                             
  8. ;  Copyright (c) International Business Machines Corporation 1991, 1992       
  9. ;                         All Rights Reserved                                 
  10. ;                                                                             
  11. ;***************************************************************************  
  12. ifndef  _SPCBKEY_DEFINED
  13. _SPCBKEY_DEFINED    EQU    1
  14.  
  15. ;**********************************************
  16. ;*
  17. ;* SPCBKEY - Stream Protocol Key
  18. ;*
  19. ;*********************************************  
  20.  
  21. SPCBKEY    STRUC
  22. spcbkey_ulDataType    DD    ?
  23. spcbkey_ulDataSubType    DD    ?
  24. spcbkey_ulIntKey    DD    ?                 ;  generated internal key              
  25. SPCBKEY    ENDS
  26. endif
  27. ;**********************************************
  28. ;*
  29. ;* SPCB - Stream Protocol Control Block
  30. ;*
  31. ;*********************************************  
  32.  
  33. SPCB    STRUC
  34. spcb_ulSPCBLen    DD    ?             ;  SPCB struture length                     
  35. spcb_spcbkey    DB    SIZE SPCBKEY DUP (?)
  36. spcb_ulDataFlags    DD    ?           ;  Data type flags                          
  37. spcb_ulNumRec    DD    ?              ;  Max # records/buffer (Only used for Split streams)   
  38. spcb_ulBlockSize    DD    ?           ;  Block alignment in bytes.                     
  39. spcb_ulBufSize    DD    ?             ;  Buffer size (SSM allocated buffers) must be   
  40.                                   ;   a multiple of Block size                     
  41. spcb_ulMinBuf    DD    ?              ;  Minimum number of buffers needed to stream    
  42. spcb_ulMaxBuf    DD    ?              ;  Maximum number of buffers needed to stream    
  43. spcb_ulSrcStart    DD    ?            ;  # of EMPTY buffers required to start Source   
  44. spcb_ulTgtStart    DD    ?            ;  # of FULL buffers required to start Target    
  45. spcb_ulBufFlags    DD    ?            ;  Handler Protocol negotiation flags            
  46. spcb_ulHandFlags    DD    ?           ;  Handler Protocol flags                        
  47. spcb_mmtimeTolerance    DD    ?       ;  Sync tolerance value...Used as check by SSM   
  48.                                   ;   to determine whether to send a sync pulse    
  49.                                   ;   to this specific slave Stream Handler.       
  50.                                   ;   Algorithm:                                   
  51.                                   ;    diff = abs(master time - slave time)        
  52.                                   ;    if  diff >= tolerance                       
  53.                                   ;      then send sync pulse                      
  54.                                   ;  (Valid only for Slave stream handlers)        
  55. spcb_mmtimeSync    DD    ?            ;  Used to save sync pulse generation granularity   
  56.                                   ;   if the master uses the Stream Manager Timer.    
  57.                                   ;   if SpiSetSync passed NULL value for sync gran   
  58.                                   ;    then use this default value. (since hardware   
  59.                                   ;    must have it's own interrupt time interval.    
  60.                                   ;  (Valid only for Master stream handlers)          
  61. spcb_ulBytesPerUnit    DD    ?        ;  Bytes/unit of time. This is used to do seeks     
  62.                                   ;  on linear data that is not compressed or         
  63.                                   ;  of variable length.                              
  64. spcb_mmtimePerUnit    DD    ?         ;  The amount of mmtime each unit represents.       
  65.                                   ;  A unit can be a second, minute or whatever.      
  66. SPCB    ENDS
  67. SPCB_MAX_BUF_SIZE    EQU    (1024 *1024 )   ;  Largest buffer size in bytes    
  68. ;*******************
  69. ;* SPCB_ulDataFlags:
  70. ;******************  
  71. SPCBDATA_CUETIME    EQU    0002H  ;  This data type can support time cue points  
  72. SPCBDATA_CUEDATA    EQU    0004H  ;  This data type can support data cue points  
  73. SPCBDATA_SEEK    EQU    0000H  ;  Seeks can be performed on this data type.   
  74. SPCBDATA_NOSEEK    EQU    0008H  ;  NO seeks can be performed on this data type.  
  75. SPCBDATA_YIELDTIME    EQU    0010H  ;  The ulBytes per unit field is used for a millisecond value      
  76.                                        ;  It represents the amount of yield time between reads of         
  77.                                        ;  each buffer. If this bit is set, the value of ulBytesPerUnit    
  78.                                        ;  is used as input to DosSleep to yield for that period of time   
  79. ;********************
  80. ;* SPCB_ulBufFlags:
  81. ;*******************  
  82. SPCBBUF_USERPROVIDED    EQU    0001H  ;  User provides buffers for stream          
  83.                                        ;  SSMgr will not allocate buffers,          
  84.                                        ;  but must lock down provided buffers,      
  85.                                        ;  so this will affect performance!!         
  86.                                        ;  (Source Handler only)                     
  87. SPCBBUF_FIXEDBUF    EQU    0002H  ;  Buffer size is fixed for this data type   
  88.                                        ;   in this handler. Can not be used         
  89.                                        ;   with the SPCBBUF_USERPROVIDED flags.     
  90. SPCBBUF_NONCONTIGUOUS    EQU    0004H  ;  Buffer do not need to be contiguous       
  91.                                        ;   in physical memory.                      
  92. SPCBBUF_INTERLEAVED    EQU    0008H  ;  Stream buffers can be interleaved.        
  93.                                        ;   Can not be use with the                  
  94.                                        ;   SPCBBUF_USERPROVIDED flag.               
  95.                                        ;   (Source Handler only)                    
  96. SPCBBUF_MAXSIZE    EQU    0010H  ;  ulBufSize is the maximum size that        
  97.                                        ;   can be used by this stream handler       
  98. SPCBBUF_16MEG    EQU    0020H  ;  The Stream buffers may be allocated       
  99.                                        ;   above the 16 Meg line. This is used      
  100.                                        ;   by stream handlers that can support      
  101.                                        ;   greater than 16 Megabyte addresses.      
  102. SPCBBUF_FIXEDBLOCK    EQU    0040H  ;  Use the ulBlockSize field to represent    
  103.                                        ;  the size of the IO reads that should      
  104.                                        ;  be performed (Interleaved streams)        
  105. ;*******************
  106. ;* SPCB_ulHandFlags:
  107. ;******************  
  108. SPCBHAND_GENSYNC    EQU    0001H  ;  (INPUT FROM HANDLER ONLY)                 
  109.                                        ;  This handler can generate sync pulses     
  110.                                        ;  if it is the master.                      
  111. SPCBHAND_RCVSYNC    EQU    0002H  ;  (INPUT FROM HANDLER ONLY)                 
  112.                                        ;  This handler can receive sync pulses      
  113.                                        ;  if it is a slave                          
  114. SPCBHAND_TIMER    EQU    0004H  ;  Use Stream Manager Timer for Sync         
  115. SPCBHAND_NONSTREAM    EQU    0008H  ;  Stream Handler is non-streaming           
  116. SPCBHAND_GENTIME    EQU    0010H  ;  This handler contains real                
  117.                                        ;  stream time. The handler that             
  118.                                        ;  supports the SpiGetTime, data/time        
  119.                                        ;  cue point calls for this stream.          
  120. SPCBHAND_NOPREROLL    EQU    0020H  ;  This stream can not be prerolled.         
  121.                                        ;  (i.e. recording streams)                  
  122. SPCBHAND_NOSYNC    EQU    0040H  ;  This stream can be group into a           
  123.                                        ;  sync group, but does not send or          
  124.                                        ;  receive sync pulses.                      
  125. SPCBHAND_PHYS_SEEK    EQU    0080H  ;  This handler does a seek to a physical    
  126.                                        ;  device or memory not just a time adjustment.  
  127.                                        ;  (ssm will always call this handler first on   
  128.                                        ;   an SpiSeekStream call).                      
  129.