home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warptlk3.zip / TOOLKIT / H / CODEC.H < prev    next >
C/C++ Source or Header  |  1995-08-24  |  27KB  |  607 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* Module Name: CODEC.H                                                     */
  4. /*                                                                          */
  5. /* OS/2 2.0 Multimedia Extensions CODEC  Definitions file                   */
  6. /*                                                                          */
  7. /* Copyright (c) International Business Machines Corporation 1992, 1993,    */
  8. /*                        All Rights Reserved                               */
  9. /*                                                                          */
  10. /****************************************************************************/
  11.  
  12. #ifndef _CODEC_H_
  13. #define _CODEC_H_
  14.  
  15. /* XLATOFF */
  16. #pragma pack(4)
  17. /* XLATON */
  18.  
  19. #ifdef INCL_AUDIO_CODEC
  20. #define INCL_AUDIO_CODEC_ONLY
  21. #endif
  22. #ifndef INCL_AUDIO_CODEC
  23. #define INCL_AUDIO_CODEC
  24. #endif
  25.  
  26.  
  27. /******************
  28.  * Defines:
  29.  ******************/
  30.  
  31. /* Ultimotion CODEC type for CODECINIFILEINFO ulCompressType */
  32. #define  FOURCC_ULTI       mmioFOURCC('U', 'L', 'T', 'I')
  33. #define  HEX_FOURCC_ULTI   0x49544C55L     /* ITLU */
  34.  
  35. /* Indeo CODEC type for CODECINIFILEINFO ulCompressType */
  36. #define  FOURCC_RT21       mmioFOURCC('R', 'T', '2', '1')
  37. #define  HEX_FOURCC_RT21   0x31325452L     /* 12TR */
  38.  
  39. /* Mondo CODEC type for CODECINIFILEINFO ulCompressType */
  40. #define  FOURCC_DIB        mmioFOURCC('D', 'I', 'B', ' ')
  41. #define  HEX_FOURCC_DIB    0x20424944L     /*  BID */
  42.  
  43. /**********************************************
  44.  *
  45.  * GENPAL - Generic Header Palette
  46.  *
  47.  **********************************************/
  48. #ifndef INCL_AUDIO_CODEC_ONLY
  49.  
  50. typedef struct _GENPAL {          /* genpal */
  51.    ULONG       ulStartIndex;      /* starting RGB index */
  52.    ULONG       ulNumColors;       /* number of following entries */
  53.    PRGB2       prgb2Entries;      /* 256 RGB entries */
  54.    } GENPAL;
  55. typedef GENPAL *PGENPAL;          /* Ptr to a generic palette */
  56.  
  57.  
  58. /**********************************************
  59.  *
  60.  * CODECVIDEOHEADER - CODEC video Header
  61.  *
  62.  **********************************************/
  63. typedef struct _CODECVIDEOHEADER {  /* codecvidhdr */
  64.    ULONG  ulStructLen;
  65.    ULONG  cx;
  66.    ULONG  cy;
  67.    USHORT cPlanes;
  68.    USHORT cBitCount;
  69.    ULONG  ulColorEncoding;
  70.    GENPAL genpal;
  71. } CODECVIDEOHEADER;
  72. typedef CODECVIDEOHEADER *PCODECVIDEOHEADER;
  73.  
  74. /* ulColorEncoding defines: */
  75. #define  MMIO_RGB_5_6_5    0x0001L  /* Each pixel is a RGB_5_6_5 datatype */
  76. #define  MMIO_RGB_24       0x0002L  /* Each pixel is a RGB_24 datatype */
  77. #define  MMIO_YUV_4_1_1    0x0004L  /* Each pixel is a YUV_4_1_1 datatype */
  78. #define  MMIO_COMPRESSED   0x0008L  /* The data is compressed */
  79. #define  MMIO_YUV_24       0x0010L  /* Each pixel is a YUV_24 datatype */
  80. #define  MMIO_PALETTIZED   0x0020L  /* The data is palettized */
  81. #define  MMIO_OS2_BITMAP24 0x0020L  /* The data is palettized */
  82.  
  83.  
  84. /**********************************************
  85.  *
  86.  * MMVIDEOOPEN - Video Open Structure
  87.  *
  88.  * This structure is passed on the CODEC open
  89.  * message when video compression is being done
  90.  * to indicate information such as quality,
  91.  * frame rate, data rate, and key frame rate.
  92.  *
  93.  * Quality:
  94.  *
  95.  * The ulQuality field specifies a scalar value
  96.  * in the range 0 - 10000, where 0 is the lowest
  97.  * quality and 10000 is the highest quality.  A
  98.  * value of -1 specifies the default quality level,
  99.  * and the default quality level (e.g. 5000) is
  100.  * returned in the ulQuality field.
  101.  *
  102.  *
  103.  * Key Frame rate:
  104.  *
  105.  * The ulKeyFrameRate structure specifies the key
  106.  * frame (aka I-frame, reference frame) frequency.
  107.  * Every Nth frame is a key frame as specified.
  108.  * A value of zero specifies that no periodic key
  109.  * are to be compressed.  Additional key frames may
  110.  * be inserted at any point by specifying
  111.  * MMIO_IS_KEY_FRAME in the MMCOMPRESS structure.
  112.  *
  113.  * example:  ulKeyFrameRate = 5  results in:
  114.  *
  115.  *    key delta delta delta delta key delta delta delta delta key delta...
  116.  *
  117.  *
  118.  * Frame rate:
  119.  *
  120.  * Rate = number of time units per second
  121.  * Scale = number of time units per frame
  122.  *
  123.  * examples:  Rate = 30  Scale = 1     =>    30 FPS
  124.  *            Rate = 15  Scale = 1     =>    15 FPS
  125.  *            Rate = 25  Scale = 2     =>    12.5 FPS
  126.  *
  127.  *
  128.  * Data Constraint:
  129.  *
  130.  * Compressors which are capable of constraining the
  131.  * resultant compressed video data rate use the
  132.  * information in the ulDataConstraint and
  133.  * ulConstraintInterval fields.  A non-zero value
  134.  * in ulDataConstraint specifies the number of bytes
  135.  * which is not to be exceeded over an interval of
  136.  * frames in the output data stream, regardless of
  137.  * the requested quality level.  This value only
  138.  * considers video data, i.e. audio data and file format
  139.  * overhead must be considered seperately when determining
  140.  * the final output file data rate.  The interval of
  141.  * frames over which the data is constrained is specified
  142.  * in ulConstraintInterval.  A value of zero for
  143.  * ulDataContraint specifies that the data rate is not
  144.  * to be constrained and is compressed according to
  145.  * the requested quality level.
  146.  *
  147.  * example 1:  ulDataConstraint = 150000   ulConstraintInterval = 15
  148.  *
  149.  *             This results in an output stream wherein the sizes of any 15
  150.  *             consecutive frames does not exceed 150000 bytes.  If the
  151.  *             frame rate is 15 FPS, the resultant data rate will not
  152.  *             exceed 150000 bytes per second.
  153.  *
  154.  * example 2:  ulDataConstraint = 10000    ulConstraintInterval = 1
  155.  *
  156.  *             This results in an output stream wherein any single frame
  157.  *             does not exceed 10000 bytes.  If the frame rate is 15 FPS,
  158.  *             the resultant data rate will not exceed 150000 bytes per
  159.  *             second.  Note the difference between this case and example 1
  160.  *             where individual frames may exceed 10000 bytes (the average)
  161.  *             so long other frames in any 15 frame sequence are sufficiently
  162.  *             smaller to satisfy the constraint within the constraint interval.
  163.  *
  164.  **********************************************/
  165. typedef struct _MMVIDEOOPEN  {      /* mmvidopen */
  166.    ULONG       ulStructLen;
  167.    ULONG       ulQuality;
  168.    ULONG       ulKeyFrameRate;
  169.    ULONG       ulScale;
  170.    ULONG       ulRate;
  171.    ULONG       ulDataConstraint;
  172.    ULONG       ulConstraintInterval;
  173.    } MMVIDEOOPEN;
  174. typedef MMVIDEOOPEN *PMMVIDEOOPEN;
  175.  
  176. #endif
  177.  
  178.  
  179. typedef struct _MMAUDIOOPEN
  180.   {
  181.   ULONG   ulStructLen;         /* Length of struct */
  182.   ULONG   ulSamplesPerBlock;   /* Samples in each block of compressed data */
  183.   ULONG   ulBytesPerBlock;     /* uncompressed bytes in each block */
  184.   ULONG   ulFlags;             /* Compression flags */
  185.   ULONG   ulBestGuess;         /* Guess at avg. compression ratio */
  186.   ULONG   ulBlockAlignment;    /* Block alignment of codec */
  187.   ULONG   ulLength;            /* Length of the file */
  188.   ULONG   hCodec;              /* Codec handle */
  189.   PCODECPROC pfnCodec;
  190.   } MMAUDIOOPEN;
  191.  
  192. typedef MMAUDIOOPEN    *PMMAUDIOOPEN;
  193.  
  194.  
  195. /* defines for the ulFlags field of the BUFER_INFORMATION */
  196. #define BLOCK_ORIENTED        0x00000001
  197. #define NON_LINEAR            0x00000002
  198. #define INIT_CODEC            0x00000004
  199.  
  200.  
  201.  
  202. /**********************************************
  203.  *
  204.  * CODECOPEN - CODEC open structure
  205.  *
  206.  **********************************************/
  207. typedef struct _CODECOPEN  {        /* codecopen */
  208.    ULONG       ulFlags;             /* flags & events - Refer to ulCapsFlags in CODECINIFILEINFO */
  209.    PVOID       pControlHdr;         /* control header - (codec specific) */
  210.    PVOID       pSrcHdr;             /* source header - Ptr CODECVIDEOHEADER */
  211.    PVOID       pDstHdr;             /* destination header - Ptr CODECVIDEOHEADER */
  212.    PVOID       pOtherInfo;          /* other information - Ptr MMVIDEOOPEN/MMAUDIOOPEN */
  213.    } CODECOPEN;
  214. typedef CODECOPEN *PCODECOPEN;
  215.  
  216. #define VALID_CODECOPEN_INPUTFLAGS   (CODEC_DECOMPRESS |       \
  217.                                       CODEC_WINDOW_CLIPPING |  \
  218.                                       CODEC_PALETTE_TRANS |    \
  219.                                       CODEC_SELFHEAL |         \
  220.                                       CODEC_SCALE_PEL_DOUBLE | \
  221.                                       CODEC_SCALE_PEL_HALVED | \
  222.                                       CODEC_SCALE_CONTINUOUS | \
  223.                                       CODEC_MULAPERTURE |      \
  224.                                       CODEC_HARDWARE |         \
  225.                                       CODEC_DIRECT_DISPLAY)
  226.  
  227.  
  228. #ifdef INCL_AUDIO_CODEC
  229.  
  230.  
  231. /* Stream handler communication */
  232.  
  233. typedef struct _AUDIO_CODEC_INFO
  234.   {
  235.   ULONG   ulStructLen;         /* Length of struct */
  236.   ULONG   ulBytesPerBlock;     /* uncompressed bytes in each block */
  237.   ULONG   ulBlockAlignment;    /* Block alignment of codec */
  238.   ULONG   hCodec;              /* Codec handle */
  239.   PCODECPROC  pfnCodec;
  240. /*  LONG (* APIENTRY pfnCodec) (PVOID, SHORT, LONG, LONG); */
  241.   } AUDIO_CODEC_INFO;
  242.  
  243. #define  AUDIO_CODEC_INF    1000
  244.  
  245. #endif
  246.  
  247. /**********************************************
  248.  *
  249.  * MMCOMPRESS - Compress structure
  250.  *
  251.  **********************************************/
  252. typedef struct _MMCOMPRESS  {     /* mmcomp */
  253.    ULONG       ulStructLen;       /* length of this structure */
  254.    ULONG       ulFlags;           /* command and status flags */
  255.    ULONG       ulSrcBufLen;       /* source buffer size */
  256.    PVOID       pSrcBuf;           /* source buffer */
  257.    ULONG       ulDstBufLen;       /* destination buffer length */
  258.    PVOID       pDstBuf;           /* destination buffer */
  259.    PVOID       pRunTimeInfo;      /* control information */
  260.    } MMCOMPRESS;
  261. typedef MMCOMPRESS *PMMCOMPRESS;
  262.  
  263. /* ulFlags Input values for MMCOMPRESS structure:                */
  264. /* Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
  265. /* below, but are listed here for information purposes only.     */
  266. /* MMIO_IS_KEY_FRAME         This bit is set by the application  */
  267. /*                           to instruct the IOProc to compress  */
  268. /*                           the pSrcBuf into a key or reference */
  269. /*                           frame.  If the bit is not set, a    */
  270. /*                           delta frame is compressed.          */
  271. /* MMIO_IS_PALETTE           A video palette is provided.  This  */
  272. /*                           is set by the application.          */
  273.  
  274.  
  275. /**********************************************
  276.  *
  277.  * MMVIDEOCOMPRESS - Video Compress structure
  278.  *
  279.  **********************************************/
  280. #ifndef INCL_AUDIO_CODEC_ONLY
  281.  
  282. typedef struct _MMVIDEOCOMPRESS { /* mmvidcomp */
  283.    ULONG       ulStructLen;       /* Structure length */
  284.    GENPAL      genpalVideo;       /* Video stream palette */
  285.    PVOID       pControlHdr;       /* control header (codec specific) */
  286.    } MMVIDEOCOMPRESS;
  287. typedef MMVIDEOCOMPRESS *PMMVIDEOCOMPRESS;
  288.  
  289. #endif
  290.  
  291.  
  292. #ifdef INCL_AUDIO_CODEC
  293.  
  294. #define   START_DECOMPRESSION     0x00000001
  295. #define   CONTINUE_DECOMPRESSION  0x00000002
  296. #define   START_SEEK              0x00000004
  297. #define   CONTINUE_SEEK           0x00000008
  298.  
  299. #endif
  300.  
  301. /**********************************************
  302.  *
  303.  * MMDECOMPRESS - Decompress Structure
  304.  *
  305.  **********************************************/
  306. typedef struct _MMDECOMPRESS  {   /* mmdec */
  307.    ULONG       ulStructLen;       /* length of this structure */
  308.    ULONG       ulFlags;           /* command and status flags */
  309.    ULONG       ulSrcBufLen;       /* source buffer size */
  310.    PVOID       pSrcBuf;           /* source buffer */
  311.    ULONG       ulDstBufLen;       /* destination buffer length */
  312.    PVOID       pDstBuf;           /* destination buffer */
  313.    PVOID       pRunTimeInfo;      /* control information Ptr to MMVIDEODECOMPRESS */
  314.    } MMDECOMPRESS;
  315. typedef MMDECOMPRESS *PMMDECOMPRESS;
  316.  
  317. /* ulFlags defines: */
  318. #define MMIO_DROP_DELTA_FRAME 0x0001L /* Input/Output - Tells the IOProc to drop the delta */
  319.                                       /* frame if the pSrcBuf contains a delta */
  320.                                       /* frame.  On return, the bit is reset */
  321.                                       /* if the delta frame is dropped. */
  322. #define MMIO_IS_KEY_FRAME     0x0002L /* Output - This bit is set by the IOProc when */
  323.                                       /* the data contained in the pSrcBuf is */
  324.                                       /* a key or reference frame. */
  325. #define MMIO_IS_PALETTE       0x0004L /* Output - A video palette has been found. */
  326.                                       /* This is set by the IOProc. */
  327. #define MMIO_PALETTE_CHANGE   0x0008L /* Input - The physical palette has been changed */
  328.                                       /* in...  This is set by the application. */
  329. #define MMIO_ORIGIN_LOWERLEFT 0x0010L /* Input - The video frame origin */
  330. #define MMIO_RECTL_CHANGE     0x0020L /* Input - The valid rectl list has changed. */
  331. #define MMIO_ORIGIN_UPPERLEFT 0x0040L /* Input - The video frame origin */
  332. #define MMIO_DROP_FRAME_DECODE 0x0080L /* Input - Tells the IOProc to drop decoding  */
  333. #define MMIO_HIGH_QUALITY      0x0100L /* Input - Tells Codec to render best */
  334.                                        /* quality image - not time critical */
  335. #define MMIO_IGNORE_CLIPPING   0x0200L /* Ignore clipping rectangles used for bitmap capture */
  336.                                        /* high performance */
  337. #define MMIO_OUTPUT_FULL_IMAGE 0x0400L /* Output a complete image on decompress, even if this*/
  338.                                        /* is a delta frame */
  339.                                       /* of the frame.                         */
  340.  
  341. #define VALID_DECOMPRESS_INPUTFLAGS   (MMIO_DROP_DELTA_FRAME | \
  342.                                        MMIO_PALETTE_CHANGE |   \
  343.                                        MMIO_ORIGIN_LOWERLEFT | \
  344.                                        MMIO_RECTL_CHANGE |     \
  345.                                        MMIO_DROP_FRAME_DECODE | \
  346.                                        MMIO_ORIGIN_UPPERLEFT | \
  347.                                        MMIO_HIGH_QUALITY | \
  348.                                        MMIO_IGNORE_CLIPPING | \
  349.                                        MMIO_OUTPUT_FULL_IMAGE)
  350.  
  351.  
  352. #ifdef INCL_AUDIO_CODEC
  353.  
  354. #define   START_COMPRESSION     0x00000001
  355. #define   CONTINUE_COMPRESSION  0x00000002
  356. #define   SOURCE_UNUSED         0x00000004
  357. #define   TARGET_UNUSED         0x00000008
  358.  
  359.  
  360. #endif
  361.  
  362.  
  363. /**********************************************
  364.  *
  365.  * MMVIDEODECOMPRESS - Video Decompress structure
  366.  *
  367.  **********************************************/
  368. #ifndef INCL_AUDIO_CODEC_ONLY
  369. typedef struct _MMVIDEODECOMPRESS {    /* mmviddec */
  370.    ULONG       ulStructLen;            /* Structure length */
  371.    ULONG       ulRectlCount;           /* Valid rectangle count - for clipping */
  372.    PRECTL      prectl;                 /* Valid rectangle array - for clipping */
  373.    ULONG       ulSkipLength;           /* Skipped line length */
  374.    ULONG       ulDecodeLines;          /* Num of lines to decompress */
  375.    GENPAL      genpalPhysical;         /* Physical palette */
  376.    GENPAL      genpalVideo;            /* Video stream palette */
  377.    RECTL       rectlSrc;               /* Source window rectangle */
  378.    RECTL       rectlDst;               /* Destination window rectangle */
  379.    ULONG       ulDeltaCount;           /* Number of remaining delta frames before the next I-Frame */
  380.    ULONG       ulParm1;                /* Codec specific parm */
  381.    ULONG       ulParm2;                /* Codec specific parm */
  382.    ULONG       ulParm3;                /* Codec specific parm */
  383.    ULONG       ulParm4;                /* Codec specific parm */
  384.    } MMVIDEODECOMPRESS;
  385. typedef MMVIDEODECOMPRESS *PMMVIDEODECOMPRESS;
  386.  
  387. #endif
  388. /*************************************************
  389.  *
  390.  * RECORDTAB - Record table
  391.  *
  392.  * NOTE: This structure maps to ESRCBUFTAB in ssm.h
  393.  *************************************************/
  394. typedef struct _RECORDTAB {       /* recordtab */
  395.    ULONG       ulReserved1;       /* reserved for system */
  396.    PVOID       pRecord;           /* ptr to record in buffer */
  397.    ULONG       ulLength;          /* length of record */
  398.    ULONG       ulReserved2;       /* reserved for system */
  399.    ULONG       ulReserved3;       /* reserved for system */
  400.    ULONG       ulParm1;           /* Record specific data */
  401.    ULONG       ulParm2;           /* Record specific data */
  402.    } RECORDTAB;
  403. typedef RECORDTAB FAR *PRECORDTAB;/* Ptr to a buffer entry  */
  404.  
  405.  
  406. /***************************************************
  407.  *
  408.  * RECORDTABWRITE - Record table for video write
  409.  *
  410.  * NOTE: This structure maps to ETGTBUFTAB in ssm.h
  411.  ***************************************************/
  412. typedef struct _RECORDTABWRITE {       /* recordtab */
  413.    PVOID       pRecord;           /* ptr to record in buffer */
  414.    ULONG       ulReserved1;       /* reserved for system */
  415.    ULONG       ulLength;          /* length of record */
  416.    ULONG       ulReserved2;       /* reserved for system */
  417.    ULONG       ulReserved3;       /* reserved for system */
  418.    ULONG       ulParm1;           /* Record specific data */
  419.    ULONG       ulParm2;           /* Record specific data */
  420.    } RECORDTABWRITE;
  421. typedef RECORDTABWRITE FAR *PRECORDTABWRITE;/* Ptr to a buffer entry  */
  422.  
  423.  
  424. /* ulParm1 Return values for MULTITRACK_READ only:               */
  425. /* Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
  426. /* above, but are listed here for information purposes only      */
  427. /* as they are valid ulParm1 Return values for MULTITRACK_READ.  */
  428. /* MMIO_IS_KEY_FRAME         Frame is a Key frame                */
  429. /* MMIO_IS_PALETTE           Buffer contains a video palette     */
  430. #define MMIO_INVISIBLE_FRAME   0x1000L    /* Indicates a invisible video frame */
  431. #define MMIO_NULL_FRAME        0x2000L    /* Indicates a null video frame (zero length) */
  432.  
  433. /* ulParm2 Return values for MULTITRACK_READ only:               */
  434. /*    This field contains the frame number for this video frame  */
  435. /*    if this track is a video track.                            */
  436.  
  437.  
  438.  
  439. /* ulParm1 Input values for MULTITRACK_WRITE only:               */
  440. /* Note:  MMIO_IS_KEY_FRAME and MMIO_IS_PALETTE are defined      */
  441. /* above, but are listed here for information purposes only      */
  442. /* as they are valid ulParm1 Input values for MULTITRACK_WRITE.  */
  443. /* MMIO_IS_KEY_FRAME         Frame is a Key frame                */
  444. /* MMIO_IS_PALETTE           Buffer contains a video palette     */
  445.  
  446. /* ulParm2 Input values for MULTITRACK_WRITE only:               */
  447. /*    This field contains the number of null frames              */
  448. /*    that should be inserted before this frame                  */
  449. /*    (this recordtab entry).                                    */
  450.  
  451.  
  452. /************************************************
  453.  *
  454.  *  TRACKMAP - This structure maps a track to
  455.  *             a record table.
  456.  *
  457.  ************************************************/
  458. typedef struct _TRACKMAP {        /* trackmap */
  459.    ULONG       ulTrackID;         /* Input - track ID */
  460.    ULONG       ulNumEntries;      /* Input - number of record entries */
  461.    PRECORDTAB  pRecordTabList;    /* Input/Output - Ptr to a record table */
  462.    } TRACKMAP;
  463. typedef TRACKMAP *PTRACKMAP;      /* Ptr to a track map table entry */
  464.  
  465.  
  466.  
  467. #ifndef INCL_AUDIO_CODEC_ONLY
  468.  
  469. /**********************************************
  470.  *
  471.  * MMMULTITRACKREAD - Multiple Track Read
  472.  *
  473.  **********************************************/
  474. typedef struct _MMMULTITRACKREAD  {   /* mtread */
  475.    ULONG       ulLength;          /* Input - Size of buffer to read.  The IO should be performed on this size of  */
  476.                                   /*          buffer.  The actual buffer size may be bigger and is given in the   */
  477.                                   /*          ulBufferLength field below.  Video frames can span pBuffer+ulLength */
  478.                                   /*          as long as the frame is less than the ulBufferLength in size.       */
  479.                                   /*          The purpose of this is to break the IO reads into smaller sizes     */
  480.                                   /*          while still allowing large frame sizes.                             */
  481.    PVOID       pBuffer;           /* Input - ptr to read buffer           */
  482.    ULONG       ulFlags;           /* Input/Output - read flags            */
  483.    ULONG       ulNumTracks;       /* Input - number of track entries      */
  484.    PTRACKMAP   pTrackMapList;     /* Input - ptr to track-to-record list  */
  485. /* End of old MMMULTITRACKREAD structure */
  486.    ULONG       ulBufferLength;    /* Input - Actual length of read buffer */
  487.    ULONG       ulReserved;        /* Input - Reserved (must be 0)         */
  488.    } MMMULTITRACKREAD;
  489. typedef MMMULTITRACKREAD *PMMMULTITRACKREAD;
  490.  
  491. /* ulFlags Input Values: */
  492. #define MULTITRACKREAD_EXTENDED       0x0004L /* Indicates that the new extended multitrack   */
  493.                                               /* read structure is passed from caller instead */
  494.                                               /* of the previous multitrack read structure.   */
  495.  
  496. /* ulFlags Return Values: */
  497. #define MULTITRACKREAD_NOTDONE        0x0001L /* Read is not done.  Another read of the same        */
  498.                                               /* buffer is necessary.  There were not enough record */
  499.                                               /* entries in the record table passed to this api.    */
  500. #define MULTITRACKREAD_EOF            0x0002L /* End of File.  Used because # bytes read may not    */
  501.                                               /* match the length of the buffer in cases of a       */
  502.                                               /* record that spans in the next buffer.              */
  503.  
  504.  
  505. /**********************************************
  506.  *
  507.  * MMMULTITRACKWRITE - Multiple Track Write
  508.  *
  509.  **********************************************/
  510. typedef struct _MMMULTITRACKWRITE  {   /* mtwrite */
  511.    ULONG       ulNumTracks;       /* Input - number of track entries     */
  512.    PTRACKMAP   pTrackMapList;     /* Input - ptr to track-to-record list */
  513.    ULONG       ulFlags;           /* Input - write flags (Default = 0)   */
  514.    ULONG       ulReserved;        /* Input - Reserved (must be 0)        */
  515.    } MMMULTITRACKWRITE;
  516. typedef MMMULTITRACKWRITE *PMMMULTITRACKWRITE;
  517.  
  518. /* ulFlags Input Values: */
  519. #define MULTITRACKWRITE_MERGE        0x0001L /* Attempt to interleave the data on the write. */
  520.                                              /* The default (without this flag set) is to    */
  521.                                              /* write all records for each track then write  */
  522.                                              /* all records of the next track and so on.     */
  523.  
  524.  
  525. /**********************************************
  526.  *
  527.  * MMMOVIEHEADER - standard movie header data
  528.  *
  529.  **********************************************/
  530. typedef struct _MMMOVIEHEADER {   /* mmhdr */
  531.    ULONG         ulStructLen;       /* length of this structure */
  532.    ULONG         ulContentType;     /* movie content type */
  533.    ULONG         ulMediaType;       /* video media type */
  534.    ULONG         ulMovieCapsFlags;  /* capabilities */
  535.    ULONG         ulMaxBytesPerSec;  /* maximum transfer rate */
  536.    ULONG         ulPaddingGranularity;/* pad to a multiple of this size */
  537.    ULONG         ulSuggestedBufferSize;
  538.    ULONG         ulStart;           /* delay time marking beginning or start of movie */
  539.    ULONG         ulLength;
  540.    ULONG         ulNextTrackID;     /* next available track id */
  541.    ULONG         ulNumEntries;      /* number of track entries */
  542.    PMMTRACKINFO  pmmTrackInfoList;  /* track information */
  543.    PSZ           pszMovieTitle;     /* movie title */
  544.    ULONG         ulCountry;         /* country code for the title string */
  545.    ULONG         ulCodePage;        /* country code page the title string */
  546.    ULONG         ulAvgBytesPerSec;  /* average transfer rate */
  547.    } MMMOVIEHEADER;
  548. typedef MMMOVIEHEADER *PMMMOVIEHEADER;
  549.  
  550. /* ulMovieCapsFlags Defines: */
  551. #define  MOVIE_HAS_VIDEO         0x0001L  /* The movie contains video. */
  552. #define  MOVIE_HAS_AUDIO         0x0002L  /* The movie contains audio. */
  553. #define  MOVIE_CAN_SEEK          0x0004L  /* The movie can seek. */
  554. #define  MOVIE_CAN_SCAN          0x0008L  /* The movie can fast scan. */
  555. #define  MOVIE_HAS_COPYRIGHT     0x0010L  /* The movie contains copyrighted data. */
  556. #define  MOVIE_WAS_CAPTUREFILE   0x0020L  /* The movie is a specially allocated  */
  557.                                           /* file used for capturing real-time */
  558.                                           /* video.  Applications should warn  */
  559.                                           /* the user before writing over a file */
  560.                                           /* with this flag set because the user  */
  561.                                           /* probably defragmented this file. */
  562.                                           /* If this flag is set, then there is a chance */
  563.                                           /* that not all of the records will be written */
  564.                                           /* on the call. Caller must check for this whether */
  565.                                           /* this flag is set or not. */
  566.  
  567. /**********************************************
  568.  *
  569.  * MMVIDEOHEADER - Movie Video Track Header
  570.  *
  571.  **********************************************/
  572. typedef struct _MMVIDEOHEADER {   /* mmvhdr */
  573.    ULONG         ulStructLen;       /* length of this structure */
  574.    ULONG         ulContentType;     /* video content type */
  575.    ULONG         ulMediaType;       /* video media type */
  576.    ULONG         ulVideoCapsFlags;  /* capabilities */
  577.    ULONG         ulWidth;           /* video width in pels */
  578.    ULONG         ulHeight;          /* video height in pels */
  579.    ULONG         ulScale;
  580.    ULONG         ulRate;            /* Rate / Scale == frames/second */
  581.    ULONG         ulStart;           /* delay time marking beginning or start of stream */
  582.    ULONG         ulLength;
  583.    ULONG         ulTotalFrames;     /* total number of video frames */
  584.    ULONG         ulInitialFrames;
  585.    MMTIME        mmtimePerFrame;    /* frame display time or 0L */
  586.    ULONG         ulSuggestedBufferSize;
  587.    GENPAL        genpalVideo;       /* palette */
  588.    PMMXDIBHEADER pmmXDIBHeader;     /* windows DIB compatible header */
  589.    } MMVIDEOHEADER;
  590. typedef MMVIDEOHEADER *PMMVIDEOHEADER;
  591.  
  592. #endif  /* not an audio codec */
  593.  
  594.  
  595.  
  596. /* ulContentType Defines: */
  597. #define MMIO_VIDEO_UNKNOWN          0x00000000L  /* Unknown video content */
  598. #define MMIO_VIDEO_DATA             0x00000001L  /* Video                 */
  599.  
  600. /* XLATOFF */
  601. #pragma pack()
  602. /* XLATON */
  603.  
  604. #endif /* _CODEC_H_ */
  605.  
  606.  
  607.