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