home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v6.zip / MMPM2TK / TK / H / EVCB.H < prev    next >
C/C++ Source or Header  |  1992-09-15  |  14KB  |  229 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.  
  14. /* XLATOFF */
  15. #pragma pack(4)
  16. /* XLATON */
  17.  
  18. /**********************************************
  19.  * List of Implicit events:
  20.  *    EVENT_EOS                 - Use IMPL_EVCB
  21.  *    EVENT_ERROR               - Use IMPL_EVCB
  22.  *    EVENT_STREAM_STOPPED      - Use IMPL_EVCB
  23.  *    EVENT_SYNC_PREROLLED      - Use IMPL_EVCB
  24.  *    EVENT_PLAYLISTMESSAGE     - Use PLAYL_EVCB
  25.  *    EVENT_PLAYLISTCUEPOINT    - Use PLAYL_EVCB
  26.  *    EVENT_QUEUE_OVERFLOW      - Use IMPL_EVCB
  27.  **********************************************/
  28.  
  29. /**********************************************
  30.  * List of Explicit events:
  31.  *    EVENT_SYNCOVERRUN         - Use OVRU_EVCB
  32.  *    EVENT_CUE_TIME            - Use TIME_EVCB
  33.  *    EVENT_CUE_DATA            - Use DATA_EVCB
  34.  *    EVENT_DATAUNDERRUN        - Use EVCB
  35.  *    EVENT_DATAOVERRUN         - Use EVCB
  36.  *    EVENT_CUE_TIME_PAUSE      - Use TIME_EVCB
  37.  **********************************************/
  38. #define EVENT_SYNCOVERRUN       4L
  39. #define EVENT_CUE_TIME          5L       /* Cue point in terms of stream time*/
  40. #define EVENT_CUE_DATA          6L       /* Cue point in terms of data items */
  41. #define EVENT_DATAUNDERRUN      7L       /* data underrun event from SH    */
  42. #define EVENT_DATAOVERRUN       8L       /* data underrun event from SH    */
  43. #define EVENT_CUE_TIME_PAUSE    9L       /* Pause when cue-point reached.  */
  44.  
  45.  
  46.  
  47. /**********************************************
  48.  * SYNC_EVCB - Sync Pulse Event Control Block
  49.  *             (This event is only seen by
  50.  *              stream handlers)
  51.  **********************************************/
  52. #define EVENT_SYNC              1L     /* Synchronization point in stream  */
  53. typedef struct  _SYNC_EVCB { /* syevcb                                     */
  54.    ULONG   ulType;                     /* EVENT_SYNC                       */
  55.    ULONG   ulSubType;                  /* Not used                         */
  56.    ULONG   ulSyncFlags;                /* 0 (input),status (output)        */
  57.    HSTREAM hstream;                    /* handle to stream for this event  */
  58.    HID     hid;                        /* Handler id                       */
  59.    ULONG   ulStatus;                   /* Event status (output)            */
  60.    MMTIME  mmtimeStart;                /* Filled in by Sync/Stream manager */
  61.                                        /*  at SpiEnableSync time. (input)  */
  62.    MMTIME  mmtimeMaster;               /* Filled in by Master SH (input)   */
  63.    MMTIME  mmtimeSlave;                /* Filled in by slave SH. (output)  */
  64.    } SYNC_EVCB;
  65. typedef SYNC_EVCB  FAR  *PSYNC_EVCB;             /* Ptr to a  EVCB       */
  66.  
  67. /* ulSyncFlags:                                                            */
  68. #define  SYNCOVERRUN        0x0001L    /* Set by SSM if sync pulse comes in before    */
  69.                                        /*  a has processed the current sync pulse.    */
  70. #define  SYNCPOLLING        0x0002L    /* SSM set this after filling the handler EVCB.*/
  71.                                        /*  Handler resets it after it processes the   */
  72.                                        /*  contents of EVCB. The SSM must check this  */
  73.                                        /*  bit before modifying EVCB. If bit already  */
  74.                                        /*  set, set the SYNC overrun bit.             */
  75.  
  76.  
  77. #define EVENT_RESERVED          2L     /* RESERVED                         */
  78.  
  79.  
  80. /**********************************************
  81.  * IMPL_EVCB - Implicit Event Control Block
  82.  *             (This is a parameter on the
  83.  *              SpiCreatStrem API)
  84.  **********************************************/
  85. #define EVENT_IMPLICIT_TYPE     3L     /* These events are always supported*/
  86. typedef struct  _IMPL_EVCB { /* imevcb                                     */
  87.    ULONG   ulType;                     /* EVENT_IMPLICIT_TYPE              */
  88.    ULONG   ulSubType;                  /* One of the implicit events (input) */
  89.    ULONG   ulFlags;                    /* 0 (Input), status (Output)         */
  90.    HSTREAM hstream;                    /* handle to stream for this event (input/output) */
  91.    HID     hid;                        /* 0 (input), handler Id (output)     */
  92.    ULONG   ulStatus;                   /* Event status/error return code (output) */
  93.    ULONG   unused1;                    /* 0 (input)                        */
  94.    ULONG   unused2;                    /* 0 (input)                        */
  95.    ULONG   unused3;                    /* 0 (input)                        */
  96.    } IMPL_EVCB;
  97. typedef IMPL_EVCB FAR *PIMPL_EVCB;
  98.  
  99. /* ulSubtype:                                                              */
  100. #define EVENT_EOS               1L     /* End of Stream                    */
  101. #define EVENT_ERROR             2L     /* Error in Stream handler or device driver        */
  102. #define EVENT_STREAM_STOPPED    3L     /* Stream is in a stopped state (Discard or Flush) */
  103. #define EVENT_SYNC_PREROLLED    4L     /* All streams are prerolled (buffers   */
  104.                                        /*  have been filled by the Source SH's.*/
  105. #define EVENT_PLAYLISTMESSAGE   5L     /* Memory SH playlist message event     */
  106. #define EVENT_PLAYLISTCUEPOINT  6L     /* Memory SH playlist cue point         */
  107. #define EVENT_QUEUE_OVERFLOW    7L     /* Event Queue overflow. Indicates lost */
  108.                                        /*  events. Application must use this   */
  109.                                        /*  to clear any waiting conditions.    */
  110.  
  111.  
  112. /**********************************************
  113.  * PLAYL_EVCB - Playlist Message Event Control Block
  114.  **********************************************/
  115. /* (IMPLICIT EVENT)                                                        */
  116. typedef struct  _PLAYL_EVCB { /* plevcb                                    */
  117.    ULONG   ulType;                     /* EVENT_IMPLICIT_TYPE              */
  118.    ULONG   ulSubType;                  /* EVENT_PLAYLISTMESSAGE or EVENT_PLAYLISTCUEPOINT */
  119.    ULONG   ulFlags;                    /* 0 (input), status (output)                      */
  120.    HSTREAM hstream;                    /* handle to stream for this event (input/output)  */
  121.    HID     hid;                        /* 0 (input), handler Id (output)                  */
  122.    ULONG   ulStatus;                   /* Playlist Instruction number (output)            */
  123.    ULONG   ulMessageParm;              /* 0 (input), Message from playlist (output)       */
  124.    ULONG   unused1;                    /* 0 (input)                        */
  125.    ULONG   unused2;                    /* 0 (input)                        */
  126.    } PLAYL_EVCB;
  127. typedef PLAYL_EVCB  FAR  *PPLAYL_EVCB;             /* Ptr to a  EVCB       */
  128.  
  129.  
  130. /**********************************************
  131.  * OVRU_EVCB - Sync Overrun Event Control Block
  132.  *             (Applications can request to be
  133.  *              notified whenever a Sync overrun
  134.  *              occurs.
  135.  **********************************************/
  136. typedef struct  _OVRU_EVCB { /* ovevcb */
  137.    ULONG   ulType;                     /* EVENT_SYNCOVERRUN                */
  138.    ULONG   ulSubType;                  /* Not used                         */
  139.    ULONG   ulFlags;                    /* 0 (input), status (output)       */
  140.    HSTREAM hstream;                    /* handle to stream for this event (input/output) */
  141.    HID     hid;                        /* handler Id (input/output)        */
  142.    ULONG   ulStatus;                   /* Event status/error return code (output) */
  143.    MMTIME  mmtimeSlave;                /* 0 (input), Slave stream time (output)   */
  144.    MMTIME  mmtimeStart;                /* 0 (input), Slave start offset (offset)  */
  145.    MMTIME  mmtimeMaster;               /* 0 (input), Master stream time (output)  */
  146.    } OVRU_EVCB;
  147. typedef OVRU_EVCB  FAR  *POVRU_EVCB;             /* Ptr to a  EVCB       */
  148.  
  149.  
  150. /**********************************************
  151.  * TIME_EVCB - Cue Time Event Control Block
  152.  *             (Applications can request to be
  153.  *              notified for a time cue point)
  154.  **********************************************/
  155. typedef struct  _TIME_EVCB { /* tievcb                                     */
  156.    ULONG   ulType;                     /* EVENT_CUE_TIME                   */
  157.    ULONG   ulSubType;                  /* Not used                         */
  158.    ULONG   ulFlags;                    /* Single/Recurring(input/output)   */
  159.    HSTREAM hstream;                    /* handle to stream for this event (input/output)*/
  160.    HID     hid;                        /* handler Id (input/output)                     */
  161.    ULONG   ulStatus;                   /* Event status/error return code (output)       */
  162.    MMTIME  mmtimeStream;               /* Stream time (input/output)       */
  163.    ULONG   unused1;                    /* 0 (input)                        */
  164.    ULONG   unused2;                    /* 0 (input)                        */
  165.    } TIME_EVCB;
  166. typedef TIME_EVCB  FAR  *PTIME_EVCB;             /* Ptr to a  EVCB       */
  167.  
  168. /*                                                                         */
  169. /* ulFlags:                                                                */
  170. #define EVENT_SINGLE            0L     /* This is single one time event    */
  171. #define EVENT_RECURRING         1L     /* This is recurring event          */
  172.  
  173.  
  174. /**********************************************
  175.  * DATA_EVCB - Cue Data Event Control Block
  176.  *             (Applications can request to be
  177.  *              notified for a data cue point)
  178.  **********************************************/
  179. typedef struct  _DATA_EVCB { /* daevcb                                     */
  180.    ULONG   ulType;                     /* EVENT_CUE_DATA                   */
  181.    ULONG   ulSubType;                  /* Event SubType                    */
  182.    ULONG   ulFlags;                    /* Single/Recurring(input/output)   */
  183.    HSTREAM hstream;                    /* handle to stream for this event (input/output) */
  184.    HID     hid;                        /* handler Id (input/output)                      */
  185.    ULONG   ulStatus;                   /* Event status/error return code (output)        */
  186.    MMTIME  mmtimeStream;               /* Stream time (input/output)                     */
  187.    ULONG   ulEventParm1;               /* Data to Cue on (input/output)                  */
  188.                                        /*  This is interpreted by the stream handler     */
  189.    ULONG   ulEventParm2;               /* Length of data cue buffer (input/output)       */
  190.    } DATA_EVCB;
  191. typedef DATA_EVCB  FAR  *PDATA_EVCB;             /* Ptr to a  EVCB       */
  192.  
  193. /* ulFlags:                                                                */
  194. /*#define EVENT_SINGLE          0L        This is single one time event    */
  195. /*#define EVENT_RECURRING       1L        This is recurring event          */
  196. #define EVENT_DATAPTR           2L     /* ulEventParm1 if ptr to buffer and*/
  197.                                        /*  ulEventParm2 is a length of buffer, */
  198.                                        /*  else ulEventParm1 is data.          */
  199.  
  200.  
  201. /******************
  202.  * EVCB_ulType:  (Stream Handler defined types)
  203.  ******************/
  204. #define SH_TYPE           0x80000000L  /* Stream Handler defined types must */
  205.                                        /* have the high order bit set in the*/
  206.                                        /* ulType field.                     */
  207.                                        /* events: 0H - 7FFFFFFFH are reserved!*/
  208.  
  209. /**********************************************
  210.  * EVCB - Generic Event Control Block (Use the
  211.  *        specific one in the SSM.H if possible)
  212.  **********************************************/
  213. typedef struct  _EVCB { /* evcb */
  214.    ULONG   ulType;                     /* Event type (input)               */
  215.    ULONG   ulSubType;                  /* Event SubType (input)            */
  216.    ULONG   ulFlags;                    /* 0 (Input), status (Output)       */
  217.    HSTREAM hstream;                    /* handle to stream for this event  */
  218.    HID     hid;                        /* handler Id (input/output)        */
  219.    ULONG   ulStatus;                   /* Event status (output)            */
  220.    ULONG   ulEventParm1;               /* Event parameters (input), HID if implicit event */
  221.    ULONG   ulEventParm2;               /* Event parameters (input)         */
  222.    ULONG   ulEventParm3;               /* Event parameters (input)         */
  223.    } EVCB;
  224. typedef EVCB  FAR  *PEVCB;             /* Ptr to a  EVCB       */
  225.  
  226. /* XLATOFF */
  227. #pragma pack()
  228. /* XLATON */
  229.