Codecs.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //****************************************************************************
  2. // File: CODECS.H
  3. // Content:
  4. //
  5. //
  6. // Copyright (c) Microsoft Corporation 1999-2002. All Rights Reserved
  7. //
  8. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  9. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  10. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  11. // PARTICULAR PURPOSE.
  12. //****************************************************************************
  13. #include <pshpack8.h> /* Assume 8 byte packing throughout */
  14. #include "appavcap.h"
  15. /*
  16. * Constants
  17. */
  18. // hresult codes, facility IC = 0x301
  19. #define IC_E_CAPS_INSTANTIATION_FAILURE 0x83010001 // could not instantiate a required caps object
  20. #define IC_E_CAPS_INITIALIZATION_FAILURE 0x83010002 // could not initialize a required bject
  21. #define IC_E_NO_FORMATS 0x83010003 // no formats available
  22. #define IC_E_NO_SUCH_FORMAT 0x83010005 // no matching AC</VCM format was found
  23. #define IC_E_INTERNAL_ERROR 0x83010006 // the Network Audio/Video Controller
  24. // reported a system error
  25. /*
  26. * Macros
  27. */
  28. /*
  29. * Data Structures
  30. */
  31. /*
  32. * Functions
  33. */
  34. /*
  35. * Interfaces
  36. */
  37. #ifndef DECLARE_INTERFACE_PTR
  38. #ifdef __cplusplus
  39. #define DECLARE_INTERFACE_PTR(iface, piface) \
  40. interface iface; typedef iface FAR * piface
  41. #else
  42. #define DECLARE_INTERFACE_PTR(iface, piface) \
  43. typedef interface iface iface, FAR * piface
  44. #endif
  45. #endif /* DECLARE_INTERFACE_PTR */
  46. #define IUNKNOWN_METHODS(IPURE) \
  47. STDMETHOD (QueryInterface) \
  48. (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE; \
  49. STDMETHOD_(ULONG,AddRef) (THIS) IPURE; \
  50. STDMETHOD_(ULONG,Release) (THIS) IPURE; \
  51. #define IINSTALLAUDIOCODECS_METHODS(IPURE) \
  52. STDMETHOD(AddACMFormat) \
  53. (THIS_ LPWAVEFORMATEX lpwfx, PAUDCAP_INFO pAudCapInfo) IPURE; \
  54. STDMETHOD (RemoveACMFormat) \
  55. (THIS_ LPWAVEFORMATEX lpwfx) IPURE; \
  56. STDMETHOD (ReorderFormats) \
  57. (THIS_ PAUDCAP_INFO_LIST pAudCapInfoList) IPURE; \
  58. STDMETHOD (EnumFormats) \
  59. (THIS_ PAUDCAP_INFO_LIST *ppAudCapInfoList) IPURE; \
  60. STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE; \
  61. #define IINSTALLVIDEOCODECS_METHODS(IPURE) \
  62. STDMETHOD(AddVCMFormat) \
  63. (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE; \
  64. STDMETHOD (RemoveVCMFormat) \
  65. (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE; \
  66. STDMETHOD (ReorderFormats) \
  67. (THIS_ PVIDCAP_INFO_LIST pVidCapInfoList) IPURE; \
  68. STDMETHOD (EnumFormats) \
  69. (THIS_ PVIDCAP_INFO_LIST *ppVidCapInfoList) IPURE; \
  70. STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE; \
  71. // IInstallAudioCodecs
  72. #undef INTERFACE
  73. #define INTERFACE IInstallAudioCodecs
  74. DECLARE_INTERFACE_(IInstallAudioCodecs, IUnknown)
  75. {
  76. IUNKNOWN_METHODS(PURE)
  77. IINSTALLAUDIOCODECS_METHODS(PURE)
  78. };
  79. DECLARE_INTERFACE_PTR(IInstallAudioCodecs, LPINSTALLAUDIOCODECS);
  80. // IInstallVideooCodecs
  81. #undef INTERFACE
  82. #define INTERFACE IInstallVideoCodecs
  83. DECLARE_INTERFACE_(IInstallVideoCodecs, IUnknown)
  84. {
  85. IUNKNOWN_METHODS(PURE)
  86. IINSTALLVIDEOCODECS_METHODS(PURE)
  87. };
  88. DECLARE_INTERFACE_PTR(IInstallVideoCodecs, LPINSTALLVIDEOCODECS);
  89. // IInstallAudioCodecs
  90. #undef INTERFACE
  91. #define INTERFACE IInstallCodecs
  92. DECLARE_INTERFACE_(IInstallCodecs, IUnknown)
  93. {
  94. IUNKNOWN_METHODS(PURE)
  95. };
  96. DECLARE_INTERFACE_PTR(IInstallCodecs, LPINSTALLCODECS);
  97. EXTERN_C HRESULT WINAPI CreateInstallCodecs (
  98. IUnknown *punkOuter,
  99. REFIID riid,
  100. void **ppv);
  101. typedef HRESULT (WINAPI *PFNCREATEINSTALLCODECS)
  102. (IUnknown *punkOuter, REFIID riid, void **ppv);
  103. // {8ED14CC0-7A1F-11d0-92F6-00A0C922E6B2}
  104. DEFINE_GUID(CLSID_InstallCodecs, 0x8ed14cc0, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  105. // {8ED14CC1-7A1F-11d0-92F6-00A0C922E6B2}
  106. DEFINE_GUID(IID_IInstallCodecs, 0x8ed14cc1, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  107. // {8ED14CC2-7A1F-11d0-92F6-00A0C922E6B2}
  108. DEFINE_GUID(IID_IInstallAudioCodecs, 0x8ed14cc2, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  109. // {8ED14CC3-7A1F-11d0-92F6-00A0C922E6B2}
  110. DEFINE_GUID(IID_IInstallVideoCodecs, 0x8ed14cc3, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  111. #include <poppack.h> /* End byte packing */