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.

103 lines
3.5 KiB

  1. /****************************************************************************
  2. * @doc INTERNAL CAPTUREP
  3. *
  4. * @module CaptureP.h | Header file for the <c CCaptureProperty>
  5. * class used to implement a property page to test the TAPI control
  6. * interfaces <i ITFormatControl> and <i ITQualityControl>.
  7. ***************************************************************************/
  8. #define NUM_CAPTURE_CONTROLS 4
  9. #define IDC_Capture_Bitrate 0
  10. #define IDC_Capture_FrameRate 1
  11. #define IDC_Capture_CurrentBitrate 2
  12. #define IDC_Capture_CurrentFrameRate 3
  13. /****************************************************************************
  14. * @doc INTERNAL CCAPTUREPCLASS
  15. *
  16. * @class CCaptureProperty | This class implements handling of a
  17. * single capture property in a property page.
  18. *
  19. * @mdata int | CCaptureProperty | m_NumProperties | Keeps
  20. * track of the number of properties.
  21. *
  22. * @mdata ITQualityControl* | CCaptureProperty | m_pITQualityControl | Pointer
  23. * to the <i ITQualityControl> interface.
  24. ***************************************************************************/
  25. class CCaptureProperty : public CPropertyEditor
  26. {
  27. public:
  28. CCaptureProperty(HWND hDlg, ULONG IDLabel, ULONG IDMinControl, ULONG IDMaxControl, ULONG IDDefaultControl, ULONG IDStepControl, ULONG IDEditControl, ULONG IDTrackbarControl, ULONG IDProgressControl, ULONG IDProperty, ITStreamQualityControl *pITQualityControl);
  29. ~CCaptureProperty ();
  30. // CPropertyEditor base class pure virtual overrides
  31. HRESULT GetValue();
  32. HRESULT SetValue();
  33. HRESULT GetRange();
  34. private:
  35. ITStreamQualityControl *m_pITQualityControl;
  36. };
  37. /****************************************************************************
  38. * @doc INTERNAL CCAPTUREPCLASS
  39. *
  40. * @class CCaptureProperties | This class implements a property page
  41. * to test the new TAPI control interfaces <i ITFormatControl> and
  42. * <i ITQualityControl>.
  43. *
  44. * @mdata int | CCaptureProperties | m_NumProperties | Keeps
  45. * track of the number of properties.
  46. *
  47. * @mdata ITQualityControl* | CCaptureProperties | m_pITQualityControl | Pointer
  48. * to the <i ITQualityControl> interface.
  49. *
  50. * @mdata ITFormatControl* | CCaptureProperties | m_pITFormatControl | Pointer
  51. * to the <i ITFormatControl> interface.
  52. *
  53. * @mdata CCaptureProperty* | CCaptureProperties | m_Controls[NUM_CAPTURE_CONTROLS] | Array
  54. * of capture properties.
  55. ***************************************************************************/
  56. class CCaptureProperties
  57. {
  58. public:
  59. CCaptureProperties();
  60. ~CCaptureProperties();
  61. HPROPSHEETPAGE OnCreate();
  62. HRESULT OnConnect(ITStream *pStream);
  63. HRESULT OnDisconnect();
  64. HRESULT OnActivate();
  65. HRESULT OnDeactivate();
  66. HRESULT OnApplyChanges();
  67. private:
  68. void SetDirty();
  69. // Format manipulation methods
  70. HRESULT InitialRangeScan();
  71. HRESULT OnFormatChanged();
  72. HRESULT GetCurrentMediaType(void);
  73. HRESULT DeleteAMMediaType(AM_MEDIA_TYPE *pAMMT);
  74. BOOL m_bInit;
  75. HWND m_hDlg;
  76. int m_NumProperties;
  77. ITStreamQualityControl *m_pITQualityControl;
  78. ITFormatControl *m_pITFormatControl;
  79. DWORD m_dwRangeCount;
  80. TAPI_STREAM_CONFIG_CAPS *m_CapsList;
  81. AM_MEDIA_TYPE **m_FormatList;
  82. AM_MEDIA_TYPE *m_CurrentMediaType;
  83. HWND m_hWndFormat;
  84. DWORD m_CurrentFormat;
  85. DWORD m_OriginalFormat;
  86. CCaptureProperty *m_Controls[NUM_CAPTURE_CONTROLS];
  87. // Dialog proc
  88. static INT_PTR CALLBACK BaseDlgProc(HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam);
  89. };