home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / acb.h next >
C/C++ Source or Header  |  1999-03-15  |  9KB  |  190 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* Module Name: ACB.H                                                       */
  4. /*                                                                          */
  5. /* OS/2 2.0 Multimedia Extensions Sync/Stream Manager Associate             */
  6. /* Control Block Definitions.                                               */
  7. /*                                                                          */
  8. /* Copyright (c) International Business Machines Corporation 1991, 1992     */
  9. /*                        All Rights Reserved                               */
  10. /*                                                                          */
  11. /****************************************************************************/
  12. /* NOINC */
  13. #ifdef __cplusplus
  14.    extern "C" {
  15. #endif
  16. /* INC */
  17.  
  18.  
  19. #define MAX_PORT_NAME         40           /* Max port name length         */
  20. #define MAX_PORTS             16           /* Max number ports             */
  21.  
  22.  
  23. /* XLATOFF */
  24. #pragma pack(4)
  25. /* XLATON */
  26.  
  27. /**********************************************
  28.  *
  29.  * ACB - Associate Control Block
  30.  *
  31.  *       Each stream handler must define the
  32.  *       ACB for each data object type that
  33.  *       expect ACB's from the application.
  34.  *
  35.  **********************************************/
  36. typedef struct _ACB { /* acb  -  Assoc. Control Block  */
  37.    ULONG   ulACBLen;              /* length of structure                   */
  38.    ULONG   ulObjType;
  39.    ULONG   ulParm1;
  40.    ULONG   ulParm2;
  41.    } ACB;
  42. typedef ACB  FAR  *PACB;          /* Ptr to an ACB        */
  43.  
  44.  
  45. /******************************************************
  46.  * FSSH - File system stream handler MMIO Object ACB
  47.  ******************************************************/
  48. #define ACBTYPE_MMIO          0x0001L  /* MMIO object                      */
  49. typedef struct _ACB_MMIO   { /* acbmmio  - MMIO Assoc. Control Block       */
  50.    ULONG   ulACBLen;              /* length of structure                   */
  51.    ULONG   ulObjType;             /* ACBTYPE_MMIO                          */
  52.    HMMIO   hmmio;                 /* Handle of media element mgr obj       */
  53.    } ACB_MMIO;
  54. typedef ACB_MMIO  FAR  *PACB_MMIO;       /* Ptr to an ACB  */
  55.  
  56.  
  57. /******************************************************
  58.  * MSH - Memory stream handler Playlist Object ACB
  59.  ******************************************************/
  60. #define ACBTYPE_MEM_PLAYL     0x0003L  /* Memory playlist object           */
  61. typedef struct _ACB_MEM_PLAYL { /* acbplyl - File system Assoc. Control Block */
  62.    ULONG   ulACBLen;              /* length of structure                   */
  63.    ULONG   ulObjType;             /* ACBTYPE_MEM_PLAYL                     */
  64.    PVOID   pMemoryAddr;           /* Starting address of memory obj        */
  65.    } ACB_MEM_PLAYL;
  66. typedef ACB_MEM_PLAYL  FAR  *PACB_MEM_PLAYL;     /* Ptr to an ACB  */
  67.  
  68.  
  69. /******************************************************
  70.  * CDDASH - CD DA stream handler Object ACB
  71.  ******************************************************/
  72. #define ACBTYPE_CDDA          0x0004L  /*  Compact disk - digital audio obj*/
  73.  
  74. /* XLATOFF */
  75. #pragma pack(1)
  76. /* XLATON */
  77.  
  78. typedef struct _ACB_CDDA   { /* acbcdda - CD Assoc. Control Block          */
  79.    ULONG   ulACBLen;              /* length of structure                   */
  80.    ULONG   ulObjType;             /* ACBTYPE_CDDA                          */
  81.    CHAR    bCDDrive;              /* CD drive letter                       */
  82.    } ACB_CDDA;
  83. typedef ACB_CDDA  FAR  *PACB_CDDA;       /* Ptr to an ACB  */
  84.  
  85. /* XLATOFF */
  86. #pragma pack()
  87. /* XLATON */
  88.  
  89.  
  90. /******************************************************
  91.  * MISH - MIDI stream handler port-stream table ACB
  92.  ******************************************************/
  93. #define ACBTYPE_MISH          0x0005L      /* MIDI port-stream table       */
  94. typedef struct _ACB_MISH { /* acbmish - MIDI Assoc. Control Block          */
  95.    ULONG     ulACBLen;                     /* length of structure          */
  96.    ULONG     ulObjType;                    /* ACBTYPE_MISH                 */
  97.    HSTREAM   hstreamDefault;               /* Default hstream to use when mapper */
  98.                                            /* is turned off.               */
  99.    ULONG     ulDeviceTypeID;               /* device type id               */
  100.    ULONG     ulpMapperPorts;               /* pointer to mapper port table */
  101.    ULONG     ulNumInStreams;
  102.    HSTREAM   hstreamIn[MAX_PORTS];         /* Array of Input streams       */
  103.    ULONG     ulNumOutStreams;
  104.    HSTREAM   hstreamOut[MAX_PORTS];        /* Array of Output streams      */
  105.                                            /* The index into the array is  */
  106.                                            /* the source channel for that  */
  107.                                            /* stream.                      */
  108.    } ACB_MISH;
  109. typedef ACB_MISH FAR *PACB_MISH;           /* Ptr to MIDI associate control block */
  110.  
  111.  
  112. /******************************************************
  113.  * MISH - MIDI stream handler SET ACB
  114.  ******************************************************/
  115. #define ACBTYPE_SET           0x0006L      /* MIDI set function            */
  116. typedef struct _ACB_SET { /* acbset - Set Assoc. Control Block             */
  117.    ULONG     ulACBLen;                     /* length of structure          */
  118.    ULONG     ulObjType;                    /* ACBTYPE_SET                  */
  119.    ULONG     ulFlags;                      /* Set flags                    */
  120.    ULONG     ulReserved;                   /* Reserved                     */
  121.    } ACB_SET;
  122. typedef ACB_SET FAR *PACB_SET;             /* Ptr to set associate control block */
  123.  
  124. /* ulFlags defines:                                                        */
  125. #define MIDI_MAP_ON           0x0000L      /* turn mapping function on in MISH   */
  126. #define MIDI_MAP_OFF          0x0001L      /* turn mapping function off in MISH  */
  127.  
  128.  
  129. /******************************************************
  130.  * NULLSH - Null stream handler user ACB
  131.  ******************************************************/
  132. #define ACBTYPE_NULLSH        0x0007L  /* User od Null stream handler      */
  133. typedef struct _ACB_NULLSH { /* acbnullsh - NULLSH Assoc. Control Block    */
  134.    ULONG   ulACBLen;              /* length of structure                   */
  135.    ULONG   ulObjType;             /* ACBTYPE_NULLSH                        */
  136.    PFN     pfnEntry;              /* user callback entry point             */
  137.    ULONG   ulReserved;            /* Reserved                              */
  138.    } ACB_NULLSH;
  139. typedef ACB_NULLSH  FAR  *PACB_NULLSH;       /* Ptr to an ACB  */
  140.  
  141.  
  142. /******************************************************
  143.  * MTSH - MultiTrack Stream Handler Object ACB
  144.  ******************************************************/
  145. #define ACBTYPE_MTSH          0x0008L  /* MTSH object                      */
  146. typedef struct _ACB_MTSH   { /* acbmtsh  - MTSH Assoc. Control Block       */
  147.    ULONG        ulACBLen;         /* length of structure                   */
  148.    ULONG        ulObjType;        /* ACBTYPE_MTSH                          */
  149.    HMMIO        hmmio;            /* Handle of media element mgr obj       */
  150.    MMTRACKINFO  mmtrackInfo;      /* track for this stream                 */
  151.    ULONG        ulFlags;          /* flags                                 */
  152.    ULONG        ulMaxBytesPerSec; /* Max bytes per second                  */
  153.    ULONG        ulAvgBytesPerSec; /* Avg bytes per second                  */
  154.    MMTIME       mmtimePerFrame;   /* frame display time or 0L              */
  155.    ULONG        ulTotalFrames;    /* total number of video frames          */
  156.    } ACB_MTSH;
  157. typedef ACB_MTSH  FAR  *PACB_MTSH;       /* Ptr to an ACB  */
  158.  
  159. /* ulFlags defines:                                                        */
  160. #define TRACK_ACTIVATE        0x0000L    /* Activate track in stream handler  */
  161. #define TRACK_DEACTIVATE      0x0001L    /* Deactivate track in stream handler  */
  162.  
  163.  
  164. /******************************************************
  165.  * CSH - CODEC stream handler Object ACB
  166.  ******************************************************/
  167. #define ACBTYPE_CODECSH       0x0009L      /* CODEC object                 */
  168. typedef struct _ACB_CODECSH { /* acbcodecsh - CODEC SH acb                 */
  169.    ULONG            ulACBLen;              /* length of structure          */
  170.    ULONG            ulObjType;             /* ACBTYPE_CODECSH              */
  171.    HSTREAM          hstreamToPair;         /* 2nd stream of pair           */
  172.    PVOID            pMmioInfo;             /* info for IO Proc             */
  173.    ULONG            ulInfoLength;          /* length of MmioInfo           */
  174.    PVOID            pCodecControl;         /* CODEC control info           */
  175.    ULONG            ulControlLength;       /* length of CodecControl       */
  176.    } ACB_CODECSH;
  177. typedef ACB_CODECSH FAR *PACB_CODECSH;     /* Ptr to associate control block */
  178.  
  179.  
  180. /* XLATOFF */
  181. #pragma pack()
  182. /* XLATON */
  183.  
  184. /* NOINC */
  185. #ifdef __cplusplus
  186. }
  187. #endif
  188. /* INC */
  189.  
  190.