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.

102 lines
3.8 KiB

  1. //==========================================================================;
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1997 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //
  11. // History:
  12. // 17-Nov-97 TKB Created Initial Interface Version
  13. //
  14. //==========================================================================;
  15. #ifndef __NABTSFEC_H
  16. #define __NABTSFEC_H
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <windows.h>
  20. #include <icodec.h>
  21. #pragma warning(disable:4355)
  22. //////////////////////////////////////////////////////////////
  23. // INabtsFEC OutputPin:: Corrected Nabts Output Pin Interface
  24. //////////////////////////////////////////////////////////////
  25. class INabtsFECOutputPin : public IVBIOutputPin
  26. {
  27. // Usable public interfaces
  28. public:
  29. INabtsFECOutputPin(IKSDriver &driver, int nPin, PKSDATARANGE pKSDataRange ) :
  30. IVBIOutputPin( driver, nPin, pKSDataRange, sizeof(VBICODECFILTERING_NABTS_SUBSTREAMS) ),
  31. m_SubstreamsRequested(*this,KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  32. sizeof(VBICODECFILTERING_NABTS_SUBSTREAMS) ),
  33. m_SubstreamsDiscovered(*this,KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  34. sizeof(VBICODECFILTERING_NABTS_SUBSTREAMS) ),
  35. m_Statistics(*this,KSPROPERTY_VBICODECFILTERING_STATISTICS,
  36. sizeof(VBICODECFILTERING_STATISTICS_NABTS_PIN))
  37. {}
  38. // Pin specific properties (does not affect other pins)
  39. ISubstreamsProperty m_SubstreamsRequested;
  40. ISubstreamsProperty m_SubstreamsDiscovered;
  41. IStatisticsProperty m_Statistics;
  42. ~INabtsFECOutputPin();
  43. // Helper functions and internal data
  44. protected:
  45. };
  46. //////////////////////////////////////////////////////////////
  47. // INabtsFEC:: NABTS/FEC Codec Interface
  48. //////////////////////////////////////////////////////////////
  49. class INabtsFEC : public IVBICodec
  50. {
  51. // Usable public interfaces
  52. public:
  53. INabtsFEC();
  54. ~INabtsFEC();
  55. // Call to make sure construction was successful
  56. BOOL IsValid() { return IVBICodec::IsValid() && m_OutputPin.IsValid(); }
  57. int AddRequestedGroup(int nField); // Adds _another_ NABTS group to the request list.
  58. int ClearRequestedGroups(); // Use this to reset requested groups to none.
  59. int GetDiscoveredGroups(VBICODECFILTERING_NABTS_SUBSTREAMS &GroupBitArray);
  60. // Read functions (call "overlapped" at THREAD_PRIORITY_ABOVE_NORMAL to avoid data loss)
  61. int ReadData( PNABTSFEC_BUFFER lpBuffer, int nBytes, DWORD *lpcbReturned, LPOVERLAPPED lpOS )
  62. { return m_OutputPin.ReadData( (LPBYTE)lpBuffer, nBytes, lpcbReturned, lpOS ); }
  63. int GetOverlappedResult( LPOVERLAPPED lpOS, LPDWORD lpdwTransferred = NULL, BOOL bWait=TRUE )
  64. { return m_OutputPin.GetOverlappedResult(lpOS, lpdwTransferred, bWait ); }
  65. // Statistics Property Control
  66. int GetPinStatistics(VBICODECFILTERING_STATISTICS_NABTS_PIN &PinStatistics);
  67. int SetPinStatistics(VBICODECFILTERING_STATISTICS_NABTS_PIN &PinStatistics);
  68. // Statistics Property Control
  69. int GetCodecStatistics(VBICODECFILTERING_STATISTICS_NABTS &CodecStatistics);
  70. int SetCodecStatistics(VBICODECFILTERING_STATISTICS_NABTS &CodecStatistics);
  71. // Additional driver global properties
  72. IStatisticsProperty m_Statistics;
  73. // Actual Pin instance [w/properties] (set by above to control filtering & to get discovered)
  74. INabtsFECOutputPin m_OutputPin;
  75. protected:
  76. };
  77. #pragma warning(default:4355)
  78. #endif