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.

119 lines
3.1 KiB

  1. import "unknwn.idl";
  2. import "mmstream.idl";
  3. typedef enum
  4. {
  5. MCF_SEND,
  6. MCF_RECV,
  7. MCF_AUDIO,
  8. MCF_VIDEO,
  9. MCF_DEFAULT_DEVICE
  10. } MC_FLAGS;
  11. interface IMediaChannel;
  12. [
  13. object,
  14. uuid(c35a34fa-b92b-11d1-aa97-00c04fc9b202),
  15. pointer_default(unique),
  16. ]
  17. interface IMediaChannelBuilder : IUnknown
  18. {
  19. HRESULT CreateMediaChannel([in] MC_FLAGS flags, [out] IMediaChannel **ppIMC);
  20. }
  21. typedef enum
  22. {
  23. SM_AUTO,
  24. SM_MANUAL
  25. } SILENCE_MODE;
  26. [
  27. object,
  28. uuid(c515aa5e-b92b-11d1-aa97-00c04fc9b202),
  29. pointer_default(unique),
  30. ]
  31. interface IAudioDevice : IUnknown
  32. {
  33. HRESULT GetDeviceCount([out] UINT *pcDevices);
  34. HRESULT EnumerateInputDevices([in] UINT index, [out] DWORD *pDeviceId, [out] BSTR *pDeviceName);
  35. HRESULT EnumerateOutputDevices(UINT index, [out] DWORD *pDeviceId, [out] BSTR *pDeviceName);
  36. HRESULT SetInputDeviceId([in] UINT deviceId);
  37. HRESULT SetOutputDeviceId([in] UINT deviceId);
  38. HRESULT GetInputDeviceId([out] UINT *pdeviceId);
  39. HRESULT GetOutputDeviceId([out] UINT *pdeviceId);
  40. HRESULT SetDuplexMode ([in] BOOL );
  41. HRESULT GetDuplexMode ( [out] BOOL *pDuplexType);
  42. HRESULT SetSilenceSuppressionMode( [in] SILENCE_MODE mode);
  43. HRESULT GetSilenceSuppressionMode( [out] SILENCE_MODE *mode);
  44. HRESULT SetEchoCancellationMode( [in] BOOL fEnabled);
  45. HRESULT GetEchoCancellationMode( [out] BOOL *pfEnabled);
  46. HRESULT GetSignalStrength(UINT *pSignalStrength);
  47. HRESULT SetVolume([in] UINT vol);
  48. HRESULT GetVolume([out] UINT *pvol);
  49. }
  50. [
  51. object,
  52. uuid(0296d416-b92c-11d1-aa97-00c04fc9b202),
  53. pointer_default(unique),
  54. ]
  55. interface IVideoDevice : IUnknown
  56. {
  57. HRESULT GetDeviceCount([out] UINT *pcDevices);
  58. HRESULT EnumerateInputDevices(UINT index, [out] DWORD *pDeviceId, [out] BSTR *pDeviceName);
  59. HRESULT SetInputDeviceId([in] UINT deviceId);
  60. HRESULT GetInputDeviceId([out] UINT *pdeviceId);
  61. HRESULT ShowDeviceDialog();
  62. }
  63. typedef enum
  64. {
  65. MCS_UNCONFIGURED,
  66. MCS_STOPPED,
  67. MCS_STARTED
  68. } MC_STATE;
  69. [
  70. object,
  71. uuid(17a7db52-b92c-11d1-aa97-00c04fc9b202),
  72. pointer_default(unique),
  73. ]
  74. interface IMediaChannel : IUnknown
  75. {
  76. HRESULT Start();
  77. // HRESULT Start(int iDropFrame);
  78. HRESULT Stop();
  79. HRESULT GetState(MC_STATE *pState);
  80. HRESULT SetNetworkInterface( IUnknown *); // IRTPSend or IRTPRecv
  81. HRESULT SetMaxBitRate(UINT bitrate); // Flow control
  82. HRESULT SetStreamSource(IMediaStream *); // for send channels only
  83. HRESULT Configure([in, size_is(cbFormat)] BYTE *pFormat, [in] UINT cbFormat, [in, size_is (cbParams)]BYTE *pChannelParams, UINT cbParams);
  84. // for audio, pFormat will point to a WAVEFORMATEX and pChannelParams will point to AUDIO_CHANNEL_PARAMS
  85. // for video, pFormat will point to a VIDEOFORMATEX and pChannelParams will point to VIDEO_CHANNEL_PARAMS
  86. }
  87. [
  88. object,
  89. uuid(377d00f6-b92c-11d1-aa97-00c04fc9b202),
  90. pointer_default(unique),
  91. ]
  92. interface IAudioChannel : IMediaChannel
  93. {
  94. // HRESULT GetSignalStrength(UINT *pSignalStrength);
  95. }
  96. [
  97. object,
  98. uuid(4c4da8b4-b92c-11d1-aa97-00c04fc9b202),
  99. pointer_default(unique),
  100. ]
  101. interface IVideoChannel : IMediaChannel
  102. {
  103. HRESULT SetTemporalSpatialTradeoff([in] UINT T_S_Tradeoff);
  104. HRESULT GetTemporalSpatialTradeoff([out] UINT *pT_S_Tradeoff);
  105. HRESULT SendKeyFrame();
  106. }