Source code of Windows XP (NT5)
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.6 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-Jan-98 TKB Created Initial Interface Version
  13. //
  14. //==========================================================================;
  15. #ifndef __NABTS_H
  16. #define __NABTS_H
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <windows.h>
  20. #include <icodec.h>
  21. #pragma warning(disable:4355)
  22. //////////////////////////////////////////////////////////////
  23. // INabtsOutputPin:: Raw Nabts Output Pin Interface
  24. //////////////////////////////////////////////////////////////
  25. class INabtsOutputPin : public IVBIOutputPin
  26. {
  27. // Usable public interfaces
  28. public:
  29. INabtsOutputPin(IKSDriver &driver, int nPin, PKSDATARANGE pKSDataRange ) :
  30. IVBIOutputPin( driver, nPin, pKSDataRange, sizeof(VBICODECFILTERING_NABTS_SUBSTREAMS) ),
  31. m_ScanlinesRequested(*this,KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY,
  32. sizeof(VBICODECFILTERING_SCANLINES)),
  33. m_ScanlinesDiscovered(*this,KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
  34. sizeof(VBICODECFILTERING_SCANLINES)),
  35. m_Statistics(*this,KSPROPERTY_VBICODECFILTERING_STATISTICS,
  36. sizeof(VBICODECFILTERING_STATISTICS_COMMON_PIN))
  37. {}
  38. // Pin specific properties (does not affect other pins)
  39. IScanlinesProperty m_ScanlinesRequested;
  40. IScanlinesProperty m_ScanlinesDiscovered;
  41. IStatisticsProperty m_Statistics;
  42. ~INabtsOutputPin();
  43. // Helper functions and internal data
  44. protected:
  45. };
  46. //////////////////////////////////////////////////////////////
  47. // INabts:: Raw NABTS Codec Interface
  48. //////////////////////////////////////////////////////////////
  49. class INabts : public IVBICodec
  50. {
  51. // Usable public interfaces
  52. public:
  53. INabts();
  54. ~INabts();
  55. // Call to make sure construction was successful
  56. BOOL IsValid() { return IVBICodec::IsValid() && m_OutputPin.IsValid(); }
  57. int AddRequestedScanline(int nScanline); // Adds _another_ scanline to the request list.
  58. int ClearRequestedScanlines(); // Use this to reset requested scanlines to none.
  59. int GetDiscoveredScanlines(VBICODECFILTERING_SCANLINES &ScanlineBitArray);
  60. // Read functions (call "overlapped" at THREAD_PRIORITY_ABOVE_NORMAL to avoid data loss)
  61. int ReadData( PNABTS_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_COMMON_PIN &PinStatistics);
  67. int SetPinStatistics(VBICODECFILTERING_STATISTICS_COMMON_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. INabtsOutputPin m_OutputPin;
  75. protected:
  76. };
  77. #pragma warning(default:4355)
  78. #endif