Counter Strike : Global Offensive Source Code
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.

87 lines
1.8 KiB

  1. //========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef MILESBASE_H
  8. #define MILESBASE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // windows.h / platform.h conflicts
  13. #pragma warning(disable:4005)
  14. #pragma warning(disable:4201) // nameless struct/union (mmssystem.h has this)
  15. #include "miles/mss.h"
  16. class CProvider
  17. {
  18. public:
  19. CProvider( HPROVIDER hProvider );
  20. static CProvider* FindProvider( HPROVIDER hProvider );
  21. static void FreeAllProviders();
  22. HPROVIDER GetProviderHandle();
  23. private:
  24. ~CProvider();
  25. private:
  26. HPROVIDER m_hProvider;
  27. static CProvider *s_pHead;
  28. CProvider *m_pNext;
  29. };
  30. // This holds the handles and function pointers we want from a compressor/decompressor.
  31. class ASISTRUCT
  32. {
  33. public:
  34. ASISTRUCT();
  35. ~ASISTRUCT();
  36. bool Init( void *pCallbackObject, const char *pInputFileType,
  37. const char *pOutputFileType, AILASIFETCHCB cb );
  38. void Shutdown();
  39. int Process( void *pBuffer, unsigned int bufferSize );
  40. bool IsActive() const;
  41. unsigned int GetProperty( HPROPERTY attribute );
  42. void Seek( int position );
  43. public:
  44. HPROPERTY OUTPUT_BITS;
  45. HPROPERTY OUTPUT_CHANNELS;
  46. HPROPERTY OUTPUT_RATE;
  47. HPROPERTY INPUT_BITS;
  48. HPROPERTY INPUT_CHANNELS;
  49. HPROPERTY INPUT_RATE;
  50. HPROPERTY INPUT_BLOCK_SIZE;
  51. HPROPERTY POSITION;
  52. private:
  53. void Clear();
  54. private:
  55. ASI_STREAM_OPEN ASI_stream_open;
  56. ASI_STREAM_PROCESS ASI_stream_process;
  57. ASI_STREAM_CLOSE ASI_stream_close;
  58. ASI_STREAM_SEEK ASI_stream_seek;
  59. ASI_STREAM_PROPERTY ASI_stream_property;
  60. HASISTREAM m_stream;
  61. CProvider *m_pProvider;
  62. };
  63. extern void IncrementRefMiles();
  64. extern void DecrementRefMiles();
  65. #endif // MILESBASE_H