home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mmpm21tk.zip / TK / INC / SPCB.INC < prev    next >
Text File  |  1993-04-23  |  8KB  |  123 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    (384 *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. ;********************
  76. ;* SPCB_ulBufFlags:
  77. ;*******************  
  78. SPCBBUF_USERPROVIDED    EQU    0001H  ;  User provides buffers for stream          
  79.                                        ;  SSMgr will not allocate buffers,          
  80.                                        ;  but must lock down provided buffers,      
  81.                                        ;  so this will affect performance!!         
  82.                                        ;  (Source Handler only)                     
  83. SPCBBUF_FIXEDBUF    EQU    0002H  ;  Buffer size is fixed for this data type   
  84.                                        ;   in this handler. Can not be used         
  85.                                        ;   with the SPCBBUF_INTERLEAVED or          
  86.                                        ;   SPCBBUF_USERPROVIDED flags.              
  87. SPCBBUF_NONCONTIGUOUS    EQU    0004H  ;  Buffer do not need to be contiguous       
  88.                                        ;   in physical memory.                      
  89. SPCBBUF_INTERLEAVED    EQU    0008H  ;  Stream buffers can be interleaved.        
  90.                                        ;   Can not be use with the                  
  91.                                        ;   SPCBBUF_USERPROVIDED flag.               
  92.                                        ;   (Source Handler only)                    
  93. SPCBBUF_MAXSIZE    EQU    0010H  ;  ulBufSize is the maximum size that        
  94.                                        ;   can be used by this stream handler       
  95. SPCBBUF_16MEG    EQU    0020H  ;  The Stream buffers may be allocated       
  96.                                        ;   above the 16 Meg line. This is used      
  97.                                        ;   by stream handlers that can support      
  98.                                        ;   greater than 16 Megabyte addresses.      
  99. ;*******************
  100. ;* SPCB_ulHandFlags:
  101. ;******************  
  102. SPCBHAND_GENSYNC    EQU    0001H  ;  (INPUT FROM HANDLER ONLY)                 
  103.                                        ;  This handler can generate sync pulses     
  104.                                        ;  if it is the master.                      
  105. SPCBHAND_RCVSYNC    EQU    0002H  ;  (INPUT FROM HANDLER ONLY)                 
  106.                                        ;  This handler can receive sync pulses      
  107.                                        ;  if it is a slave                          
  108. SPCBHAND_TIMER    EQU    0004H  ;  Use Stream Manager Timer for Sync         
  109. SPCBHAND_NONSTREAM    EQU    0008H  ;  Stream Handler is non-streaming           
  110. SPCBHAND_GENTIME    EQU    0010H  ;  This handler contains real                
  111.                                        ;  stream time. The handler that             
  112.                                        ;  supports the SpiGetTime, data/time        
  113.                                        ;  cue point calls for this stream.          
  114. SPCBHAND_NOPREROLL    EQU    0020H  ;  This stream can not be prerolled.         
  115.                                        ;  (i.e. recording streams)                  
  116. SPCBHAND_NOSYNC    EQU    0040H  ;  This stream can be group into a           
  117.                                        ;  sync group, but does not send or          
  118.                                        ;  receive sync pulses.                      
  119. SPCBHAND_PHYS_SEEK    EQU    0080H  ;  This handler does a seek to a physical    
  120.                                        ;  device or memory not just a time adjustment.  
  121.                                        ;  (ssm will always call this handler first on   
  122.                                        ;   an SpiSeekStream call).                      
  123.