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.

75 lines
2.8 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dpvaconv.h
  6. * Content: Header file for DirectPlayVoice compression provider (ACM)
  7. *
  8. * History:
  9. * Date By Reason
  10. * =========== =========== ====================
  11. * 10/27/99 rodtoll created
  12. ***************************************************************************/
  13. #ifndef __DPVACONV_H
  14. #define __DPVACONV_H
  15. struct DPVACMCONVOBJECT;
  16. class CDPVACMConv
  17. {
  18. public:
  19. CDPVACMConv();
  20. ~CDPVACMConv();
  21. static HRESULT I_QueryInterface( DPVACMCONVOBJECT *This, REFIID riid, PVOID *ppvObj );
  22. static HRESULT I_AddRef( DPVACMCONVOBJECT *This );
  23. static HRESULT I_Release( DPVACMCONVOBJECT *This );
  24. static HRESULT I_InitDeCompress( DPVACMCONVOBJECT *This, GUID guidSourceCT, LPWAVEFORMATEX lpwfxTargetFormat );
  25. static HRESULT I_InitCompress( DPVACMCONVOBJECT *This, LPWAVEFORMATEX lpwfxSourceFormat, GUID guidTargetCT );
  26. static HRESULT I_IsValid( DPVACMCONVOBJECT *This, LPBOOL pfValid );
  27. static HRESULT I_GetUnCompressedFrameSize( DPVACMCONVOBJECT *This, LPDWORD lpdwFrameSize );
  28. static HRESULT I_GetCompressedFrameSize( DPVACMCONVOBJECT *This, LPDWORD lpdwCompressedSize );
  29. static HRESULT I_GetNumFramesPerBuffer( DPVACMCONVOBJECT *This, LPDWORD lpdwFramesPerBuffer );
  30. static HRESULT I_Convert( DPVACMCONVOBJECT *This, LPVOID lpInputBuffer, DWORD dwInputSize, LPVOID lpOutputBuffer, LPDWORD lpdwOutputSize, BOOL fSilence );
  31. HRESULT InitDeCompress( GUID guidSourceCT, LPWAVEFORMATEX lpwfxTargetFormat );
  32. HRESULT InitCompress( LPWAVEFORMATEX lpwfxSourceFormat, GUID guidTargetCT );
  33. HRESULT Convert( LPVOID lpInputBuffer, DWORD dwInputSize, LPVOID lpOutputBuffer, LPDWORD lpdwOutputSize, BOOL fSilence );
  34. BOOL InitClass();
  35. protected:
  36. HRESULT Initialize( WAVEFORMATEX *pwfSrcFormat, WAVEFORMATEX *pwfTargetFormat, const WAVEFORMATEX *pwfUnCompressedFormat );
  37. HRESULT GetCompressionInfo( GUID guidCT );
  38. DWORD CalcUnCompressedFrameSize( const WAVEFORMATEX* lpwfxFormat ) const;
  39. ACMSTREAMHEADER m_ashSource;
  40. ACMSTREAMHEADER m_ashTarget;
  41. HACMSTREAM m_hacmSource;
  42. HACMSTREAM m_hacmTarget;
  43. BOOL m_fDirectConvert; // Is it a direct conversion
  44. BOOL m_fValid;
  45. BYTE *m_pbInnerBuffer; // Buffer for intermediate step of conversion
  46. DWORD m_dwInnerBufferSize; // Size of the buffer
  47. DNCRITICAL_SECTION m_csLock;
  48. LONG m_lRefCount;
  49. LPDVFULLCOMPRESSIONINFO m_pdvfci;
  50. DWORD m_dwUnCompressedFrameSize;
  51. DWORD m_dwCompressedFrameSize;
  52. DWORD m_dwNumFramesPerBuffer;
  53. BOOL m_fTargetEightBit;
  54. BOOL m_fCritSecInited;
  55. };
  56. struct DPVACMCONVOBJECT
  57. {
  58. LPVOID lpvVtble;
  59. CDPVACMConv *pObject;
  60. };
  61. typedef DPVACMCONVOBJECT *LPDPVACMCONVOBJECT, *PDPVACMCONVOBJECT;
  62. #endif