home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / video / palmap / palmap.h < prev    next >
Encoding:
Text File  |  1997-10-05  |  1.3 KB  |  40 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (C) 1992 - 1997 Microsoft Corporation.  All Rights Reserved.
  9.  * 
  10.  **************************************************************************/
  11.  
  12. //
  13. // To use this function:
  14. //
  15. // ps should be a PAVISTREAM representing a video stream that you want
  16. // to construct a single palette for.
  17. //
  18. // The function will read lots of video frames from stream ps, construct
  19. // a palette containing nColors colors, and return a new stream pointer in
  20. // ppsMapped.
  21. //
  22. // The new stream will be an 8-bit video stream, which you can then
  23. // use like any other stream.  Specifically, you can pass it to AVISave.
  24. //
  25. STDAPI AVICreateMappedStream(
  26.     PAVISTREAM FAR *ppsMapped,
  27.     PAVISTREAM ps,
  28.     int nColors);
  29.  
  30. //
  31. // This function is called internally by AVICreateMappedStream, but you
  32. // might conceivably want to call it yourself.
  33. //
  34. STDAPI AVIStreamMakePalette(
  35.     PAVISTREAM pavi, 
  36.     LONG lSkip,
  37.     HPALETTE FAR *lphpal,
  38.     LPBYTE lp16to8,
  39.     int nColors);
  40.