Source code of Windows XP (NT5)
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.

182 lines
4.8 KiB

  1. // Copyright (c) 1997 Microsoft Corporation. All Rights Reserved.
  2. // MMSTREAM.IDL
  3. // Multi media streaming interface IDL file
  4. import "unknwn.idl";
  5. cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
  6. cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)")
  7. cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)")
  8. cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)")
  9. cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)")
  10. cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)")
  11. cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)")
  12. cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)")
  13. cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)")
  14. cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)")
  15. cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)")
  16. cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)")
  17. cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)")
  18. cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)")
  19. cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)")
  20. cpp_quote("// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D}")
  21. cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, ")
  22. cpp_quote("0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
  23. cpp_quote("// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D}")
  24. cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio,")
  25. cpp_quote("0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
  26. typedef void (__stdcall * PAPCFUNC)(DWORD dwParam);
  27. typedef LONGLONG STREAM_TIME;
  28. typedef GUID MSPID;
  29. typedef REFGUID REFMSPID;
  30. typedef enum {
  31. STREAMTYPE_READ = 0,
  32. STREAMTYPE_WRITE = 1,
  33. STREAMTYPE_TRANSFORM= 2
  34. } STREAM_TYPE;
  35. typedef enum {
  36. STREAMSTATE_STOP = 0,
  37. STREAMSTATE_RUN = 1
  38. } STREAM_STATE;
  39. typedef enum {
  40. COMPSTAT_NOUPDATEOK = 0x00000001,
  41. COMPSTAT_WAIT = 0x00000002,
  42. COMPSTAT_ABORT = 0x00000004
  43. } COMPLETION_STATUS_FLAGS;
  44. // Flags for GetInformation
  45. enum {
  46. MMSSF_HASCLOCK = 0x00000001,
  47. MMSSF_SUPPORTSEEK = 0x00000002,
  48. MMSSF_ASYNCHRONOUS = 0x00000004
  49. };
  50. // Flags for StreamSample::Update
  51. enum {
  52. SSUPDATE_ASYNC = 0x00000001,
  53. SSUPDATE_CONTINUOUS = 0x00000002
  54. };
  55. interface IMultiMediaStream;
  56. interface IMediaStream;
  57. interface IStreamSample;
  58. // IMultiMediaStream interface
  59. [
  60. object,
  61. local,
  62. uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
  63. pointer_default(unique)
  64. ]
  65. interface IMultiMediaStream : IUnknown {
  66. HRESULT GetInformation(
  67. [out] [optional] DWORD *pdwFlags,
  68. [out] [optional] STREAM_TYPE *pStreamType);
  69. HRESULT GetMediaStream(
  70. [in] REFMSPID idPurpose,
  71. [out] IMediaStream **ppMediaStream);
  72. HRESULT EnumMediaStreams(
  73. [in] long Index,
  74. [out] IMediaStream **ppMediaStream);
  75. HRESULT GetState(
  76. [out] STREAM_STATE *pCurrentState);
  77. HRESULT SetState(
  78. [in] STREAM_STATE NewState);
  79. HRESULT GetTime(
  80. [out] STREAM_TIME *pCurrentTime);
  81. HRESULT GetDuration(
  82. [out] STREAM_TIME *pDuration);
  83. HRESULT Seek(
  84. [in] STREAM_TIME SeekTime);
  85. HRESULT GetEndOfStreamEventHandle(
  86. [out] HANDLE *phEOS);
  87. };
  88. // IMediaStream interface
  89. [
  90. object,
  91. uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
  92. pointer_default(unique)
  93. ]
  94. interface IMediaStream : IUnknown {
  95. HRESULT GetMultiMediaStream(
  96. [out] IMultiMediaStream **ppMultiMediaStream);
  97. HRESULT GetInformation(
  98. [out] [optional] MSPID *pPurposeId,
  99. [out] [optional] STREAM_TYPE *pType);
  100. HRESULT SetSameFormat(
  101. [in] IMediaStream *pStreamThatHasDesiredFormat,
  102. [in] DWORD dwFlags);
  103. HRESULT AllocateSample(
  104. [in] DWORD dwFlags,
  105. [out] IStreamSample **ppSample);
  106. HRESULT CreateSharedSample(
  107. [in] IStreamSample *pExistingSample,
  108. [in] DWORD dwFlags,
  109. [out] IStreamSample **ppNewSample);
  110. HRESULT SendEndOfStream(DWORD dwFlags);
  111. };
  112. // IStreamSample interface
  113. [
  114. object,
  115. local,
  116. uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
  117. pointer_default(unique)
  118. ]
  119. interface IStreamSample : IUnknown {
  120. HRESULT GetMediaStream(
  121. [in] IMediaStream **ppMediaStream);
  122. HRESULT GetSampleTimes(
  123. [out] [optional] STREAM_TIME * pStartTime,
  124. [out] [optional] STREAM_TIME * pEndTime,
  125. [out] [optional] STREAM_TIME * pCurrentTime);
  126. HRESULT SetSampleTimes(
  127. [in] [optional] const STREAM_TIME *pStartTime,
  128. [in] [optional] const STREAM_TIME *pEndTime);
  129. HRESULT Update(
  130. [in] DWORD dwFlags,
  131. [in] [optional] HANDLE hEvent,
  132. [in] [optional] PAPCFUNC pfnAPC,
  133. [in] [optional] DWORD dwAPCData);
  134. HRESULT CompletionStatus(
  135. [in] DWORD dwFlags,
  136. [in] [optional] DWORD dwMilliseconds);
  137. };