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