Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
3.5 KiB

  1. CHANGES TO MCIAVI FOR 1.X:
  2. "other" streams are handled correctly, rectangle's will be
  3. mapped correctly and draw handlers will be called.
  4. draw handlers:
  5. DIB draw handler, there can now be a draw device for uncomressed
  6. frames, for example hardware can stretch frames, but does not
  7. need to decomptress.
  8. the full screen draw handler (DIB draw handler...) can be replaced.
  9. custom draw handlers can be installed per stream. (a app can
  10. override the default). This is done with a new MCI command
  11. to set the draw procedure.
  12. formats:
  13. 32 bit DIBs are supported, a decompressor can decompress to
  14. a 32 bit DIB if wants to.
  15. decompression to special DIB formats:
  16. upside down DIB
  17. MCIAVI will ask the decompressor in decompress to a "upside down"
  18. DIB. a "upside down" is a DIB with the scans stored in memory
  19. top scan to bottom scan, (normal DIBs are stored bottom to top)
  20. a "upside down" DIB will have a negative biHeight, the height
  21. of the DIB is abs(biHeight). the bits pointer passed points
  22. to the top scan, ie the first one.
  23. special DIB formats:
  24. to handle decompression to internal bitmaps in memory, a "new"
  25. DIB format is used, when biCompression == 'BITM' the DIB memory
  26. is in HUGE BITMAP format:
  27. biCompression 'BITM'
  28. biHeight will be <0 for a top to bottom bitmap.
  29. biXPelsPerMeter will be the width bytes of the bitmap.
  30. biYPelsPerMeter will be the fill bytes of the bitmap.
  31. key frame info:
  32. a new structure is passed to ICM_DECOMPRESS:
  33. struct {
  34. DWORD dwFlags; // flags (from AVI index...)
  35. LPBITMAPINFOHEADER lpbiInput; // BITMAPINFO of compressed data
  36. LPVOID lpInput; // compressed data
  37. LPBITMAPINFOHEADER lpbiOutput; // DIB to decompress to
  38. LPVOID lpOutput;
  39. DWORD ckid; // ckid from AVI file
  40. int iFrame; // frame info.
  41. int iNextKey;
  42. int iPrevKey;
  43. } ICDECOMPRESSX;
  44. NOTE before using any of the extra info in this structure the
  45. deompressor should check the size field.
  46. example:
  47. case ICM_DECOMPRESS:
  48. //
  49. // make sure we have a ICDECOMPRESSX structure
  50. //
  51. if ((DWORD)lParam2 >= sizeof(ICDEOMPRESSX))
  52. return DecompressX(pi,
  53. (ICDECOMPRESSX FAR *)lParam1, (DWORD)lParam2);
  54. else
  55. return Decompress(pi,
  56. (ICDECOMPRESS FAR *)lParam1, (DWORD)lParam2);
  57. NEW MESSAGE ICM_SET
  58. #define ICM_SET (ICM_RESERVED+40)
  59. #define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
  60. #define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
  61. before playing starts two params get sent down to the decompressor:
  62. ICM_SET
  63. lParam1 = 'FrmR' (set the frame rate)
  64. lParam2 = microseconds per frame
  65. ICM_SET
  66. lParam1 = 'KeyR' (set the key frame "rate")
  67. lParam2 = average key frame rate (ie key frame every 15)
  68. NOTE the key frame rate is a average.
  69. TO DO:
  70. named streams.
  71. multiple video streams.
  72. linked streams (data in another file...)