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.

131 lines
4.1 KiB

  1. /****************************************************************************
  2. * @doc INTERNAL CAUDRECPCLASS
  3. *
  4. * @module CaptureP.h | Header file for the <c CAudRecProperty>
  5. * class used to implement a property page to test the TAPI control
  6. * interfaces <i ITFormatControl>, <i ITQualityControl> and
  7. * <i ITAudioSettings>.
  8. ***************************************************************************/
  9. #define NUM_AUDREC_CONTROLS 6
  10. #define IDC_Record_Bitrate 0
  11. #define IDC_Record_Volume 1
  12. #define IDC_Record_AudioLevel 2
  13. #define IDC_Record_SilenceLevel 3
  14. #define IDC_Record_SilenceDetection 4
  15. #define IDC_Record_SilenceCompression 5
  16. typedef struct _CONTROL_DESCRIPTION
  17. {
  18. ULONG IDLabel;
  19. ULONG IDMinControl;
  20. ULONG IDMaxControl;
  21. ULONG IDDefaultControl;
  22. ULONG IDStepControl;
  23. ULONG IDEditControl;
  24. ULONG IDTrackbarControl;
  25. ULONG IDProgressControl;
  26. ULONG IDProperty;
  27. ITStreamQualityControl *pITQualityControl;
  28. ITAudioSettings *pITAudioSettings;
  29. } CONTROL_DESCRIPTION;
  30. /****************************************************************************
  31. * @doc INTERNAL CAUDRECPCLASS
  32. *
  33. * @class CAudRecProperty | This class implements handling of a
  34. * single audio recording property in a property page.
  35. *
  36. * @mdata int | CAudRecProperty | m_NumProperties | Keeps
  37. * track of the number of properties.
  38. *
  39. * @mdata ITQualityControl* | CAudRecProperty | m_pITQualityControl | Pointer
  40. * to the <i ITQualityControl> interface.
  41. ***************************************************************************/
  42. class CAudRecProperty : public CPropertyEditor
  43. {
  44. public:
  45. CAudRecProperty(
  46. HWND hDlg,
  47. CONTROL_DESCRIPTION &ControlDescription
  48. );
  49. ~CAudRecProperty ();
  50. // CPropertyEditor base class pure virtual overrides
  51. HRESULT GetValue();
  52. HRESULT SetValue();
  53. HRESULT GetRange();
  54. private:
  55. ITStreamQualityControl *m_pITQualityControl;
  56. ITAudioSettings *m_pITAudioSettings;
  57. };
  58. /****************************************************************************
  59. * @doc INTERNAL CAUDRECPCLASS
  60. *
  61. * @class CAudRecProperties | This class implements a property page
  62. * to test the new TAPI control interfaces <i ITFormatControl>,
  63. * <i ITQualityControl> and <i ITAudioSettings>
  64. *
  65. * @mdata int | CAudRecProperties | m_NumProperties | Keeps
  66. * track of the number of properties.
  67. *
  68. * @mdata ITQualityControl* | CAudRecProperties | m_pITQualityControl | Pointer
  69. * to the <i ITQualityControl> interface.
  70. *
  71. * @mdata ITFormatControl* | CAudRecProperties | m_pITFormatControl | Pointer
  72. * to the <i ITFormatControl> interface.
  73. *
  74. * @mdata ITAudioSettings * | CAudRecProperties | m_pITAudioSettings | Pointer
  75. * to the <i ITAudioSettings> interface.
  76. *
  77. * @mdata CAudRecProperty* | CAudRecProperties | m_Controls[NUM_AUDREC_CONTROLS] | Array
  78. * of capture properties.
  79. ***************************************************************************/
  80. class CAudRecProperties
  81. {
  82. public:
  83. CAudRecProperties();
  84. ~CAudRecProperties();
  85. HPROPSHEETPAGE OnCreate();
  86. HRESULT OnConnect(ITStream *pStream);
  87. HRESULT OnDisconnect();
  88. HRESULT OnActivate();
  89. HRESULT OnDeactivate();
  90. HRESULT OnApplyChanges();
  91. private:
  92. void SetDirty();
  93. // Format manipulation methods
  94. HRESULT InitialRangeScan();
  95. HRESULT OnFormatChanged();
  96. HRESULT GetCurrentMediaType(void);
  97. HRESULT DeleteAMMediaType(AM_MEDIA_TYPE *pAMMT);
  98. BOOL m_bInit;
  99. HWND m_hDlg;
  100. int m_NumProperties;
  101. ITAudioSettings *m_pITAudioSettings;
  102. ITStreamQualityControl *m_pITQualityControl;
  103. ITFormatControl *m_pITFormatControl;
  104. DWORD m_RangeCount;
  105. TAPI_STREAM_CONFIG_CAPS m_RangeCaps;
  106. GUID *m_SubTypeList;
  107. GUID m_SubTypeCurrent;
  108. AM_MEDIA_TYPE *m_CurrentMediaType;
  109. HWND m_hWndFormat;
  110. DWORD m_CurrentFormat;
  111. DWORD m_OriginalFormat;
  112. CAudRecProperty *m_Controls[NUM_AUDREC_CONTROLS];
  113. // Dialog proc
  114. static INT_PTR CALLBACK BaseDlgProc(HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam);
  115. };