mciapi.pas 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. {
  2. $Id$
  3. Copyright (c) 1992, 1993 by International Business Machines Corporation
  4. Copyright (c) 2002 by Andry Svirgunov ([email protected])
  5. Copyright (c) 2002-2003 by Yuri Prokushev ([email protected])
  6. High-Level MCI Interfaces of OS/2 Multimedia subsystem
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU Library General Public License (LGPL) as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version. This program is
  11. distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.
  14. See the GNU Library General Public License for more details. You should
  15. have received a copy of the GNU Library General Public License along
  16. with this program; if not, write to the Free Software Foundation, Inc.,
  17. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. **********************************************************************}
  19. {
  20. @abstract(High-Level MCI Interfaces of OS/2 Multimedia subsystem)
  21. @author(Andry Svirgunov ([email protected]))
  22. @author(Yuri Prokushev ([email protected]))
  23. @created(01 Oct 2002)
  24. @lastmod(19 Jan 2003)
  25. This is the High-Level Macro Service API Routines of OS/2 Multimedia subsystem.
  26. All functions are from MCIAPI dll (which also contains REXX functions.
  27. See "Multimedia with REXX" for more information.).
  28. Warning: This code is alfa. Future versions of this unit will propably
  29. not be compatible.
  30. }
  31. Unit mciapi;
  32. {$MODE ObjFPC}
  33. Interface
  34. // Flags for mciPlayFile
  35. Const
  36. // digital and overlay
  37. MCI_OWNERISPARENT = $0001;
  38. // stop playing whatever is playing
  39. MCI_STOPACTIVE = $0002;
  40. // play and return immediately
  41. MCI_ASYNCRENDEZVOUS = $0004;
  42. // wait til prev is finished then play
  43. MCI_RENDEZVOUS = $0008;
  44. // no syncup will be done
  45. MCI_ASYNC = $0010;
  46. {
  47. This function plays a multimedia data file (video, audio) using MCI commands.
  48. hwndOwner is handle of owner window. If hwndOwner equial to zero used active
  49. window.
  50. pszFile is pointer to asciiz name of data file. For compound files can be
  51. used 'filename+element'.
  52. ulFlags is MCI_* flags.
  53. pszTitle is title of generated window (e.g. for video). Ignored if not generated.
  54. hwndViewport is handle of window for displaying video. If none, then default
  55. window displayed.
  56. }
  57. Function mciPlayFile(hwndOwner: Cardinal; // Ownerwindow
  58. pszFile: PChar; // File
  59. ulFlags: Cardinal; // Flags
  60. pszTitle: PChar; // Title
  61. hwndViewport: Cardinal): // Viewport Window
  62. Cardinal; cdecl;
  63. Function mciPlayResource(hwndOwner: Cardinal; // Owner Window
  64. hmod: LongInt; // Module
  65. resType: LongInt; // Resource Type
  66. resID: LongInt; // Resource ID
  67. ulFlags: Cardinal; // Flags
  68. pszTitle: PChar; // Title
  69. hwndViewport: Cardinal): // Viewport Window
  70. Cardinal; cdecl;
  71. Function mciRecordAudioFile(hwndOwner: Cardinal;
  72. pszFile,
  73. pszTitle: PChar;
  74. ulFlags: Cardinal):
  75. Cardinal; cdecl;
  76. // Audio Macro Service Constants and Routines
  77. Const
  78. MMIO_FE_FINDFIRST = 1;
  79. MMIO_FE_FINDNEXT = 2;
  80. MMIO_FE_FINDEND = 3;
  81. MMIO_FE_FINDELEMENT = 4;
  82. MMIO_RE_COMPACT = 1;
  83. Function mmioRemoveElement(pszFileElement: pChar;
  84. ulFlag: LongInt):
  85. Cardinal; cdecl;
  86. Function mmioFindElement(ulCode: LongInt; // Find Code
  87. pszElement: PChar; // Element
  88. ulElementLen: LongInt; // Element Buffer Length
  89. pszFile: PChar;
  90. ulReserved: LongInt): // Compound File
  91. Cardinal; cdecl;
  92. Implementation
  93. Function mciPlayFile(hwndOwner: Cardinal; pszFile: PChar; ulFlags: Cardinal; pszTitle: PChar; hwndViewport: Cardinal): Cardinal; cdecl;
  94. external 'MCIAPI' index 10;
  95. Function mciPlayResource(hwndOwner: Cardinal; hmod: LongInt; resType: LongInt; resID: LongInt; ulFlags: Cardinal; pszTitle: PChar; hwndViewport: Cardinal): Cardinal; cdecl;
  96. external 'MCIAPI' index 11;
  97. Function mciRecordAudioFile(hwndOwner: Cardinal; pszFile, pszTitle: PChar; ulFlags: Cardinal): Cardinal; cdecl;
  98. external 'MCIAPI' index 12;
  99. Function mmioRemoveElement(pszFileElement: PChar; ulFlag: LongInt): Cardinal; cdecl;
  100. external 'MCIAPI' index 16;
  101. Function mmioFindElement(ulCode: LongInt; pszElement: PChar; ulElementLen: LongInt; pszFile: PChar; ulReserved: LongInt): Cardinal; cdecl;
  102. external 'MCIAPI' index 18;
  103. end.
  104. {
  105. $Log$
  106. Revision 1.3 2003-02-15 18:44:55 hajny
  107. * mmtk directory corrected to lowercase
  108. Revision 1.1 2003/02/15 16:59:09 hajny
  109. * mmtk directory corrected to lowercase
  110. Revision 1.1 2003/02/09 13:49:06 hajny
  111. + mmtk added
  112. }