mciapi.pas 5.1 KB

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