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.

109 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. bgvideo.h
  5. Abstract:
  6. Definitions for the video bridge filters
  7. Author:
  8. Mu Han (muhan) 11/12/1998
  9. --*/
  10. #ifndef _BGVIDEO_H_
  11. #define _BGVIDEO_H_
  12. class CTAPIVideoBridgeSinkFilter :
  13. public CTAPIBridgeSinkFilter
  14. {
  15. public:
  16. CTAPIVideoBridgeSinkFilter(
  17. IN LPUNKNOWN pUnk,
  18. IN IDataBridge * pIDataBridge,
  19. OUT HRESULT * phr
  20. );
  21. static HRESULT CreateInstance(
  22. IN IDataBridge * pIDataBridge,
  23. OUT IBaseFilter ** ppIBaseFilter
  24. );
  25. // methods called by the input pin.
  26. HRESULT GetMediaType(IN int iPosition, IN CMediaType *pMediaType);
  27. HRESULT CheckMediaType(IN const CMediaType *pMediatype);
  28. };
  29. class CTAPIVideoBridgeSourceFilter :
  30. public CTAPIBridgeSourceFilter
  31. {
  32. public:
  33. CTAPIVideoBridgeSourceFilter(
  34. IN LPUNKNOWN pUnk,
  35. OUT HRESULT *phr
  36. );
  37. static HRESULT CreateInstance(
  38. OUT IBaseFilter ** ppIBaseFilter
  39. );
  40. // Overrides CBaseFilter methods.
  41. STDMETHODIMP Run(REFERENCE_TIME tStart);
  42. // override the IDataBridge methods.
  43. STDMETHOD (SendSample) (
  44. IN IMediaSample *pSample
  45. );
  46. // methods called by the output pin.
  47. HRESULT GetMediaType(IN int iPosition, IN CMediaType *pMediaType);
  48. HRESULT CheckMediaType(IN const CMediaType *pMediatype);
  49. private:
  50. DWORD m_dwSSRC;
  51. long m_lWaitTimer;
  52. BOOL m_fWaitForIFrame;
  53. };
  54. // switch anyway if we don't have a I-Frame in 60 seconds.
  55. const I_FRAME_TIMER = 60;
  56. /* This is the RTP header according to RFC 1889
  57. 0 1 2 3
  58. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  59. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  60. |V=2|P|X| CC |M| PT | sequence number |
  61. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  62. | timestamp |
  63. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  64. | synchronization source (SSRC) identifier |
  65. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  66. | contributing source (CSRC) identifiers |
  67. | .... |
  68. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  69. */
  70. typedef struct
  71. {
  72. WORD CSRCCount:4;
  73. WORD HeaderExtensionFlag:1;
  74. WORD PaddingFlag:1;
  75. WORD VersionType:2;
  76. WORD PayLoadType:7;
  77. WORD MarkerBit:1;
  78. WORD wSequenceNumber;
  79. DWORD dwTimeStamp;
  80. DWORD dwSSRC;
  81. } RTP_HEADER;
  82. #endif