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.

75 lines
2.3 KiB

  1. // File: ichnlaud.h
  2. #ifndef _ICHNLAUD_H_
  3. #define _ICHNLAUD_H_
  4. // we have no notification on the channel "callback" that the state changed
  5. // to determine if a/v is active we need to get both the video and the audio channel
  6. class CNmChannelAudio : public INmChannelAudio,
  7. public DllRefCount, public CConnectionPointContainer
  8. {
  9. private:
  10. int m_cMembers;
  11. BOOL m_fIncoming;
  12. DWORD m_dwFlags;
  13. IAudioChannel* m_pAudioChannel;
  14. IAudioDevice * m_pAudioDevice;
  15. ICommChannel* m_pCommChannel;
  16. MEDIA_FORMAT_ID m_MediaFormat;
  17. CAudioControl m_AudioControl;
  18. public:
  19. CNmChannelAudio(BOOL fIncoming);
  20. ~CNmChannelAudio();
  21. VOID CommChannelOpened(ICommChannel *pCommChannel);
  22. VOID CommChannelActive(ICommChannel *pCommChannel);
  23. VOID CommChannelClosed();
  24. ICommChannel * GetCommChannel() { return m_pCommChannel; }
  25. VOID SetFormat(MEDIA_FORMAT_ID id) { m_MediaFormat = id;}
  26. VOID OnConnected(IH323Endpoint * pConnection, ICommChannel *pIChannel)
  27. { m_AudioControl.OnConnected(pConnection, pIChannel); }
  28. VOID OnDisconnected() { m_AudioControl.OnDisconnected(); }
  29. VOID OnMemberAdded(CNmMember *pMember);
  30. VOID OnMemberRemoved(CNmMember *pMember);
  31. VOID OnMemberUpdated(CNmMember *pMember);
  32. IMediaChannel *GetMediaChannelInterface(void);
  33. DWORD GetLevel();
  34. BOOL IsPaused();
  35. BOOL IsAutoMixing();
  36. VOID Open();
  37. VOID Close();
  38. // IUnknown
  39. STDMETHODIMP_(ULONG) AddRef(void);
  40. STDMETHODIMP_(ULONG) Release(void);
  41. STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
  42. // INmChannel
  43. STDMETHODIMP IsSameAs(INmChannel *pChannel);
  44. STDMETHODIMP IsActive();
  45. STDMETHODIMP SetActive(BOOL fActive);
  46. STDMETHODIMP GetConference(INmConference **ppConference);
  47. STDMETHODIMP GetInterface(IID *piid);
  48. STDMETHODIMP GetNmch(ULONG *puCh);
  49. STDMETHODIMP EnumMember(IEnumNmMember **ppEnum);
  50. STDMETHODIMP GetMemberCount(ULONG * puCount);
  51. // INmChannelAudio
  52. STDMETHODIMP IsIncoming(void);
  53. STDMETHODIMP GetState(NM_AUDIO_STATE *puState);
  54. STDMETHODIMP GetProperty(NM_AUDPROP uID, ULONG_PTR *puValue);
  55. STDMETHODIMP SetProperty(NM_AUDPROP uID, ULONG_PTR uValue);
  56. };
  57. HRESULT OnNotifyPropertyChanged(IUnknown *pAudioChannelNotify, PVOID pv, REFIID riid);
  58. HRESULT OnNotifyStateChanged(IUnknown *pAudioChannelNotify, PVOID pv, REFIID riid);
  59. #endif // _ICHNLAUD_H_
  60.